Re: [PATCH v2 08/14] nvme: Implement cross-controller reset recovery

Mohamed Khalfella
2026-02-10T22:27:40Z

On Tue 2026-02-10 14:09:27 -0800, James Smart wrote:
> On 1/30/2026 2:34 PM, Mohamed Khalfella wrote:
> ...
> > +unsigned long nvme_fence_ctrl(struct nvme_ctrl *ictrl)
> > +{
> > + unsigned long deadline, now, timeout;
> > + struct nvme_ctrl *sctrl;
> > + u32 min_cntlid = 0;
> > + int ret;
> > +
> > + timeout = nvme_fence_timeout_ms(ictrl);
> > + dev_info(ictrl->device, "attempting CCR, timeout %lums\n", timeout);
> > +
> > + now = jiffies;
> > + deadline = now + msecs_to_jiffies(timeout);
> > + while (time_before(now, deadline)) {
>
> Q: don't we have something to identify the controller's subsystem
> supports CCR before we starting selecting controllers and sending CCR ?
>
> I would think on older devices that don't support it we should be
> skipping this loop. The loop could delay the Time-Based delay without
> any CCR.

I do not think we have something that identifies CCR support at
subsystem level. The spec defines CCRL at the controller level. The loop
should not that bad. nvme_find_ctrl_ccr() should return NULL if CCR is
not supported and nvme_fence_ctrl() will return immediately.

>
> -- james
>