diff options
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be_cmds.c')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 94cd77ca367a..ad3eef0beea0 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c | |||
@@ -31,7 +31,7 @@ static void be_mcc_notify(struct be_adapter *adapter) | |||
31 | struct be_queue_info *mccq = &adapter->mcc_obj.q; | 31 | struct be_queue_info *mccq = &adapter->mcc_obj.q; |
32 | u32 val = 0; | 32 | u32 val = 0; |
33 | 33 | ||
34 | if (adapter->eeh_err) | 34 | if (be_error(adapter)) |
35 | return; | 35 | return; |
36 | 36 | ||
37 | val |= mccq->id & DB_MCCQ_RING_ID_MASK; | 37 | val |= mccq->id & DB_MCCQ_RING_ID_MASK; |
@@ -263,10 +263,10 @@ static int be_mcc_wait_compl(struct be_adapter *adapter) | |||
263 | int i, num, status = 0; | 263 | int i, num, status = 0; |
264 | struct be_mcc_obj *mcc_obj = &adapter->mcc_obj; | 264 | struct be_mcc_obj *mcc_obj = &adapter->mcc_obj; |
265 | 265 | ||
266 | if (adapter->eeh_err) | ||
267 | return -EIO; | ||
268 | |||
269 | for (i = 0; i < mcc_timeout; i++) { | 266 | for (i = 0; i < mcc_timeout; i++) { |
267 | if (be_error(adapter)) | ||
268 | return -EIO; | ||
269 | |||
270 | num = be_process_mcc(adapter, &status); | 270 | num = be_process_mcc(adapter, &status); |
271 | if (num) | 271 | if (num) |
272 | be_cq_notify(adapter, mcc_obj->cq.id, | 272 | be_cq_notify(adapter, mcc_obj->cq.id, |
@@ -277,7 +277,8 @@ static int be_mcc_wait_compl(struct be_adapter *adapter) | |||
277 | udelay(100); | 277 | udelay(100); |
278 | } | 278 | } |
279 | if (i == mcc_timeout) { | 279 | if (i == mcc_timeout) { |
280 | dev_err(&adapter->pdev->dev, "mccq poll timed out\n"); | 280 | dev_err(&adapter->pdev->dev, "FW not responding\n"); |
281 | adapter->fw_timeout = true; | ||
281 | return -1; | 282 | return -1; |
282 | } | 283 | } |
283 | return status; | 284 | return status; |
@@ -295,10 +296,10 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db) | |||
295 | int msecs = 0; | 296 | int msecs = 0; |
296 | u32 ready; | 297 | u32 ready; |
297 | 298 | ||
298 | if (adapter->eeh_err) | ||
299 | return -EIO; | ||
300 | |||
301 | do { | 299 | do { |
300 | if (be_error(adapter)) | ||
301 | return -EIO; | ||
302 | |||
302 | ready = ioread32(db); | 303 | ready = ioread32(db); |
303 | if (ready == 0xffffffff) | 304 | if (ready == 0xffffffff) |
304 | return -1; | 305 | return -1; |
@@ -308,7 +309,8 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db) | |||
308 | break; | 309 | break; |
309 | 310 | ||
310 | if (msecs > 4000) { | 311 | if (msecs > 4000) { |
311 | dev_err(&adapter->pdev->dev, "mbox poll timed out\n"); | 312 | dev_err(&adapter->pdev->dev, "FW not responding\n"); |
313 | adapter->fw_timeout = true; | ||
312 | be_detect_dump_ue(adapter); | 314 | be_detect_dump_ue(adapter); |
313 | return -1; | 315 | return -1; |
314 | } | 316 | } |
@@ -546,9 +548,6 @@ int be_cmd_fw_clean(struct be_adapter *adapter) | |||
546 | u8 *wrb; | 548 | u8 *wrb; |
547 | int status; | 549 | int status; |
548 | 550 | ||
549 | if (adapter->eeh_err) | ||
550 | return -EIO; | ||
551 | |||
552 | if (mutex_lock_interruptible(&adapter->mbox_lock)) | 551 | if (mutex_lock_interruptible(&adapter->mbox_lock)) |
553 | return -1; | 552 | return -1; |
554 | 553 | ||
@@ -1012,9 +1011,6 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q, | |||
1012 | u8 subsys = 0, opcode = 0; | 1011 | u8 subsys = 0, opcode = 0; |
1013 | int status; | 1012 | int status; |
1014 | 1013 | ||
1015 | if (adapter->eeh_err) | ||
1016 | return -EIO; | ||
1017 | |||
1018 | if (mutex_lock_interruptible(&adapter->mbox_lock)) | 1014 | if (mutex_lock_interruptible(&adapter->mbox_lock)) |
1019 | return -1; | 1015 | return -1; |
1020 | 1016 | ||
@@ -1136,9 +1132,6 @@ int be_cmd_if_destroy(struct be_adapter *adapter, int interface_id, u32 domain) | |||
1136 | struct be_cmd_req_if_destroy *req; | 1132 | struct be_cmd_req_if_destroy *req; |
1137 | int status; | 1133 | int status; |
1138 | 1134 | ||
1139 | if (adapter->eeh_err) | ||
1140 | return -EIO; | ||
1141 | |||
1142 | if (interface_id == -1) | 1135 | if (interface_id == -1) |
1143 | return 0; | 1136 | return 0; |
1144 | 1137 | ||