netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Denis Kirjanov <kirjanov@gmail.com>,
	"Mike ." <mike-bugreport@hotmail.com>,
	656476@bugs.debian.org, netdev <netdev@vger.kernel.org>
Subject: Re: Sundance network driver (D-Link DFE-580TX) timeouts rendering interface unusable
Date: Mon, 30 Jan 2012 14:05:11 +0000	[thread overview]
Message-ID: <1327932311.5400.429.camel@deadeye> (raw)
In-Reply-To: <1327918447.2288.24.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

On Mon, 2012-01-30 at 11:14 +0100, Eric Dumazet wrote:
> Le lundi 30 janvier 2012 à 12:51 +0300, Denis Kirjanov a écrit :
> > I'll check this out. After kernel.org was cracked I've missed
> > @kernel.org mail account.
> 
> 
> At first glance, start_tx() is racy against TX completion.
> 
> It does :
> 
>         if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 1 &&
>             !netif_queue_stopped(dev)) {
>                 /* do nothing */
>         } else {
>                 netif_stop_queue (dev);
>         }
> 
> So it can call netif_stop_queue() while TX completion handler did a
> cleanup of all queued packets right before.

Yes, I spotted that.  But no descriptors are pushed to the hardware
here; that's done in the driver's TX tasklet.  Although... maybe that
can run immediately when scheduled from here?  I've never had to deal
with tasklets so I really don't know their semantics.

Ben.

> Note intr_handler() doesnt hold the queue spinlock when it does :
> 
>                 if (netif_queue_stopped(dev) &&
>                         np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) {
>                         /* The ring is no longer full, clear busy flag. */
>                         netif_wake_queue (dev);
>                 }
> 
> 
> 

-- 
Ben Hutchings
Lowery's Law:
             If it jams, force it. If it breaks, it needed replacing anyway.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  parent reply	other threads:[~2012-01-30 14:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SNT141-W3553B2629FBBC84A5A140596860@phx.gbl>
     [not found] ` <1327205171.8004.96.camel@deadeye>
     [not found]   ` <SNT141-W5087B9A5022955EA5564DB96890@phx.gbl>
     [not found]     ` <20120126220640.GO12704@decadent.org.uk>
     [not found]       ` <SNT141-W58AC5ADD0BC9DE29AFA00D968E0@phx.gbl>
2012-01-29  4:23         ` Sundance network driver (D-Link DFE-580TX) timeouts rendering interface unusable Ben Hutchings
2012-01-29  4:32         ` Ben Hutchings
2012-01-30  9:51           ` Denis Kirjanov
2012-01-30 10:14             ` Bug#656476: " Eric Dumazet
2012-01-30 10:36               ` Eric Dumazet
2012-01-30 14:05               ` Ben Hutchings [this message]
2012-01-30 14:28                 ` Eric Dumazet
2012-01-30 14:41                   ` Ben Hutchings
2012-01-30 14:57                     ` Eric Dumazet
2012-01-30 15:21                       ` Eric Dumazet
2012-02-01 14:42                         ` Bug#656476: " Mike .
2012-03-16 22:04                           ` Jonathan Nieder
2012-03-16 22:11                             ` Jonathan Nieder
2012-04-23 15:34                             ` Bug#656476: " Mike .

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=1327932311.5400.429.camel@deadeye \
    --to=ben@decadent.org.uk \
    --cc=656476@bugs.debian.org \
    --cc=eric.dumazet@gmail.com \
    --cc=kirjanov@gmail.com \
    --cc=mike-bugreport@hotmail.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).