aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_init.c
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-06-21 23:18:59 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-23 16:16:29 -0400
commit900c6cfffac668199aaa30a20e31d07602f8a8ce (patch)
tree237835d27c55be1e80dc3d3bc2213684a1bd70ca /drivers/net/qlcnic/qlcnic_init.c
parent9665982885f0e11ea9e3c5d9bfc7ead48d08c83f (diff)
qlcnic: handshake with card after fw load
Instead of delaying rcv handshake till interface comes up, do it just after fw load. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_init.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 1c3d5a90d21a..d19d0120e5b8 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -1138,7 +1138,7 @@ qlcnic_release_firmware(struct qlcnic_adapter *adapter)
1138 adapter->fw = NULL; 1138 adapter->fw = NULL;
1139} 1139}
1140 1140
1141int qlcnic_phantom_init(struct qlcnic_adapter *adapter) 1141static int qlcnic_cmd_peg_ready(struct qlcnic_adapter *adapter)
1142{ 1142{
1143 u32 val; 1143 u32 val;
1144 int retries = 60; 1144 int retries = 60;
@@ -1163,7 +1163,8 @@ int qlcnic_phantom_init(struct qlcnic_adapter *adapter)
1163 QLCWR32(adapter, CRB_CMDPEG_STATE, PHAN_INITIALIZE_FAILED); 1163 QLCWR32(adapter, CRB_CMDPEG_STATE, PHAN_INITIALIZE_FAILED);
1164 1164
1165out_err: 1165out_err:
1166 dev_err(&adapter->pdev->dev, "firmware init failed\n"); 1166 dev_err(&adapter->pdev->dev, "Command Peg initialization not "
1167 "complete, state: 0x%x.\n", val);
1167 return -EIO; 1168 return -EIO;
1168} 1169}
1169 1170
@@ -1196,6 +1197,10 @@ int qlcnic_init_firmware(struct qlcnic_adapter *adapter)
1196{ 1197{
1197 int err; 1198 int err;
1198 1199
1200 err = qlcnic_cmd_peg_ready(adapter);
1201 if (err)
1202 return err;
1203
1199 err = qlcnic_receive_peg_ready(adapter); 1204 err = qlcnic_receive_peg_ready(adapter);
1200 if (err) 1205 if (err)
1201 return err; 1206 return err;