Skip to contentSkip to conversation

pm80xx: Fix chip initialization failure

PATCH Applied Viswas G 3 participants 3 messages Apr 2, 2021 – Apr 6, 2021

Subsystems (3)
lore
Share & tools
lore

Viswas G

author
#0 lore raw

PATCH 1/1 pm80xx: Fix chip initialization failure

From: Viswas G <[email protected]>

Inbound and outbound queues are not properly configured and that leads to MPI configuration failure.

Fixes 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")
---
 drivers/scsi/pm8001/pm8001_hwi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/pm8001/pm8001_hwi.c +4 -4
index 49bf2f70a470..31e5455d280c 100644
@@ -223,7 +223,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
 		PM8001_EVENT_LOG_SIZE;
 	pm8001_ha->main_cfg_tbl.pm8001_tbl.iop_event_log_option		= 0x01;
 	pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_interrupt		= 0x01;
-	for (i = 0; i < PM8001_MAX_INB_NUM; i++) {
+	for (i = 0; i < pm8001_ha->max_q_num; i++) {
 		pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt	=
 			PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x00<<30);
 		pm8001_ha->inbnd_q_tbl[i].upper_base_addr	=
@@ -249,7 +249,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
 		pm8001_ha->inbnd_q_tbl[i].producer_idx		= 0;
 		pm8001_ha->inbnd_q_tbl[i].consumer_index	= 0;
 	}
-	for (i = 0; i < PM8001_MAX_OUTB_NUM; i++) {
+	for (i = 0; i < pm8001_ha->max_q_num; i++) {
 		pm8001_ha->outbnd_q_tbl[i].element_size_cnt	=
 			PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x01<<30);
 		pm8001_ha->outbnd_q_tbl[i].upper_base_addr	=
@@ -671,9 +671,9 @@ static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha)
 	read_outbnd_queue_table(pm8001_ha);
 	/* update main config table ,inbound table and outbound table */
 	update_main_config_table(pm8001_ha);
-	for (i = 0; i < PM8001_MAX_INB_NUM; i++)
+	for (i = 0; i < pm8001_ha->max_q_num; i++)
 		update_inbnd_queue_table(pm8001_ha, i);
-	for (i = 0; i < PM8001_MAX_OUTB_NUM; i++)
+	for (i = 0; i < pm8001_ha->max_q_num; i++)
 		update_outbnd_queue_table(pm8001_ha, i);
 	/* 8081 controller donot require these operations */
 	if (deviceid != 0x8081 && deviceid != 0x0042) {
Signature · 1 line
2.16.3
#1 lore raw
Quoted 6 lines · Viswas G

Inbound and outbound queues are not properly configured and that leads to MPI configuration failure.

Fixes 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")

Applied to 5.12/scsi-fixes, thanks!

[1/1] pm80xx: Fix chip initialization failure

      https://git.kernel.org/mkp/scsi/c/65df7d1986a1
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#2 lore raw
Quoted 11 lines · Martin K. Petersen
Quoted 6 lines · Viswas G

Inbound and outbound queues are not properly configured and that leads to MPI configuration failure.

Fixes 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")

Applied to 5.12/scsi-fixes, thanks!

Thanks for taking care of this.

Regards!

Quoted 6 lines

[1/1] pm80xx: Fix chip initialization failure

      https://git.kernel.org/mkp/scsi/c/65df7d1986a1

--
Martin K. Petersen Oracle Linux Engineering