Subject: Re: [PATCH] sky2: safer transmit ring cleaning

From: Stephen Hemminger <[email-masked]>
Date: Tue, 12 Jan 2010 10:13:06 -0800

On Tue, 12 Jan 2010 19:04:30 +0100
Jarek Poplawski <[email-masked]> wrote:

> On Tue, Jan 12, 2010 at 08:15:13AM -0800, Stephen Hemminger wrote:
> > This code makes transmit path and transmit reset safer by:
> >   * adding memory barrier before checking available ring slots
> >   * reseting state of tx ring elements after free
> >   * seperate cleanup function from ring done function
> >   * removing mostly unused tx_next element  
> 
> Does this patch prevent re-enabling tx after netif_device_detach(),
> e.g. when sky2_detach() and sky2_tx_done() run at the same time on
> different cpus?
> 

Yes.
The napi is disabled during the detach so transmit completion can
not be done during that period.