aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCindy H Kao <cindy.h.kao@intel.com>2009-08-10 21:36:15 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 02:55:45 -0400
commit339ccc362cb60b48e478ff494172efadb385c0ab (patch)
tree4948984a3660362764b9e77e1bcb022a8610d976
parent2093586de29418820b89aae05746511392f8ad73 (diff)
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: Cindy H Kao <cindy.h.kao@intel.com> Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
-rw-r--r--drivers/net/wimax/i2400m/sdio-rx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/sdio-rx.c b/drivers/net/wimax/i2400m/sdio-rx.c
index f6ca51ab216d..1c9046914bd1 100644
--- a/drivers/net/wimax/i2400m/sdio-rx.c
+++ b/drivers/net/wimax/i2400m/sdio-rx.c
@@ -138,6 +138,11 @@ void i2400ms_rx(struct i2400ms *i2400ms)
138 ret = rx_size; 138 ret = rx_size;
139 goto error_get_size; 139 goto error_get_size;
140 } 140 }
141 /*
142 * Hardware quirk: make sure to clear the INTR status register
143 * AFTER getting the data transfer size.
144 */
145 sdio_writeb(func, 1, I2400MS_INTR_CLEAR_ADDR, &ret);
141 146
142 ret = -ENOMEM; 147 ret = -ENOMEM;
143 skb = alloc_skb(rx_size, GFP_ATOMIC); 148 skb = alloc_skb(rx_size, GFP_ATOMIC);
@@ -209,7 +214,6 @@ void i2400ms_irq(struct sdio_func *func)
209 dev_err(dev, "RX: BUG? got IRQ but no interrupt ready?\n"); 214 dev_err(dev, "RX: BUG? got IRQ but no interrupt ready?\n");
210 goto error_no_irq; 215 goto error_no_irq;
211 } 216 }
212 sdio_writeb(func, 1, I2400MS_INTR_CLEAR_ADDR, &ret);
213 i2400ms_rx(i2400ms); 217 i2400ms_rx(i2400ms);
214error_no_irq: 218error_no_irq:
215 d_fnend(6, dev, "(i2400ms %p) = void\n", i2400ms); 219 d_fnend(6, dev, "(i2400ms %p) = void\n", i2400ms);