aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800pci.c
diff options
context:
space:
mode:
authorJakub Kicinski <kubakici@wp.pl>2012-04-02 21:40:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-13 14:32:48 -0400
commit52b8243b75598c341143f67c56b0104938487231 (patch)
treeede3849e4fd841a7d5db332422af09e1913d6754 /drivers/net/wireless/rt2x00/rt2800pci.c
parentb7e1d225f5c2d397136fd79472d32b0f87017612 (diff)
rt2800: initialize queues before giving up due to DMA error
Don't immediately abort .start if DMA is busy before we initialize the queues. Some drivers do not deinitialize queues properly and we would fail to take over after them. This behaviour is consistent with legacy driver. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index e499389d8cd3..4366c23672f0 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -496,8 +496,10 @@ static int rt2800pci_enable_radio(struct rt2x00_dev *rt2x00dev)
496{ 496{
497 int retval; 497 int retval;
498 498
499 if (unlikely(rt2800_wait_wpdma_ready(rt2x00dev) || 499 /* Wait for DMA, ignore error until we initialize queues. */
500 rt2800pci_init_queues(rt2x00dev))) 500 rt2800_wait_wpdma_ready(rt2x00dev);
501
502 if (unlikely(rt2800pci_init_queues(rt2x00dev)))
501 return -EIO; 503 return -EIO;
502 504
503 retval = rt2800_enable_radio(rt2x00dev); 505 retval = rt2800_enable_radio(rt2x00dev);