hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/scsi/qla2xxx/qla_attr.c
....@@ -2698,6 +2698,7 @@
26982698 qla2x00_terminate_rport_io(struct fc_rport *rport)
26992699 {
27002700 fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
2701
+ scsi_qla_host_t *vha;
27012702
27022703 if (!fcport)
27032704 return;
....@@ -2707,9 +2708,12 @@
27072708
27082709 if (test_bit(ABORT_ISP_ACTIVE, &fcport->vha->dpc_flags))
27092710 return;
2711
+ vha = fcport->vha;
27102712
27112713 if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
27122714 qla2x00_abort_all_cmds(fcport->vha, DID_NO_CONNECT << 16);
2715
+ qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24,
2716
+ 0, WAIT_TARGET);
27132717 return;
27142718 }
27152719 /*
....@@ -2723,6 +2727,15 @@
27232727 fcport->d_id.b.area, fcport->d_id.b.al_pa);
27242728 else
27252729 qla2x00_port_logout(fcport->vha, fcport);
2730
+ }
2731
+
2732
+ /* check for any straggling io left behind */
2733
+ if (qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24, 0, WAIT_TARGET)) {
2734
+ ql_log(ql_log_warn, vha, 0x300b,
2735
+ "IO not return. Resetting. \n");
2736
+ set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
2737
+ qla2xxx_wake_dpc(vha);
2738
+ qla2x00_wait_for_chip_reset(vha);
27262739 }
27272740 }
27282741
....@@ -3015,8 +3028,6 @@
30153028 vha->flags.difdix_supported = 1;
30163029 ql_dbg(ql_dbg_user, vha, 0x7082,
30173030 "Registered for DIF/DIX type 1 and 3 protection.\n");
3018
- if (ql2xenabledif == 1)
3019
- prot = SHOST_DIX_TYPE0_PROTECTION;
30203031 scsi_host_set_prot(vha->host,
30213032 prot | SHOST_DIF_TYPE1_PROTECTION
30223033 | SHOST_DIF_TYPE2_PROTECTION