summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@emulex.com>2011-05-12 21:32:16 +0200
committerDavid S. Miller <davem@davemloft.net>2011-05-13 20:41:35 +0200
commit1dbf53a28262aa89ecbe653e8a9127c0baef9bc4 (patch)
tree39936f2646f43f242b920c35eed1286bd18f7069
parentbe2net: handle signal reception while waiting for POST (diff)
downloadlinux-1dbf53a28262aa89ecbe653e8a9127c0baef9bc4.tar.xz
linux-1dbf53a28262aa89ecbe653e8a9127c0baef9bc4.zip
be2net: fix mbox polling for signal reception
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/benet/be_cmds.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index d558b9088d7e..f2c90997fabd 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);