aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 0c463c483c02..f2d967c5415e 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -2863,8 +2863,9 @@ scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, u32 reply)
2863 struct sense_info data; 2863 struct sense_info data;
2864 const void *sense_data = mpt2sas_base_get_sense_buffer(ioc, 2864 const void *sense_data = mpt2sas_base_get_sense_buffer(ioc,
2865 smid); 2865 smid);
2866 memcpy(scmd->sense_buffer, sense_data, 2866 u32 sz = min_t(u32, SCSI_SENSE_BUFFERSIZE,
2867 le32_to_cpu(mpi_reply->SenseCount)); 2867 le32_to_cpu(mpi_reply->SenseCount));
2868 memcpy(scmd->sense_buffer, sense_data, sz);
2868 _scsih_normalize_sense(scmd->sense_buffer, &data); 2869 _scsih_normalize_sense(scmd->sense_buffer, &data);
2869 /* failure prediction threshold exceeded */ 2870 /* failure prediction threshold exceeded */
2870 if (data.asc == 0x5D) 2871 if (data.asc == 0x5D)