netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: itvirta@iki.fi, linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: Soft lockup in sungem on Netra AC200 when switching interface up
Date: Sat, 7 Feb 2009 13:24:32 +0100	[thread overview]
Message-ID: <20090207122432.GA2822@ami.dom.local> (raw)
In-Reply-To: <20090206.220101.239298299.davem@davemloft.net>

David Miller wrote, On 02/07/2009 07:01 AM:

> From: Ilkka Virta <itvirta@iki.fi>
> Date: Fri, 6 Feb 2009 13:29:02 +0200
> 
>> Looking at gem_do_start() and gem_open(), it seems that the only thing
>> done while opening the device after the request_irq(), is a call to
>> napi_enable().
>>
>> I don't know what the ordering requirements are for the
>> initialization, but I boldly tried to move the napi_enable() call
>> inside gem_do_start() before the link state is checked and interrupts
>> subsequently enabled, and it seems to work for me. Doesn't even break
>> anything too obvious...
>>
>> Any ideas on how this really should be fixed?
> 
> Actually your fix looks good, I'll apply this :-)

Alas it could be not enough. It seems this problem is caused by not
serving interrupts if napi is disabled. This patch added napi_enable()
on one path, but e.g. here:

static int gem_close(struct net_device *dev)
{
        struct gem *gp = netdev_priv(dev);

        mutex_lock(&gp->pm_mutex);

        napi_disable(&gp->napi);

        gp->opened = 0;
        if (!gp->asleep)
                gem_do_stop(dev, 0);
...

similar storm can happen if an interrupt is triggered just after
napi_disable().

Jarek P.

      reply	other threads:[~2009-02-07 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 11:29 Soft lockup in sungem on Netra AC200 when switching interface up Ilkka Virta
2009-02-07  6:01 ` David Miller
2009-02-07 12:24   ` Jarek Poplawski [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=20090207122432.GA2822@ami.dom.local \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --cc=itvirta@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --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).