[PATCHv2] nvme-pci: do not directly handle subsys reset fallout
Keith Busch
kbusch at kernel.org
Tue Jun 25 09:02:39 PDT 2024
On Tue, Jun 25, 2024 at 03:32:59PM +0530, Nilay Shroff wrote:
> On 6/24/24 22:56, Keith Busch wrote:
> > + }
> > +
> > + writel(NVME_SUBSYS_RESET, dev->bar + NVME_REG_NSSR);
> > +
> > + /*
> > + * Read controller status to flush the previous write and trigger a
> > + * pcie read error.
> > + */
> > + readl(dev->bar + NVME_REG_CSTS);
> > +unlock:
> > + mutex_unlock(&dev->shutdown_lock);
> > + return ret;
> > +}
> I noticed that in your earlier proposal we were changing the NVMe controller
> state from RESETTING to LIVE just after write to NVME_REG_NSSR. In this patch,
> you removed that code and due to it now pci error recovery code (nvme_error_detected())
> couldn't change the state of controller to RESETTING and that causes the pci error
> recovery to immediately bail out without recovering the NVMe adapter.
>
> I think we need to change state of controller to LIVE after write to NVME_REG_NSSR.
> So was there any specific reason you removed that code or was it missed out by mistake?
Thanks for the catch, that was unintentional. I'll back it out and
submit with the correct state transition.
More information about the Linux-nvme
mailing list