From: Jeff Garzik <jeff@garzik.org>
To: Michael Buesch <mb@bu3sch.de>
Cc: dhananjay.phadke@gmail.com, netdev@vger.kernel.org,
rob@netxen.com, Milan Bag <mbag@netxen.com>,
Wen Xiong <wenxiong@us.ibm.com>
Subject: Re: [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module unload
Date: Sat, 30 Jun 2007 18:43:13 -0400 [thread overview]
Message-ID: <4686DC81.5090908@garzik.org> (raw)
In-Reply-To: <200707010012.11527.mb@bu3sch.de>
Michael Buesch wrote:
> On Saturday 30 June 2007 22:38:47 dhananjay.phadke@gmail.com wrote:
>> These changes allow driver close routine to be called during module unload,
>> to clean-up buffers and other software resources, flush queues etc. Also,
>> hardware is reset to pristine state.
>>
>> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
>> Signed-off-by: Milan Bag <mbag@netxen.com>
>> Signed-off-by: Wen Xiong <wenxiong@us.ibm.com>
>
>> off = netxen_nic_pci_set_window(adapter, memaddr);
>> addr = pci_base_offset(adapter, off);
>> writel(data, addr);
>> + do {
>> + if (readl(addr) == data)
>> + break;
>> + msleep_interruptible(100);
>
> If you use msleep_interruptible(), I'd say you should check for
> the return value of that call and probably abort firmware
> processing here if a signal interrupted us.
While strictly this is true, I strongly urge the use of
non-interruptible sleeps when used in hardware-related delays. Very
rarely does one really want to care about signals for such cases.
Jeff
next prev parent reply other threads:[~2007-06-30 22:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 20:38 [PATCH 0/3] NetXen: Bug fixes for multiport and blade adapters dhananjay.phadke
2007-06-30 20:38 ` [PATCH 1/3] NetXen: Fix issue of MSI not working correctly dhananjay.phadke
2007-06-30 20:38 ` [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers dhananjay.phadke
2007-06-30 22:17 ` Michael Buesch
2007-06-30 20:38 ` [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module unload dhananjay.phadke
2007-06-30 22:12 ` Michael Buesch
2007-06-30 22:43 ` Jeff Garzik [this message]
2007-07-01 1:49 ` Dhananjay Phadke
2007-07-01 3:27 ` Jeff Garzik
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=4686DC81.5090908@garzik.org \
--to=jeff@garzik.org \
--cc=dhananjay.phadke@gmail.com \
--cc=mb@bu3sch.de \
--cc=mbag@netxen.com \
--cc=netdev@vger.kernel.org \
--cc=rob@netxen.com \
--cc=wenxiong@us.ibm.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 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).