Commit 339ccc36 authored by Cindy H Kao's avatar Cindy H Kao Committed by Inaky Perez-Gonzalez

wimax/i2400m/sdio: clear the INTR status bit after reading size

In order to avoid issues during high-load traffic, the interrupt
status register has to be cleared ONLY after the RX size is read.
Signed-off-by: default avatarCindy H Kao <cindy.h.kao@intel.com>
Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
parent 2093586d
...@@ -138,6 +138,11 @@ void i2400ms_rx(struct i2400ms *i2400ms) ...@@ -138,6 +138,11 @@ void i2400ms_rx(struct i2400ms *i2400ms)
ret = rx_size; ret = rx_size;
goto error_get_size; goto error_get_size;
} }
/*
* Hardware quirk: make sure to clear the INTR status register
* AFTER getting the data transfer size.
*/
sdio_writeb(func, 1, I2400MS_INTR_CLEAR_ADDR, &ret);
ret = -ENOMEM; ret = -ENOMEM;
skb = alloc_skb(rx_size, GFP_ATOMIC); skb = alloc_skb(rx_size, GFP_ATOMIC);
...@@ -209,7 +214,6 @@ void i2400ms_irq(struct sdio_func *func) ...@@ -209,7 +214,6 @@ void i2400ms_irq(struct sdio_func *func)
dev_err(dev, "RX: BUG? got IRQ but no interrupt ready?\n"); dev_err(dev, "RX: BUG? got IRQ but no interrupt ready?\n");
goto error_no_irq; goto error_no_irq;
} }
sdio_writeb(func, 1, I2400MS_INTR_CLEAR_ADDR, &ret);
i2400ms_rx(i2400ms); i2400ms_rx(i2400ms);
error_no_irq: error_no_irq:
d_fnend(6, dev, "(i2400ms %p) = void\n", i2400ms); d_fnend(6, dev, "(i2400ms %p) = void\n", i2400ms);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment