Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: core: Fix error return with query response

There is currently no mechanism to return error from query responses.
Return the error and print the corresponding error message with it.

Signed-off-by: Seunghui Lee <sh043.lee@samsung.com>
Link: https://lore.kernel.org/r/20250118023808.24726-1-sh043.lee@samsung.com
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Seunghui Lee and committed by
Martin K. Petersen
1a78a56e 87c4b5e8

+6 -1
+6 -1
drivers/ufs/core/ufshcd.c
··· 3104 3104 case UPIU_TRANSACTION_QUERY_RSP: { 3105 3105 u8 response = lrbp->ucd_rsp_ptr->header.response; 3106 3106 3107 - if (response == 0) 3107 + if (response == 0) { 3108 3108 err = ufshcd_copy_query_response(hba, lrbp); 3109 + } else { 3110 + err = -EINVAL; 3111 + dev_err(hba->dev, "%s: unexpected response in Query RSP: %x\n", 3112 + __func__, response); 3113 + } 3109 3114 break; 3110 3115 } 3111 3116 case UPIU_TRANSACTION_REJECT_UPIU: