Re: [PATCH v7 2/2] scsi: ufs: mcq: poll OCS after sq cleanup for device management commands
From: Bart Van Assche
Date: Thu Nov 05 2026 - 23:53:46 EST
On 11/5/26 8:12 PM, Kiwoong Kim wrote:
> +static enum utp_ocs ufshcd_mcq_poll_ocs(struct ufs_hba *hba,
> + struct ufs_hw_queue *hwq,
> + struct ufshcd_lrb *lrbp)
> +{
> + ufshcd_mcq_poll_cqe_lock(hba, hwq);
> +
> + guard(spinlock_irqsave)(&hwq->cq_lock);
> + return READ_ONCE(lrbp->utr_descriptor_ptr->header.ocs);
> +}
As mentioned before, READ_ONCE() is not necessary since the OCS is read
with cq_lock held.
> means the cleanup has completed.
> The UFSHCI specification says "The host controller shall free up
Please insert a blank line before "The UFSHCI specification says" and
mention the version and section number of the UFSHCI specification.
With the above addressed, feel free to add:
Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>