aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-06-23 09:00:02 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-23 16:36:27 -0700
commit0f77ca928b5d1ea17afc7a95682b6534611a719c (patch)
tree3bddd6e6b4c3e26536c37b9c006153eb782e6566
parente5a673742e34eca8ecb13c3e54ceee2c268351a0 (diff)
qla3xxx: Don't sleep while holding lock.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/qla3xxx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 68be714d356..3e4b67aaa6e 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3142,6 +3142,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
(void __iomem *)port_regs;
u32 delay = 10;
int status = 0;
+ unsigned long hw_flags = 0;
if(ql_mii_setup(qdev))
return -1;
@@ -3351,7 +3352,9 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
value = ql_read_page0_reg(qdev, &port_regs->portStatus);
if (value & PORT_STATUS_IC)
break;
+ spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
msleep(500);
+ spin_lock_irqsave(&qdev->hw_lock, hw_flags);
} while (--delay);
if (delay == 0) {