From: Ron Mercer Date: Tue, 23 Jun 2009 09:00:02 +0000 (+0000) Subject: qla3xxx: Don't sleep while holding lock. X-Git-Tag: firefly_0821_release~13604^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0f77ca928b5d1ea17afc7a95682b6534611a719c;p=firefly-linux-kernel-4.4.55.git qla3xxx: Don't sleep while holding lock. Signed-off-by: Ron Mercer Signed-off-by: David S. Miller --- diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 68be714d356f..3e4b67aaa6ea 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) {