diff options
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_init.c | 9 |
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 | ||
1141 | int qlcnic_phantom_init(struct qlcnic_adapter *adapter) | 1141 | static 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 | ||
1165 | out_err: | 1165 | out_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; |