qlge: Fix timeout on firmware mailbox commands.

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>
This commit is contained in:
Ron Mercer 2009-06-07 13:58:29 +00:00 committed by David S. Miller
parent d2ba498668
commit 365da8722d
1 changed files with 2 additions and 2 deletions

View File

@ -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) static int ql_wait_mbx_cmd_cmplt(struct ql_adapter *qdev)
{ {
int count = 50; /* TODO: arbitrary for now. */ int count = 100;
u32 value; u32 value;
do { do {
value = ql_read32(qdev, STS); value = ql_read32(qdev, STS);
if (value & STS_PI) if (value & STS_PI)
return 0; return 0;
udelay(UDELAY_DELAY); /* 10us */ mdelay(UDELAY_DELAY); /* 100ms */
} while (--count); } while (--count);
return -ETIMEDOUT; return -ETIMEDOUT;
} }