[net-next-2.6,2/2] be2net: fix mbox polling for signal reception

Submitted by Sathya Perla on May 13, 2011, 5:32 a.m.

Details

Message ID b37c4038-fd25-4470-b0a6-234ff87e4b2a@exht1.ad.emulex.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Sathya Perla May 13, 2011, 5:32 a.m.
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(-)

Patch hide | download patch | download mbox

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);