[PATCH 1/1] nvme: disable CC.CRIME (NVME_CC_CRIME)
Keith Busch
kbusch at kernel.org
Mon Oct 7 08:05:44 PDT 2024
On Mon, Oct 07, 2024 at 09:59:58AM -0500, gjoyce at linux.ibm.com wrote:
> @@ -2458,8 +2458,13 @@ int nvme_enable_ctrl(struct nvme_ctrl *ctrl)
> else
> ctrl->ctrl_config = NVME_CC_CSS_NVM;
>
> - if (ctrl->cap & NVME_CAP_CRMS_CRWMS && ctrl->cap & NVME_CAP_CRMS_CRIMS)
> - ctrl->ctrl_config |= NVME_CC_CRIME;
> + /*
> + * Setting CRIME results in CSTS.RDY before the media is ready. This
> + * make it possible for media related commands to return the error
> + * NVME_SC_ADMIN_COMMAND_MEDIA_NOT_READY. Until the driver is
> + * structured to handle retries, disable CC.CRIME.
> + */
> + ctrl->ctrl_config &= ~NVME_CC_CRIME;
A little further down in this function, there's a check from CC_CRIME to
know which ready timeout value to use. You can remove that check with
this change.
More information about the Linux-nvme
mailing list