aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qla3xxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/qla3xxx.c')
-rw-r--r--drivers/net/qla3xxx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 8a823ecc99a9..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)
3142 (void __iomem *)port_regs; 3142 (void __iomem *)port_regs;
3143 u32 delay = 10; 3143 u32 delay = 10;
3144 int status = 0; 3144 int status = 0;
3145 unsigned long hw_flags = 0;
3145 3146
3146 if(ql_mii_setup(qdev)) 3147 if(ql_mii_setup(qdev))
3147 return -1; 3148 return -1;
@@ -3150,7 +3151,8 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
3150 ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg, 3151 ql_write_common_reg(qdev, &port_regs->CommonRegs.serialPortInterfaceReg,
3151 (ISP_SERIAL_PORT_IF_WE | 3152 (ISP_SERIAL_PORT_IF_WE |
3152 (ISP_SERIAL_PORT_IF_WE << 16))); 3153 (ISP_SERIAL_PORT_IF_WE << 16)));
3153 3154 /* Give the PHY time to come out of reset. */
3155 mdelay(100);
3154 qdev->port_link_state = LS_DOWN; 3156 qdev->port_link_state = LS_DOWN;
3155 netif_carrier_off(qdev->ndev); 3157 netif_carrier_off(qdev->ndev);
3156 3158
@@ -3350,7 +3352,9 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev)
3350 value = ql_read_page0_reg(qdev, &port_regs->portStatus); 3352 value = ql_read_page0_reg(qdev, &port_regs->portStatus);
3351 if (value & PORT_STATUS_IC) 3353 if (value & PORT_STATUS_IC)
3352 break; 3354 break;
3355 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
3353 msleep(500); 3356 msleep(500);
3357 spin_lock_irqsave(&qdev->hw_lock, hw_flags);
3354 } while (--delay); 3358 } while (--delay);
3355 3359
3356 if (delay == 0) { 3360 if (delay == 0) {
@@ -3837,7 +3841,9 @@ static void ql_reset_work(struct work_struct *work)
3837 16) | ISP_CONTROL_RI)); 3841 16) | ISP_CONTROL_RI));
3838 } 3842 }
3839 3843
3844 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
3840 ssleep(1); 3845 ssleep(1);
3846 spin_lock_irqsave(&qdev->hw_lock, hw_flags);
3841 } while (--max_wait_time); 3847 } while (--max_wait_time);
3842 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags); 3848 spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);
3843 3849