diff options
author | Daniel Drake <dsd@laptop.org> | 2011-05-02 16:38:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-05 14:59:05 -0400 |
commit | 7e4b4eecedb3c6bd5f9fec479ef33ccc6ce72375 (patch) | |
tree | 12e6b3433c4a3930c3131847db1d8647289830f3 /drivers/net/wireless/libertas | |
parent | 470ab2a23b453518ac86937572b4531d8925ca55 (diff) |
libertas: remove tx_timeout handler
As described at http://marc.info/?l=linux-netdev&m=130428493104730&w=2
libertas frequently generates spurious tx timeouts, because the tx
queue is brought down for extended periods during scanning. The net
layer takes a look and incorrectly assumes the queue has been down for
several seconds, and generates a tx_timeout.
One way to fix this is to bump the trans_start counter while scanning
so that the network layer knows that the device is still alive, but
I think the tx_timeout handler is implemented wrongly here and not of
any real use, so I vote to remove it.
As explained at http://marc.info/?l=linux-wireless&m=130430311115755&w=2
the watchdog is primarily meant to deal with lockup on the hardware TX
path (detected by the tx queue being stopped for an extended period of
time), but this is unlikely to happen with libertas. In this case, the tx
queue is stopped only while waiting for lbs_thread to send the queued frame
to the driver, and lbs_thread wakes up the queue immediately after, even
if the frame could not be sent correctly.
So, the only hardware-related possibility that this catches is if
hw_host_to_card hangs - this is something I have never seen. And if it
were to happen, nothing done by lbs_tx_timeout would actually wake up
lbs_thread any quicker than otherwise.
Removing this oddly-behaving spuriously-firing tx_timeout handler should
fix an occasional kernel crash during resume
(http://dev.laptop.org/ticket/10748)
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index ed57cf863b69..ae02e6b7bc41 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -149,28 +149,6 @@ static int lbs_eth_stop(struct net_device *dev) | |||
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | 151 | ||
152 | static void lbs_tx_timeout(struct net_device *dev) | ||
153 | { | ||
154 | struct lbs_private *priv = dev->ml_priv; | ||
155 | |||
156 | lbs_deb_enter(LBS_DEB_TX); | ||
157 | |||
158 | lbs_pr_err("tx watch dog timeout\n"); | ||
159 | |||
160 | dev->trans_start = jiffies; /* prevent tx timeout */ | ||
161 | |||
162 | if (priv->currenttxskb) | ||
163 | lbs_send_tx_feedback(priv, 0); | ||
164 | |||
165 | /* XX: Shouldn't we also call into the hw-specific driver | ||
166 | to kick it somehow? */ | ||
167 | lbs_host_to_card_done(priv); | ||
168 | |||
169 | /* FIXME: reset the card */ | ||
170 | |||
171 | lbs_deb_leave(LBS_DEB_TX); | ||
172 | } | ||
173 | |||
174 | void lbs_host_to_card_done(struct lbs_private *priv) | 152 | void lbs_host_to_card_done(struct lbs_private *priv) |
175 | { | 153 | { |
176 | unsigned long flags; | 154 | unsigned long flags; |
@@ -791,7 +769,6 @@ static const struct net_device_ops lbs_netdev_ops = { | |||
791 | .ndo_stop = lbs_eth_stop, | 769 | .ndo_stop = lbs_eth_stop, |
792 | .ndo_start_xmit = lbs_hard_start_xmit, | 770 | .ndo_start_xmit = lbs_hard_start_xmit, |
793 | .ndo_set_mac_address = lbs_set_mac_address, | 771 | .ndo_set_mac_address = lbs_set_mac_address, |
794 | .ndo_tx_timeout = lbs_tx_timeout, | ||
795 | .ndo_set_multicast_list = lbs_set_multicast_list, | 772 | .ndo_set_multicast_list = lbs_set_multicast_list, |
796 | .ndo_change_mtu = eth_change_mtu, | 773 | .ndo_change_mtu = eth_change_mtu, |
797 | .ndo_validate_addr = eth_validate_addr, | 774 | .ndo_validate_addr = eth_validate_addr, |