All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] pm80xx: Fix chip initialization failure
@ 2021-04-02  5:42 Viswas G
  2021-04-06  4:52 ` Martin K. Petersen
  0 siblings, 1 reply; 3+ messages in thread
From: Viswas G @ 2021-04-02  5:42 UTC (permalink / raw)
  To: linux-scsi
  Cc: Vasanthalakshmi.Tharmarajan, Viswas.G, Jinpu Wang, Ash Izat,
	stable, Martin K . Petersen

From: Viswas G <Viswas.G@microchip.com>

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

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

Cc: stable@vger.kernel.org # 5.10+

Reported-and-tested-by: Ash Izat <ash@ai0.uk>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
---
 drivers/scsi/pm8001/pm8001_hwi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 49bf2f70a470..31e5455d280c 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -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) {
-- 
2.16.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] pm80xx: Fix chip initialization failure
  2021-04-02  5:42 [PATCH 1/1] pm80xx: Fix chip initialization failure Viswas G
@ 2021-04-06  4:52 ` Martin K. Petersen
  2021-04-06  5:26   ` Jinpu Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Martin K. Petersen @ 2021-04-06  4:52 UTC (permalink / raw)
  To: Viswas G, linux-scsi
  Cc: Martin K . Petersen, Viswas.G, Vasanthalakshmi.Tharmarajan,
	Ash Izat, Jinpu Wang, stable

On Fri, 2 Apr 2021 11:12:12 +0530, Viswas G wrote:

> Inbound and outbound queues are not properly configured and
> that leads to MPI configuration failure.
> 
> Fixes: 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")
> 
> Cc: stable@vger.kernel.org # 5.10+

Applied to 5.12/scsi-fixes, thanks!

[1/1] pm80xx: Fix chip initialization failure
      https://git.kernel.org/mkp/scsi/c/65df7d1986a1

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] pm80xx: Fix chip initialization failure
  2021-04-06  4:52 ` Martin K. Petersen
@ 2021-04-06  5:26   ` Jinpu Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Jinpu Wang @ 2021-04-06  5:26 UTC (permalink / raw)
  To: Martin K. Petersen, Viswas G
  Cc: Linux SCSI Mailinglist, Viswas G, Vasanthalakshmi.Tharmarajan,
	Ash Izat, Jinpu Wang, stable

On Tue, Apr 6, 2021 at 6:52 AM Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>
> On Fri, 2 Apr 2021 11:12:12 +0530, Viswas G wrote:
>
> > Inbound and outbound queues are not properly configured and
> > that leads to MPI configuration failure.
> >
> > Fixes: 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")
> >
> > Cc: stable@vger.kernel.org # 5.10+
>
> Applied to 5.12/scsi-fixes, thanks!

Thanks for taking care of this.

Regards!
>
> [1/1] pm80xx: Fix chip initialization failure
>       https://git.kernel.org/mkp/scsi/c/65df7d1986a1
>
> --
> Martin K. Petersen      Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-06  5:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02  5:42 [PATCH 1/1] pm80xx: Fix chip initialization failure Viswas G
2021-04-06  4:52 ` Martin K. Petersen
2021-04-06  5:26   ` Jinpu Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.