From: Flavio Leitner <fbl@redhat.com>
To: Flavio Leitner <fbl@redhat.com>
Cc: "Michael Chan" <mchan@broadcom.com>,
davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] bnx2: Close device if tx_timeout reset fails
Date: Mon, 18 Jul 2011 20:24:20 -0300 [thread overview]
Message-ID: <20110718202420.0bcf00f9@asterix.rh> (raw)
In-Reply-To: <20110716001606.528a55c8@asterix.rh>
On Sat, 16 Jul 2011 00:16:06 -0300
Flavio Leitner <fbl@redhat.com> wrote:
> On Fri, 15 Jul 2011 09:53:58 -0700
> "Michael Chan" <mchan@broadcom.com> wrote:
> ...
> > To fix it, we call dev_close() if bnx2_init_nic() fails.
> > One minor wrinkle to deal with is the cancel_work_sync()
> > call in bnx2_close() to cancel bnx2_reset_task(). The
> > call will wait forever because it is trying to cancel
> > itself and the workqueue will be stuck.
> >
> > Since bnx2_reset_task() holds the rtnl_lock() and checks
> > for netif_running() before proceeding, there is no need
> > to cancel bnx2_reset_task() in bnx2_close() even if
> > bnx2_close() and bnx2_reset_task() are running concurrently.
> > The rtnl_lock() serializes the 2 calls.
> >
> > We need to move the cancel_work_sync() call to
> > bnx2_remove_one() to make sure it is canceled before freeing
> > the netdev struct.
>
> It looks good. I'm traveling now, so I'll test this on Monday.
>
I have patched the kernel to inject the error and it works as
expected.
thanks,
fbl
next prev parent reply other threads:[~2011-07-18 23:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 16:53 [PATCH net-next] bnx2: Close device if tx_timeout reset fails Michael Chan
2011-07-16 3:16 ` Flavio Leitner
2011-07-18 23:24 ` Flavio Leitner [this message]
2011-07-16 17:13 ` David Miller
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=20110718202420.0bcf00f9@asterix.rh \
--to=fbl@redhat.com \
--cc=davem@davemloft.net \
--cc=mchan@broadcom.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 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.