Commit f762326b authored by Sathya Prakash's avatar Sathya Prakash Committed by Martin K. Petersen

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: 506bc1a0 ("scsi: mpi3mr: Add support for MPT commands")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarSathya Prakash <sathya.prakash@broadcom.com>
Signed-off-by: default avatarSumit Saxena <sumit.saxena@broadcom.com>
Link: https://lore.kernel.org/r/20230531184025.3803-1-sumit.saxena@broadcom.comSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bc5fef01
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment