Skip to content

Commit 65df7d1

Browse files
Viswas Gmartinkpetersen
authored andcommitted
scsi: pm80xx: Fix chip initialization failure
Inbound and outbound queues were not properly configured and that lead to MPI configuration failure. Fixes: 05c6c02 ("scsi: pm80xx: Increase number of supported queues") Cc: [email protected] # 5.10+ Link: https://lore.kernel.org/r/[email protected] Reported-and-tested-by: Ash Izat <[email protected]> Signed-off-by: Viswas G <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 4b42d55 commit 65df7d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/scsi/pm8001/pm8001_hwi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
223223
PM8001_EVENT_LOG_SIZE;
224224
pm8001_ha->main_cfg_tbl.pm8001_tbl.iop_event_log_option = 0x01;
225225
pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_interrupt = 0x01;
226-
for (i = 0; i < PM8001_MAX_INB_NUM; i++) {
226+
for (i = 0; i < pm8001_ha->max_q_num; i++) {
227227
pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt =
228228
PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x00<<30);
229229
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)
249249
pm8001_ha->inbnd_q_tbl[i].producer_idx = 0;
250250
pm8001_ha->inbnd_q_tbl[i].consumer_index = 0;
251251
}
252-
for (i = 0; i < PM8001_MAX_OUTB_NUM; i++) {
252+
for (i = 0; i < pm8001_ha->max_q_num; i++) {
253253
pm8001_ha->outbnd_q_tbl[i].element_size_cnt =
254254
PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x01<<30);
255255
pm8001_ha->outbnd_q_tbl[i].upper_base_addr =
@@ -671,9 +671,9 @@ static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha)
671671
read_outbnd_queue_table(pm8001_ha);
672672
/* update main config table ,inbound table and outbound table */
673673
update_main_config_table(pm8001_ha);
674-
for (i = 0; i < PM8001_MAX_INB_NUM; i++)
674+
for (i = 0; i < pm8001_ha->max_q_num; i++)
675675
update_inbnd_queue_table(pm8001_ha, i);
676-
for (i = 0; i < PM8001_MAX_OUTB_NUM; i++)
676+
for (i = 0; i < pm8001_ha->max_q_num; i++)
677677
update_outbnd_queue_table(pm8001_ha, i);
678678
/* 8081 controller donot require these operations */
679679
if (deviceid != 0x8081 && deviceid != 0x0042) {

0 commit comments

Comments
 (0)