Skip to contentSkip to conversation

scsi: qla2xxx: restore initiator in dual mode

PATCH Applied Dmitry Bogdanov 3 participants 3 messages Sep 15, 2021 – Sep 22, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: qla2xxx: restore initiator in dual mode

In dual mode in case of disabling the target, the whole port goes offline and Initiator is turned off too.

This patch fixes restoring Initiator mode after disabling Target in dual mode.

Fixes 0645cb8350cd ("scsi: qla2xxx: Add mode control for each physical port")

---
This patchset is intended for scsi-fix.

---
 drivers/scsi/qla2xxx/qla_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_init.c +2 -1
index 1e4e3e83b5c7..5fc7697f0af4 100644
@@ -7169,7 +7169,8 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
 				return 0;
 			break;
 		case QLA2XXX_INI_MODE_DUAL:
-			if (!qla_dual_mode_enabled(vha))
+			if (!qla_dual_mode_enabled(vha) &&
+			    !qla_ini_mode_enabled(vha))
 				return 0;
 			break;
 		case QLA2XXX_INI_MODE_ENABLED:
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 34 lines · Dmitry Bogdanov

In dual mode in case of disabling the target, the whole port goes offline and Initiator is turned off too.

This patch fixes restoring Initiator mode after disabling Target in dual mode.

Fixes 0645cb8350cd ("scsi: qla2xxx: Add mode control for each physical port")

---
This patchset is intended for scsi-fix.
---
drivers/scsi/qla2xxx/qla_init.c | 3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_init.c +2 -1
index 1e4e3e83b5c7..5fc7697f0af4 100644
@@ -7169,7 +7169,8 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)
 				return 0;
 			break;
 		case QLA2XXX_INI_MODE_DUAL:
-			if (!qla_dual_mode_enabled(vha))
+			if (!qla_dual_mode_enabled(vha) &&
+			    !qla_ini_mode_enabled(vha))
 				return 0;
 			break;
 		case QLA2XXX_INI_MODE_ENABLED:
Signature · 1 line
2.25.1

Looks Good.

--
Himanshu Madhani Oracle Linux Engineering

#2 lore raw
In reply to Dmitry Bogdanov
Quoted 6 lines · Dmitry Bogdanov

In dual mode in case of disabling the target, the whole port goes offline and Initiator is turned off too.

This patch fixes restoring Initiator mode after disabling Target in dual mode.

Applied to 5.15/scsi-fixes, thanks!

[1/1] scsi: qla2xxx: restore initiator in dual mode

      https://git.kernel.org/mkp/scsi/c/5f8579038842
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering