aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 169bc595648a..547e85aa414f 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -625,7 +625,7 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
625 625
626 if (sense_bytes) { 626 if (sense_bytes) {
627 scmd->request_bufflen = min_t(unsigned, 627 scmd->request_bufflen = min_t(unsigned,
628 sizeof(scmd->sense_buffer), sense_bytes); 628 SCSI_SENSE_BUFFERSIZE, sense_bytes);
629 sg_init_one(&ses->sense_sgl, scmd->sense_buffer, 629 sg_init_one(&ses->sense_sgl, scmd->sense_buffer,
630 scmd->request_bufflen); 630 scmd->request_bufflen);
631 scmd->request_buffer = &ses->sense_sgl; 631 scmd->request_buffer = &ses->sense_sgl;
@@ -657,7 +657,7 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
657 * Zero the sense buffer. The scsi spec mandates that any 657 * Zero the sense buffer. The scsi spec mandates that any
658 * untransferred sense data should be interpreted as being zero. 658 * untransferred sense data should be interpreted as being zero.
659 */ 659 */
660 memset(scmd->sense_buffer, 0, sizeof(scmd->sense_buffer)); 660 memset(scmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
661} 661}
662EXPORT_SYMBOL(scsi_eh_prep_cmnd); 662EXPORT_SYMBOL(scsi_eh_prep_cmnd);
663 663
@@ -1820,7 +1820,7 @@ int scsi_command_normalize_sense(struct scsi_cmnd *cmd,
1820 struct scsi_sense_hdr *sshdr) 1820 struct scsi_sense_hdr *sshdr)
1821{ 1821{
1822 return scsi_normalize_sense(cmd->sense_buffer, 1822 return scsi_normalize_sense(cmd->sense_buffer,
1823 sizeof(cmd->sense_buffer), sshdr); 1823 SCSI_SENSE_BUFFERSIZE, sshdr);
1824} 1824}
1825EXPORT_SYMBOL(scsi_command_normalize_sense); 1825EXPORT_SYMBOL(scsi_command_normalize_sense);
1826 1826