Commit 0f77ca92 authored by Ron Mercer's avatar Ron Mercer Committed by David S. Miller

qla3xxx: Don't sleep while holding lock.

Signed-off-by: default avatarRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5a67374
...@@ -3142,6 +3142,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev) ...@@ -3142,6 +3142,7 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
(void __iomem *)port_regs; (void __iomem *)port_regs;
u32 delay = 10; u32 delay = 10;
int status = 0; int status = 0;
unsigned long hw_flags = 0;
if(ql_mii_setup(qdev)) if(ql_mii_setup(qdev))
return -1; return -1;
...@@ -3351,7 +3352,9 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev) ...@@ -3351,7 +3352,9 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
value = ql_read_page0_reg(qdev, &port_regs->portStatus); value = ql_read_page0_reg(qdev, &port_regs->portStatus);
if (value & PORT_STATUS_IC) if (value & PORT_STATUS_IC)
break; break;
spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
msleep(500); msleep(500);
spin_lock_irqsave(&qdev->hw_lock, hw_flags);
} while (--delay); } while (--delay);
if (delay == 0) { if (delay == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment