mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
qla3xxx: Don't sleep while holding lock.
Signed-off-by: Ron Mercer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e5a673742e
commit
0f77ca928b
1 changed files with 3 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue