Thread (5 messages) 5 messages, 3 authors, 2009-08-04

Re: [PATCH] sky2: Avoid transmits during sky2_down()

From: David Miller <davem@davemloft.net>
Date: 2009-08-04 02:04:12

From: Mike McCormack <redacted>
Date: Fri, 31 Jul 2009 20:57:42 +0900
This patch supersedes my previous patch "sky2: Avoid transmitting
during sky2_restart".

I have reworked the patch to avoid crashes during both sky2_restart()
and sky2_set_ringparam().

Without this patch, the sky2 driver can be crashed by doing:

# pktgen eth1 &    (transmit many packets on eth1)
# ethtool -G eth1 tx 510

I am aware you object to storing extra state, but I can't see a way
around this. Without remembering that we're restarting,
netif_wake_queue() is called in the ISR from sky2_tx_complete(), and
netif_tx_lock() is used in sky2_tx_done().  If anybody can see a way
around this, please let me know.
Applied, thanks Mike.
----

During sky2_restart() or sky2_set_ringparam(), the tx queue needs to be
 shutdown in sky2_down() to avoid accessing a NULL tx_ring.

Signed-off-by: Mike McCormack <redacted>
Mike, please don't put your signoff after the "----" seperator,
otherwise automated tools strip it out instead of including it
in the commit message.

Also.
quoted hunk ↗ jump to hunk
@@ -2359,7 +2370,7 @@ static inline void sky2_tx_done(struct
net_device *dev, u16 last)
Your email client breaks up long lines and this corrupts your
patches.  Please correct this before future submissions.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help