aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge_mpi.c
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-06-07 09:58:29 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-08 03:09:48 -0400
commit365da8722d9df54efb8212bf82a87d816c522845 (patch)
tree903484855714808c82ad38baae6dc0240502089b /drivers/net/qlge/qlge_mpi.c
parentd2ba498668cb9f18677dd150b23f754953dc1fda (diff)
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>
Diffstat (limited to 'drivers/net/qlge/qlge_mpi.c')
-rw-r--r--drivers/net/qlge/qlge_mpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index de96b8a7c373..3bd60a4f5d71 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -90,14 +90,14 @@ static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp)
90 */ 90 */
91static int ql_wait_mbx_cmd_cmplt(struct ql_adapter *qdev) 91static int ql_wait_mbx_cmd_cmplt(struct ql_adapter *qdev)
92{ 92{
93 int count = 50; /* TODO: arbitrary for now. */ 93 int count = 100;
94 u32 value; 94 u32 value;
95 95
96 do { 96 do {
97 value = ql_read32(qdev, STS); 97 value = ql_read32(qdev, STS);
98 if (value & STS_PI) 98 if (value & STS_PI)
99 return 0; 99 return 0;
100 udelay(UDELAY_DELAY); /* 10us */ 100 mdelay(UDELAY_DELAY); /* 100ms */
101 } while (--count); 101 } while (--count);
102 return -ETIMEDOUT; 102 return -ETIMEDOUT;
103} 103}