Skip to contentSkip to conversation

scsi: qla2xxx: fix mailbox direction flags in qla2xxx_get_adapter_id()

PATCH Applied Ewan D. Milne 4 participants 5 messages Nov 8, 2021 – Nov 19, 2021

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

PATCH 1/1 scsi: qla2xxx: fix mailbox direction flags in qla2xxx_get_adapter_id()

The SCM changes set the flags in mcp->out_mb instead of mcp->in_mb so the data was not actually being read into the mcp->mb[] array from the adapter.

Fixes 9f2475fe7406 ("scsi: qla2xxx: SAN congestion management implementation")
---
 drivers/scsi/qla2xxx/qla_mbx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_mbx.c +2 -4
index 7811c4952035..a6debeea3079 100644
@@ -1695,10 +1695,8 @@ qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa,
 		mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10;
 	if (IS_FWI2_CAPABLE(vha->hw))
 		mcp->in_mb |= MBX_19|MBX_18|MBX_17|MBX_16;
-	if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw)) {
-		mcp->in_mb |= MBX_15;
-		mcp->out_mb |= MBX_7|MBX_21|MBX_22|MBX_23;
-	}
+	if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw))
+		mcp->in_mb |= MBX_15|MBX_21|MBX_22|MBX_23;
 
 	mcp->tov = MBX_TOV_SECONDS;
 	mcp->flags = 0;
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Ewan D. Milne

The SCM changes set the flags in mcp->out_mb instead of mcp->in_mb so the data was not actually being read into the mcp->mb[] array from the adapter.

Fixes 9f2475fe7406 ("scsi: qla2xxx: SAN congestion management implementation")
---
  drivers/scsi/qla2xxx/qla_mbx.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_mbx.c +0 -0
index 7811c4952035..a6debeea3079 100644
@@ -1695,10 +1695,8 @@ qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa,
  		mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10;
  	if (IS_FWI2_CAPABLE(vha->hw))

drivers/scsi/qla2xxx/qla_mbx.c qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa, · line 1702

Quoted 10 lines
drivers/scsi/qla2xxx/qla_mbx.c +2 -4
  		mcp->in_mb |= MBX_19|MBX_18|MBX_17|MBX_16;
-	if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw)) {
-		mcp->in_mb |= MBX_15;
-		mcp->out_mb |= MBX_7|MBX_21|MBX_22|MBX_23;
-	}
+	if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw))
+		mcp->in_mb |= MBX_15|MBX_21|MBX_22|MBX_23;
 
  	mcp->tov = MBX_TOV_SECONDS;
  	mcp->flags = 0;
Signature · 1 line
Himanshu Madhani                                Oracle Linux Engineering
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ewan D. Milne

Looks good. Thanks Ewan.

Regards,
-Arun

Quoted 30 lines · Ewan D. Milne

The SCM changes set the flags in mcp->out_mb instead of mcp->in_mb so the data was not actually being read into the mcp->mb[] array from the adapter.

Fixes 9f2475fe7406 ("scsi: qla2xxx: SAN congestion management implementation")
---
 drivers/scsi/qla2xxx/qla_mbx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_mbx.c +2 -4
index 7811c4952035..a6debeea3079 100644
@@ -1695,10 +1695,8 @@ qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa,
 		mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10;
 	if (IS_FWI2_CAPABLE(vha->hw))
 		mcp->in_mb |= MBX_19|MBX_18|MBX_17|MBX_16;
-	if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw)) {
-		mcp->in_mb |= MBX_15;
-		mcp->out_mb |= MBX_7|MBX_21|MBX_22|MBX_23;
-	}
+	if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw))
+		mcp->in_mb |= MBX_15|MBX_21|MBX_22|MBX_23;
 
 	mcp->tov = MBX_TOV_SECONDS;
 	mcp->flags = 0;
#3 lore raw
In reply to Ewan D. Milne

Ewan,

Quoted 3 lines

The SCM changes set the flags in mcp->out_mb instead of mcp->in_mb so the data was not actually being read into the mcp->mb[] array from the adapter.

Applied to 5.16/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering