Re: [PATCH] scsi: ufs: rpmb: Return -EIO instead of SCSI result on failure

From: Martin K. Petersen

Date: Sun Nov 29 2026 - 16:26:39 EST



> rpmb_route_frames() is documented to return a negative errno on
> failure, but ufs_sec_submit() returns the value of scsi_execute_cmd()
> as is. When a SECURITY PROTOCOL IN/OUT command fails, that value is a
> positive SCSI result such as SAM_STAT_CHECK_CONDITION or DID_ERROR <<
> 16. ufs_rpmb_route_frames() passes it up and logs it as "ret=%d".
> Since scsi_execute_cmd() sets RQF_QUIET, the sense data is not logged
> anywhere.

Applied to 7.5/scsi-staging, thanks!

--
Martin K. Petersen