be2net: fix mbox polling for signal reception
authorSathya Perla <sathya.perla@emulex.com>
Thu, 12 May 2011 19:32:16 +0000 (19:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 May 2011 18:41:35 +0000 (14:41 -0400)
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>
drivers/net/benet/be_cmds.c

index d558b90..f2c9099 100644 (file)
@@ -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);