diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2010-11-04 20:37:47 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 13:25:58 -0500 |
commit | 08e5310028359de2daaa39cd10e9ca493c51792b (patch) | |
tree | 036173b0aea7322fbde3e138340b475c8c1fe33d | |
parent | efd2f271e44c7ea011cdb0363d38f40338ab80d2 (diff) | |
download | linux-stable-08e5310028359de2daaa39cd10e9ca493c51792b.tar.gz linux-stable-08e5310028359de2daaa39cd10e9ca493c51792b.tar.bz2 linux-stable-08e5310028359de2daaa39cd10e9ca493c51792b.zip |
rt2x00: Wait up to one second on rt2800 for WPDMA to be ready
At least some devices need such a long time to inititalize WPDMA. This
only increases the maximum wait time and shouldn't affect devices that
have been working before.
Reported-by: Joshua Smith <jesmith@kaon.com>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index b1738bbf87ff..dcd3a8981ca2 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -277,13 +277,17 @@ int rt2800_wait_wpdma_ready(struct rt2x00_dev *rt2x00dev) unsigned int i; u32 reg; + /* + * Some devices are really slow to respond here. Wait a whole second + * before timing out. + */ for (i = 0; i < REGISTER_BUSY_COUNT; i++) { rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®); if (!rt2x00_get_field32(reg, WPDMA_GLO_CFG_TX_DMA_BUSY) && !rt2x00_get_field32(reg, WPDMA_GLO_CFG_RX_DMA_BUSY)) return 0; - msleep(1); + msleep(10); } ERROR(rt2x00dev, "WPDMA TX/RX busy, aborting.\n"); |