[PATCH] nvme: requeue aen after firmware activation
Keith Busch
kbusch at kernel.org
Tue Sep 6 08:09:12 PDT 2022
On Mon, Sep 05, 2022 at 12:10:24PM +0300, Sagi Grimberg wrote:
>
>
> On 9/1/22 18:30, Keith Busch wrote:
> > From: Keith Busch <kbusch at kernel.org>
> >
> > The driver prevents async event work while handling a processing paused
> > event, but someone needs to restart it after the controller returns to a
> > live state.
> >
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=216400
> > Signed-off-by: Keith Busch <kbusch at kernel.org>
> > ---
> > drivers/nvme/host/core.c | 14 +++++++++++---
> > 1 file changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> > index af367b22871b..66446f1e06cf 100644
> > --- a/drivers/nvme/host/core.c
> > +++ b/drivers/nvme/host/core.c
> > @@ -4703,6 +4703,8 @@ static void nvme_fw_act_work(struct work_struct *work)
> > nvme_start_queues(ctrl);
> > /* read FW slot information to clear the AER */
> > nvme_get_fw_slot_info(ctrl);
> > +
> > + queue_work(nvme_wq, &ctrl->async_event_work);
>
> Why is the rest below needed? why is this not enough? Also a code
> comment would help here...
We can only allow one thread to queue the work because no one is tracking
outstanding command id's on AEN commands. If nvme_fw_act_work needs to take
responsibility to restart the async_event_work, then we can't let the previous
handler also attempt to requeue it.
More information about the Linux-nvme
mailing list