diff mbox series

mpt3sas: a shutdown fix

Message ID 20210624150837.9950-1-thenzl@redhat.com
State New
Headers show
Series mpt3sas: a shutdown fix | expand

Commit Message

Tomas Henzl June 24, 2021, 3:08 p.m. UTC
A driver doesn't have to to free allocated memory when in shutdown
it is enough when it quiesces itself. This patch hardens the driver
when additional commands are queued after .shutdown has been called.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sreekanth Reddy June 29, 2021, 7:37 a.m. UTC | #1
Tomas,

During shutdown, we have to move the Controller state from Operational
state to Ready state by issuing MUR (message unit reset). otherwise we
may observe firmware faults when it sends some events or interrupts
during reboot.

Shall I post the new patch with the proper fix?

Thanks,
Sreekanth


On Thu, Jun 24, 2021 at 8:38 PM Tomas Henzl <thenzl@redhat.com> wrote:
>

> A driver doesn't have to to free allocated memory when in shutdown

> it is enough when it quiesces itself. This patch hardens the driver

> when additional commands are queued after .shutdown has been called.

>

> Signed-off-by: Tomas Henzl <thenzl@redhat.com>

> ---

>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c

> index dc2aaaf645d3..1885d13005cb 100644

> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c

> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c

> @@ -11293,7 +11293,7 @@ scsih_shutdown(struct pci_dev *pdev)

>

>         _scsih_ir_shutdown(ioc);

>         _scsih_nvme_shutdown(ioc);

> -       mpt3sas_base_detach(ioc);

> +       mpt3sas_base_stop_watchdog(ioc);

>  }

>

>

> --

> 2.31.1

>
Sreekanth Reddy July 5, 2021, 4:11 p.m. UTC | #2
On Tue, Jun 29, 2021 at 1:07 PM Sreekanth Reddy
<sreekanth.reddy@broadcom.com> wrote:
>

> Tomas,

>

> During shutdown, we have to move the Controller state from Operational

> state to Ready state by issuing MUR (message unit reset). otherwise we

> may observe firmware faults when it sends some events or interrupts

> during reboot.

>

> Shall I post the new patch with the proper fix?


Tomas,

Can you please try with below patch which I have posted today,

[PATCH] mpt3sas: Move IOC state to Ready state during shutdown

Thanks,
Sreekanth


>

> Thanks,

> Sreekanth

>

>

> On Thu, Jun 24, 2021 at 8:38 PM Tomas Henzl <thenzl@redhat.com> wrote:

> >

> > A driver doesn't have to to free allocated memory when in shutdown

> > it is enough when it quiesces itself. This patch hardens the driver

> > when additional commands are queued after .shutdown has been called.

> >

> > Signed-off-by: Tomas Henzl <thenzl@redhat.com>

> > ---

> >  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> >

> > diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c

> > index dc2aaaf645d3..1885d13005cb 100644

> > --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c

> > +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c

> > @@ -11293,7 +11293,7 @@ scsih_shutdown(struct pci_dev *pdev)

> >

> >         _scsih_ir_shutdown(ioc);

> >         _scsih_nvme_shutdown(ioc);

> > -       mpt3sas_base_detach(ioc);

> > +       mpt3sas_base_stop_watchdog(ioc);

> >  }

> >

> >

> > --

> > 2.31.1

> >
diff mbox series

Patch

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index dc2aaaf645d3..1885d13005cb 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -11293,7 +11293,7 @@  scsih_shutdown(struct pci_dev *pdev)
 
 	_scsih_ir_shutdown(ioc);
 	_scsih_nvme_shutdown(ioc);
-	mpt3sas_base_detach(ioc);
+	mpt3sas_base_stop_watchdog(ioc);
 }