aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorNishant Sarmukadam <nishants@marvell.com>2013-05-24 05:12:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-05-24 13:18:22 -0400
commitbbf71a8f35cf52e97ba129401f82ccefd249c757 (patch)
tree039de2ba3e8578dfb9bad2f1eb286b0475b4cd10 /drivers/net/wireless/mwl8k.c
parent110dea0008c40a20f1ce280b636f87fff58a7403 (diff)
mwl8k: Fix the firmware hang issue for 8764
The firmware hang issue is not seen very often, though it is still seen sometimes (once in 12 hours in local tests). The changes in the driver ,to interrupt the firmware, are needed when we detect that firmware is stuck and when the host queues are full and we begin to drop packets. This is to ensure that the firmware does not miss any PPA_RDY interrupts to cause the firmware restart dont miss PPA_READY interrupt for SC2 Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 6820fce4016b..a3707fd4ef62 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1548,7 +1548,7 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw)
1548 if (!priv->pending_tx_pkts) 1548 if (!priv->pending_tx_pkts)
1549 return 0; 1549 return 0;
1550 1550
1551 retry = 0; 1551 retry = 1;
1552 rc = 0; 1552 rc = 0;
1553 1553
1554 spin_lock_bh(&priv->tx_lock); 1554 spin_lock_bh(&priv->tx_lock);
@@ -1572,13 +1572,19 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw)
1572 1572
1573 spin_lock_bh(&priv->tx_lock); 1573 spin_lock_bh(&priv->tx_lock);
1574 1574
1575 if (timeout) { 1575 if (timeout || !priv->pending_tx_pkts) {
1576 WARN_ON(priv->pending_tx_pkts); 1576 WARN_ON(priv->pending_tx_pkts);
1577 if (retry) 1577 if (retry)
1578 wiphy_notice(hw->wiphy, "tx rings drained\n"); 1578 wiphy_notice(hw->wiphy, "tx rings drained\n");
1579 break; 1579 break;
1580 } 1580 }
1581 1581
1582 if (retry) {
1583 mwl8k_tx_start(priv);
1584 retry = 0;
1585 continue;
1586 }
1587
1582 if (priv->pending_tx_pkts < oldcount) { 1588 if (priv->pending_tx_pkts < oldcount) {
1583 wiphy_notice(hw->wiphy, 1589 wiphy_notice(hw->wiphy,
1584 "waiting for tx rings to drain (%d -> %d pkts)\n", 1590 "waiting for tx rings to drain (%d -> %d pkts)\n",
@@ -2055,6 +2061,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw,
2055 mwl8k_remove_stream(hw, stream); 2061 mwl8k_remove_stream(hw, stream);
2056 spin_unlock(&priv->stream_lock); 2062 spin_unlock(&priv->stream_lock);
2057 } 2063 }
2064 mwl8k_tx_start(priv);
2058 spin_unlock_bh(&priv->tx_lock); 2065 spin_unlock_bh(&priv->tx_lock);
2059 pci_unmap_single(priv->pdev, dma, skb->len, 2066 pci_unmap_single(priv->pdev, dma, skb->len,
2060 PCI_DMA_TODEVICE); 2067 PCI_DMA_TODEVICE);