hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/scsi/qla2xxx/qla_mbx.c
....@@ -167,7 +167,8 @@
167167 /* check if ISP abort is active and return cmd with timeout */
168168 if ((test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) ||
169169 test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) ||
170
- test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags)) &&
170
+ test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) ||
171
+ ha->flags.eeh_busy) &&
171172 !is_rom_cmd(mcp->mb[0])) {
172173 ql_log(ql_log_info, vha, 0x1005,
173174 "Cmd 0x%x aborted with timeout since ISP Abort is pending\n",
....@@ -268,7 +269,6 @@
268269 spin_unlock_irqrestore(&ha->hardware_lock, flags);
269270
270271 wait_time = jiffies;
271
- atomic_inc(&ha->num_pend_mbx_stage3);
272272 if (!wait_for_completion_timeout(&ha->mbx_intr_comp,
273273 mcp->tov * HZ)) {
274274 ql_dbg(ql_dbg_mbx, vha, 0x117a,
....@@ -283,7 +283,6 @@
283283 spin_unlock_irqrestore(&ha->hardware_lock,
284284 flags);
285285 atomic_dec(&ha->num_pend_mbx_stage2);
286
- atomic_dec(&ha->num_pend_mbx_stage3);
287286 rval = QLA_ABORTED;
288287 goto premature_exit;
289288 }
....@@ -293,11 +292,9 @@
293292 ha->flags.mbox_busy = 0;
294293 spin_unlock_irqrestore(&ha->hardware_lock, flags);
295294 atomic_dec(&ha->num_pend_mbx_stage2);
296
- atomic_dec(&ha->num_pend_mbx_stage3);
297295 rval = QLA_ABORTED;
298296 goto premature_exit;
299297 }
300
- atomic_dec(&ha->num_pend_mbx_stage3);
301298
302299 if (time_after(jiffies, wait_time + 5 * HZ))
303300 ql_log(ql_log_warn, vha, 0x1015, "cmd=0x%x, waited %d msecs\n",