Commit bbf71a8f authored by Nishant Sarmukadam's avatar Nishant Sarmukadam Committed by John W. Linville
Browse files

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: default avatarNishant Sarmukadam <nishants@marvell.com>
Signed-off-by: default avatarYogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 110dea00
...@@ -1548,7 +1548,7 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw) ...@@ -1548,7 +1548,7 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw)
if (!priv->pending_tx_pkts) if (!priv->pending_tx_pkts)
return 0; return 0;
retry = 0; retry = 1;
rc = 0; rc = 0;
spin_lock_bh(&priv->tx_lock); spin_lock_bh(&priv->tx_lock);
...@@ -1572,13 +1572,19 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw) ...@@ -1572,13 +1572,19 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw)
spin_lock_bh(&priv->tx_lock); spin_lock_bh(&priv->tx_lock);
if (timeout) { if (timeout || !priv->pending_tx_pkts) {
WARN_ON(priv->pending_tx_pkts); WARN_ON(priv->pending_tx_pkts);
if (retry) if (retry)
wiphy_notice(hw->wiphy, "tx rings drained\n"); wiphy_notice(hw->wiphy, "tx rings drained\n");
break; break;
} }
if (retry) {
mwl8k_tx_start(priv);
retry = 0;
continue;
}
if (priv->pending_tx_pkts < oldcount) { if (priv->pending_tx_pkts < oldcount) {
wiphy_notice(hw->wiphy, wiphy_notice(hw->wiphy,
"waiting for tx rings to drain (%d -> %d pkts)\n", "waiting for tx rings to drain (%d -> %d pkts)\n",
...@@ -2055,6 +2061,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, ...@@ -2055,6 +2061,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw,
mwl8k_remove_stream(hw, stream); mwl8k_remove_stream(hw, stream);
spin_unlock(&priv->stream_lock); spin_unlock(&priv->stream_lock);
} }
mwl8k_tx_start(priv);
spin_unlock_bh(&priv->tx_lock); spin_unlock_bh(&priv->tx_lock);
pci_unmap_single(priv->pdev, dma, skb->len, pci_unmap_single(priv->pdev, dma, skb->len,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
......
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