netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: markus@trippelsdorf.de
Cc: jgarzik@pobox.com, netdev@vger.kernel.org
Subject: Re: [PATCH] r8169 Fix hang in rtl8169_down (NAPI)
Date: Mon, 15 Oct 2007 13:53:10 -0700 (PDT)	[thread overview]
Message-ID: <20071015.135310.41635381.davem@davemloft.net> (raw)
In-Reply-To: <20071015202546.GA4060@gentoox2.trippelsdorf.de>

From: Markus Trippelsdorf <markus@trippelsdorf.de>
Date: Mon, 15 Oct 2007 22:25:46 +0200

> commit bea3348eef27e6044b6161fd04c3152215f96411 :
> [NET]: Make NAPI polling independent of struct net_device objects.
> causes my machine to hang on shutdown. The following patch fixes the
> problem for me.
> 
> Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>

This change doesn't make any sense.

> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
> index 419c00c..2cddbf8 100644
> --- a/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c
> @@ -2888,10 +2888,12 @@ core_down:
>  
>  	synchronize_irq(dev->irq);
>  
> +#ifdef CONFIG_R8169_NAPI
>  	if (!poll_locked) {
>  		napi_disable(&tp->napi);
>  		poll_locked++;
>  	}
> +#endif
>  
>  	/* Give a racing hard_start_xmit a few cycles to complete. */
>  	synchronize_sched();  /* FIXME: should this be synchronize_irq()? */

If anything the test should be the other way around, use of
napi interfaces should be used when R8169_NAPI is set.

You're just papering around some other bug in the NAPI support
of this driver, which someone will need to figure out and fix
correctly.

But thanks for the report, and the patch, whilst bogus, might
provide a clue.

      reply	other threads:[~2007-10-15 20:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15 20:25 [PATCH] r8169 Fix hang in rtl8169_down (NAPI) Markus Trippelsdorf
2007-10-15 20:53 ` David Miller [this message]

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=20071015.135310.41635381.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=markus@trippelsdorf.de \
    --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).