diff options
author | Sathya Prakash <sathya.prakash@broadcom.com> | 2023-05-31 20:40:25 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-06-01 02:29:59 +0200 |
commit | f762326b2baa86ae647e2ba6832bc87e238f68ad (patch) | |
tree | 26c0100e57f428db0fb3ab6624d9674e9a211d08 /drivers/scsi/mpi3mr | |
parent | Merge patch series "ufs: core: mcq: Add ufshcd_abort() and error handler supp... (diff) | |
download | linux-f762326b2baa86ae647e2ba6832bc87e238f68ad.tar.xz linux-f762326b2baa86ae647e2ba6832bc87e238f68ad.zip |
scsi: mpi3mr: Propagate sense data for admin queue SCSI I/O
Copy the sense data to internal driver buffer when the firmware completes
any SCSI I/O command sent through admin queue with sense data for further
use.
Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands")
Cc: <stable@vger.kernel.org>
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Link: https://lore.kernel.org/r/20230531184025.3803-1-sumit.saxena@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpi3mr')
-rw-r--r-- | drivers/scsi/mpi3mr/mpi3mr_fw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 9b56d13821c6..5fa07d6ee5b8 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -402,6 +402,11 @@ static void mpi3mr_process_admin_reply_desc(struct mpi3mr_ioc *mrioc, memcpy((u8 *)cmdptr->reply, (u8 *)def_reply, mrioc->reply_sz); } + if (sense_buf && cmdptr->sensebuf) { + cmdptr->is_sense = 1; + memcpy(cmdptr->sensebuf, sense_buf, + MPI3MR_SENSE_BUF_SZ); + } if (cmdptr->is_waiting) { complete(&cmdptr->done); cmdptr->is_waiting = 0; |