On Wed, 23 Sep 2026 11:03:01 +0900, Jeuk Kim <[email protected]> wrote:
> +                if (req) {
> +                    ufs_clear_req(req);
> +                    req->state = UFS_REQUEST_IDLE;
> +                    if (ufs_mcq_req(req)) {
> + QTAILQ_INSERT_TAIL(&req->sq->req_list, req, entry);

A successful UFS_ABORT_TASK does not complete MCQ host-side cleanup.
The host driver will next issue SQRTCy.ICU, which must post an OCS = ABORTED CQE.
Please do not clear and recycle the request before that cleanup completes.

Agreed. In v3, `UFS_ABORT_TASK` in MCQ mode cancels the underlying
`SCSIRequest` and marks the request `UFS_REQUEST_ERROR`, deferring CQE
posting (`OCS = UFS_OCS_ABORTED`) and slot recycling to `SQRTC.ICU`.

>      case A_UTMRLCLR:
> +        u->reg.utmrldbr &= ~data;

UTMRLCLR is clear-on-zero, so this has the polarity backwards: zero clears the
corresponding UTMRLDBR bit and one leaves it unchanged.  This should be
`u->reg.utmrldbr &= data`.

Fixed in v3.

Reply via email to