From: Ben Hutchings <bhutchings@solarflare.com>
To: Sathya Perla <sathya.perla@emulex.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6 2/2] be2net: fix mbox polling for signal reception
Date: Thu, 12 May 2011 13:49:06 +0100 [thread overview]
Message-ID: <1305204546.4065.395.camel@localhost> (raw)
In-Reply-To: <f816628b-a4b6-4a53-867e-12e75bc7b4de@exht1.ad.emulex.com>
On Thu, 2011-05-12 at 11:41 +0530, Sathya Perla wrote:
> Sending mbox cmds require multiple steps of writing to the DB register and polling
> for an ack. Gettting interrupted in the middle by a signal breaks the mbox protocol.
> So, set the task to UNINTERRUPTIBLE for mbox polling.
>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> ---
> drivers/net/benet/be_cmds.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
> index bff41ed..55c8301 100644
> --- a/drivers/net/benet/be_cmds.c
> +++ b/drivers/net/benet/be_cmds.c
> @@ -297,7 +297,7 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db)
> return -1;
> }
>
> - set_current_state(TASK_INTERRUPTIBLE);
> + set_current_state(TASK_UNINTERRUPTIBLE);
> schedule_timeout(msecs_to_jiffies(1));
msleep(1) is a lot more readable.
Ben.
> msecs++;
> } while (true);
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-05-12 12:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1305180663-12140-1-git-send-email-sathya.perla@emulex.com>
2011-05-12 6:11 ` [PATCH net-next-2.6 2/2] be2net: fix mbox polling for signal reception Sathya Perla
2011-05-12 12:49 ` Ben Hutchings [this message]
2011-05-12 21:29 ` David Miller
[not found] <1305264736-18358-1-git-send-email-sathya.perla@emulex.com>
2011-05-13 5:32 ` Sathya Perla
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=1305204546.4065.395.camel@localhost \
--to=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=sathya.perla@emulex.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).