diff mbox series

scsi: qla2xxx: restore initiator in dual mode

Message ID 20210915153239.8035-1-d.bogdanov@yadro.com
State New
Headers show
Series scsi: qla2xxx: restore initiator in dual mode | expand

Commit Message

Dmitry Bogdanov Sept. 15, 2021, 3:32 p.m. UTC
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")
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
---
This patchset is intended for scsi-fix.
---
 drivers/scsi/qla2xxx/qla_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Martin K. Petersen Sept. 22, 2021, 4:44 a.m. UTC | #1
On Wed, 15 Sep 2021 18:32:39 +0300, Dmitry Bogdanov wrote:

> 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

-- 
Martin K. Petersen	Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 1e4e3e83b5c7..5fc7697f0af4 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -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: