* [PATCH net-next-2.6 2/2] be2net: fix mbox polling for signal reception [not found] <1305180663-12140-1-git-send-email-sathya.perla@emulex.com> @ 2011-05-12 6:11 ` Sathya Perla 2011-05-12 12:49 ` Ben Hutchings 0 siblings, 1 reply; 4+ messages in thread From: Sathya Perla @ 2011-05-12 6:11 UTC (permalink / raw) To: netdev; +Cc: Sathya Perla 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)); msecs++; } while (true); -- 1.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next-2.6 2/2] be2net: fix mbox polling for signal reception 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 0 siblings, 1 reply; 4+ messages in thread From: Ben Hutchings @ 2011-05-12 12:49 UTC (permalink / raw) To: Sathya Perla; +Cc: netdev 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next-2.6 2/2] be2net: fix mbox polling for signal reception 2011-05-12 12:49 ` Ben Hutchings @ 2011-05-12 21:29 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2011-05-12 21:29 UTC (permalink / raw) To: bhutchings; +Cc: sathya.perla, netdev 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1305264736-18358-1-git-send-email-sathya.perla@emulex.com>]
* [PATCH net-next-2.6 2/2] be2net: fix mbox polling for signal reception [not found] <1305264736-18358-1-git-send-email-sathya.perla@emulex.com> @ 2011-05-13 5:32 ` Sathya Perla 0 siblings, 0 replies; 4+ messages in thread From: Sathya Perla @ 2011-05-13 5:32 UTC (permalink / raw) To: netdev; +Cc: Sathya Perla 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. Use msleep() to not get interrupted. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> --- drivers/net/benet/be_cmds.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index d558b90..f2c9099 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c @@ -298,8 +298,7 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db) return -1; } - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(msecs_to_jiffies(1)); + msleep(1); msecs++; } while (true); -- 1.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-13 5:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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 [not found] <1305264736-18358-1-git-send-email-sathya.perla@emulex.com> 2011-05-13 5:32 ` Sathya Perla
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).