All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mpt3sas: a shutdown fix
@ 2021-06-24 15:08 Tomas Henzl
  2021-06-29  7:37 ` Sreekanth Reddy
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Henzl @ 2021-06-24 15:08 UTC (permalink / raw)
  To: linux-scsi; +Cc: suganath-prabu.subramani, sreekanth.reddy

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


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

* Re: [PATCH] mpt3sas: a shutdown fix
  2021-06-24 15:08 [PATCH] mpt3sas: a shutdown fix Tomas Henzl
@ 2021-06-29  7:37 ` Sreekanth Reddy
  2021-07-05 16:11   ` Sreekanth Reddy
  0 siblings, 1 reply; 3+ messages in thread
From: Sreekanth Reddy @ 2021-06-29  7:37 UTC (permalink / raw)
  To: Tomas Henzl; +Cc: linux-scsi, Suganath Prabu Subramani

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

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
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* Re: [PATCH] mpt3sas: a shutdown fix
  2021-06-29  7:37 ` Sreekanth Reddy
@ 2021-07-05 16:11   ` Sreekanth Reddy
  0 siblings, 0 replies; 3+ messages in thread
From: Sreekanth Reddy @ 2021-07-05 16:11 UTC (permalink / raw)
  To: Tomas Henzl; +Cc: linux-scsi, Suganath Prabu Subramani

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

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
> >

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

end of thread, other threads:[~2021-07-05 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 15:08 [PATCH] mpt3sas: a shutdown fix Tomas Henzl
2021-06-29  7:37 ` Sreekanth Reddy
2021-07-05 16:11   ` Sreekanth Reddy

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.