diff mbox series

[1/2] scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check()

Message ID 20210329183639.1674307-2-ipylypiv@google.com
State Superseded
Headers show
Series pm80xx mpi_uninit_check() fixes | expand

Commit Message

Igor Pylypiv March 29, 2021, 6:36 p.m. UTC
The mpi_uninit_check() takes longer for inbound doorbell register to be
cleared. Increased the timeout substantially so that the driver does not
fail to load.

Previously, the inbound doorbell wait time was mistakenly increased in
the mpi_init_check() instead of the mpi_uninit_check(). It is okay to
leave the mpi_init_check() wait time as is as these are timeout values
and if there is a failure, waiting longer is not an issue.

Fixes: e90e236250e9 ("scsi: pm80xx: Increase timeout for pm80xx
mpi_uninit_check")
Reviewed-by: Vishakha Channapattan <vishakhavc@google.com>
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
---
 drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jinpu Wang April 6, 2021, 8:14 a.m. UTC | #1
On Mon, Mar 29, 2021 at 8:37 PM Igor Pylypiv <ipylypiv@google.com> wrote:
>

> The mpi_uninit_check() takes longer for inbound doorbell register to be

> cleared. Increased the timeout substantially so that the driver does not

> fail to load.

>

> Previously, the inbound doorbell wait time was mistakenly increased in

> the mpi_init_check() instead of the mpi_uninit_check(). It is okay to

> leave the mpi_init_check() wait time as is as these are timeout values

> and if there is a failure, waiting longer is not an issue.

>

> Fixes: e90e236250e9 ("scsi: pm80xx: Increase timeout for pm80xx

> mpi_uninit_check")

> Reviewed-by: Vishakha Channapattan <vishakhavc@google.com>

> Signed-off-by: Igor Pylypiv <ipylypiv@google.com>

looks ok to me!
Acked-by: Jack Wang <jinpu.wang@ionos.com>

> ---

>  drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

>

> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c

> index 84315560e8e1..a6f65666c98e 100644

> --- a/drivers/scsi/pm8001/pm80xx_hwi.c

> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c

> @@ -1502,9 +1502,9 @@ static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha)

>

>         /* wait until Inbound DoorBell Clear Register toggled */

>         if (IS_SPCV_12G(pm8001_ha->pdev)) {

> -               max_wait_count = 4 * 1000 * 1000;/* 4 sec */

> +               max_wait_count = (30 * 1000 * 1000) /* 30 sec */

>         } else {

> -               max_wait_count = 2 * 1000 * 1000;/* 2 sec */

> +               max_wait_count = (15 * 1000 * 1000) /* 15 sec */

>         }

>         do {

>                 udelay(1);

> --

> 2.31.0.291.g576ba9dcdaf-goog

>
Igor Pylypiv April 6, 2021, 7:01 p.m. UTC | #2
On Tue, Apr 6, 2021 at 1:14 AM Jinpu Wang <jinpu.wang@ionos.com> wrote:
>

> On Mon, Mar 29, 2021 at 8:37 PM Igor Pylypiv <ipylypiv@google.com> wrote:

> >

> > The mpi_uninit_check() takes longer for inbound doorbell register to be

> > cleared. Increased the timeout substantially so that the driver does not

> > fail to load.

> >

> > Previously, the inbound doorbell wait time was mistakenly increased in

> > the mpi_init_check() instead of the mpi_uninit_check(). It is okay to

> > leave the mpi_init_check() wait time as is as these are timeout values

> > and if there is a failure, waiting longer is not an issue.

> >

> > Fixes: e90e236250e9 ("scsi: pm80xx: Increase timeout for pm80xx

> > mpi_uninit_check")

> > Reviewed-by: Vishakha Channapattan <vishakhavc@google.com>

> > Signed-off-by: Igor Pylypiv <ipylypiv@google.com>

> looks ok to me!

> Acked-by: Jack Wang <jinpu.wang@ionos.com>

> > ---

> >  drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--

> >  1 file changed, 2 insertions(+), 2 deletions(-)

> >

> > diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c

> > index 84315560e8e1..a6f65666c98e 100644

> > --- a/drivers/scsi/pm8001/pm80xx_hwi.c

> > +++ b/drivers/scsi/pm8001/pm80xx_hwi.c

> > @@ -1502,9 +1502,9 @@ static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha)

> >

> >         /* wait until Inbound DoorBell Clear Register toggled */

> >         if (IS_SPCV_12G(pm8001_ha->pdev)) {

> > -               max_wait_count = 4 * 1000 * 1000;/* 4 sec */

> > +               max_wait_count = (30 * 1000 * 1000) /* 30 sec */

> >         } else {

> > -               max_wait_count = 2 * 1000 * 1000;/* 2 sec */

> > +               max_wait_count = (15 * 1000 * 1000) /* 15 sec */

Noticed missing semicolons. Sent v2 to fix this issue.

> >         }

> >         do {

> >                 udelay(1);

> > --

> > 2.31.0.291.g576ba9dcdaf-goog

> >
diff mbox series

Patch

diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 84315560e8e1..a6f65666c98e 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -1502,9 +1502,9 @@  static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha)
 
 	/* wait until Inbound DoorBell Clear Register toggled */
 	if (IS_SPCV_12G(pm8001_ha->pdev)) {
-		max_wait_count = 4 * 1000 * 1000;/* 4 sec */
+		max_wait_count = (30 * 1000 * 1000) /* 30 sec */
 	} else {
-		max_wait_count = 2 * 1000 * 1000;/* 2 sec */
+		max_wait_count = (15 * 1000 * 1000) /* 15 sec */
 	}
 	do {
 		udelay(1);