From: David Miller <davem@davemloft.net>
To: bhutchings@solarflare.com
Cc: sathya.perla@emulex.com, 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 17:29:05 -0400 (EDT) [thread overview]
Message-ID: <20110512.172905.2288301818993183911.davem@davemloft.net> (raw)
In-Reply-To: <1305204546.4065.395.camel@localhost>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 12 May 2011 13:49:06 +0100
> 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.
Agreed.
Sathya, please make this change and resubmit this patch series.
Thanks.
next prev parent reply other threads:[~2011-05-12 21:29 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
2011-05-12 21:29 ` David Miller [this message]
[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=20110512.172905.2288301818993183911.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=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).