[PATCH] nvme/pci: Remove watchdog timer
Keith Busch
keith.busch at intel.com
Wed May 31 09:21:50 PDT 2017
On Tue, May 30, 2017 at 02:53:28PM +0300, Sagi Grimberg wrote:
>
> > static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
> > {
> > struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
> > @@ -957,6 +1001,17 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
> > struct nvme_dev *dev = nvmeq->dev;
> > struct request *abort_req;
> > struct nvme_command cmd;
> > + u32 csts = readl(dev->bar + NVME_REG_CSTS);
> > +
> > + /*
> > + * Reset immediately if the controller is failed
> > + */
> > + if (nvme_should_reset(dev, readl(dev->bar + NVME_REG_CSTS))) {
> > + nvme_warn_reset(dev, csts);
> > + nvme_dev_disable(dev, false);
>
> Why the nvme_dev_disable here? its going to happen in reset_work..
Not if the reset work is already running or we are trying to remove the
device. We have to disable inline with the timeout work to make sure we
reclaim the timed out command.
Back in the day, we needed reset_work to do the disable when blk-mq's
timeout handler ran in soft-irq context, but that part of reset_work.
This patch should obviate the need for reset_work to ever disable the
controller.
More information about the Linux-nvme
mailing list