All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: "Basheer, Mansoor Ahamed" <mansoor.ahamed@ti.com>,
	netdev@vger.kernel.org
Subject: Re: Realtek 8139 driver (8139too.c) TX Timeout doesn't allow interrupt handler to disable receive interrupts at high bi-directional traffic
Date: Wed, 29 Nov 2006 16:09:06 -0800	[thread overview]
Message-ID: <20061129160906.695b4d03@freekitty> (raw)
In-Reply-To: <20061129233219.GD18057@electric-eye.fr.zoreil.com>

On Thu, 30 Nov 2006 00:32:19 +0100
Francois Romieu <romieu@fr.zoreil.com> wrote:

> Stephen Hemminger <shemminger@osdl.org> :
> > Francois Romieu <romieu@fr.zoreil.com> wrote:
> > > Stephen Hemminger <shemminger@osdl.org> :
> > > [...]
> > > > @@ -1682,12 +1685,11 @@ static void rtl8139_tx_timeout_task (voi
> > > >  	rtl8139_tx_clear (tp);
> > > >  	spin_unlock_irq(&tp->lock);
> > > >  
> > > > +	netif_poll_enable();
> > >                           ^ -> dev
> > > > +
> > > >  	/* ...and finally, reset everything */
> > > > -	if (netif_running(dev)) {
> > > > -		rtl8139_hw_start (dev);
> > > > -		netif_wake_queue (dev);
> > > > -	}
> > > > -	spin_unlock_bh(&tp->rx_lock);
> > > > +	rtl8139_hw_start (dev);
> > > > +	netif_wake_queue (dev);
> > > >  }
> > > 
> > > rtl8139_hw_start() may mess with cur_rx, whence a race with rtl8139_rx()
> > > if an in-flight interruption enables it a bit too fast. I'd rather go
> > > with:
> > 
> > but rt8139_rx is not possible here because we have blocked the poll
> > routine from starting.  Basically it uses the NAPI rx scheduler bit
> > to replace the rx_lock.
> 
> 1 - the irq handler is waiting for tp->lock
> 2 - rtl8139_tx_timeout_task releases the lock
> 3 - rtl8139_tx_timeout_task issues netif_poll_enable
> 4 - the irq handler schedules ->poll(), returns

Move the poll_enable to after hw_start() or put it inside hw_start.
- 
Stephen Hemminger <shemminger@osdl.org>

  reply	other threads:[~2006-11-30  0:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29  8:50 Realtek 8139 driver (8139too.c) TX Timeout doesn't allow interrupt handler to disable receive interrupts at high bi-directional traffic Basheer, Mansoor Ahamed
2006-11-29 20:24 ` Stephen Hemminger
2006-11-29 22:44   ` Francois Romieu
2006-11-29 22:50     ` Stephen Hemminger
2006-11-29 23:32       ` Francois Romieu
2006-11-30  0:09         ` Stephen Hemminger [this message]
2006-11-30  0:25           ` Francois Romieu
  -- strict thread matches above, loose matches on Subject: below --
2006-11-09 14:22 Basheer, Mansoor Ahamed
2006-11-09 23:46 ` Francois Romieu
2006-11-14  5:33   ` Basheer, Mansoor Ahamed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061129160906.695b4d03@freekitty \
    --to=shemminger@osdl.org \
    --cc=mansoor.ahamed@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.