Skip to content

Commit

Permalink
qlge: Fix timeout on firmware mailbox commands.
Browse files Browse the repository at this point in the history
Some firmware mailbox commands require the firmware to
communicate with the FCoE driver running on another
PCI function.  This can potentially take several seconds.
This wait is done in process context only.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ron Mercer authored and David S. Miller committed Jun 8, 2009
1 parent d2ba498 commit 365da87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/qlge/qlge_mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp)
*/
static int ql_wait_mbx_cmd_cmplt(struct ql_adapter *qdev)
{
int count = 50; /* TODO: arbitrary for now. */
int count = 100;
u32 value;

do {
value = ql_read32(qdev, STS);
if (value & STS_PI)
return 0;
udelay(UDELAY_DELAY); /* 10us */
mdelay(UDELAY_DELAY); /* 100ms */
} while (--count);
return -ETIMEDOUT;
}
Expand Down

0 comments on commit 365da87

Please sign in to comment.