[PATCH] NVMe: Split shutdown work

Keith Busch keith.busch at intel.com
Tue Nov 24 07:14:06 PST 2015


On Mon, Nov 23, 2015 at 11:34:48PM -0800, Christoph Hellwig wrote:
> to me.  I think I finally found the culprit, and it's this text:
> 
> "This feature shall only be issued during initialization prior to creation
>  of any I/O Submission and/or Completion Queues. The value allocated shall
>  not change between resets."
> 
> To be this doesn't indicated that it can legitimately fail. but rather
> that we must not even submit it during a reset or resume.  One more
> reason for a proper state model..

Security locked drives may reject "set feature". Some of my drives in
manufacturing mode also fail it.

I think the driver is doing the right thing after every CC.EN transition
and before IO queue creation. The spec wording sounds odd, but it wouldn't
make sense if you're not allowed to change for a reset or resume. That's
pretty much the same scenario when the driver initially probes it:
we don't know what state UEFI left it.

I'll send a new revision that makes nvme_dev_shutdown reentrant so we
don't need the awkward "queue_work + flush_work".



More information about the Linux-nvme mailing list