Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202604
b: refs/heads/master
c: f25b03a
h: refs/heads/master
v: v3
  • Loading branch information
Sathya Perla authored and David S. Miller committed Jun 1, 2010
1 parent b33d3ff commit eed3dab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 889cd4b2e529db4988525b0b3e6fb2c095760848
refs/heads/master: f25b03a7bd260b939b1a6aa69ca518d9848bb63a
11 changes: 5 additions & 6 deletions trunk/drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static int be_mcc_notify_wait(struct be_adapter *adapter)

static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db)
{
int cnt = 0, wait = 5;
int msecs = 0;
u32 ready;

do {
Expand All @@ -201,15 +201,14 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db)
if (ready)
break;

if (cnt > 4000000) {
if (msecs > 4000) {
dev_err(&adapter->pdev->dev, "mbox poll timed out\n");
return -1;
}

if (cnt > 50)
wait = 200;
cnt += wait;
udelay(wait);
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(msecs_to_jiffies(1));
msecs++;
} while (true);

return 0;
Expand Down

0 comments on commit eed3dab

Please sign in to comment.