Skip to content

Commit f762326

Browse files
Sathya Prakashmartinkpetersen
authored andcommitted
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: 506bc1a ("scsi: mpi3mr: Add support for MPT commands") Cc: <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent bc5fef0 commit f762326

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/scsi/mpi3mr/mpi3mr_fw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,11 @@ static void mpi3mr_process_admin_reply_desc(struct mpi3mr_ioc *mrioc,
402402
memcpy((u8 *)cmdptr->reply, (u8 *)def_reply,
403403
mrioc->reply_sz);
404404
}
405+
if (sense_buf && cmdptr->sensebuf) {
406+
cmdptr->is_sense = 1;
407+
memcpy(cmdptr->sensebuf, sense_buf,
408+
MPI3MR_SENSE_BUF_SZ);
409+
}
405410
if (cmdptr->is_waiting) {
406411
complete(&cmdptr->done);
407412
cmdptr->is_waiting = 0;

0 commit comments

Comments
 (0)