[SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE

This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in
several LLDs. It's a preparation for the future changes to remove
sense_buffer array in scsi_cmnd structure.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
FUJITA Tomonori
2008-01-13 15:46:13 +09:00
committed by James Bottomley
parent 94aa5e5f62
commit b80ca4f7ee
28 changed files with 90 additions and 97 deletions

View File

@@ -2296,9 +2296,8 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
// copy over the request sense data if it was a check
// condition status
if(dev_status == 0x02 /*CHECK_CONDITION*/) {
u32 len = sizeof(cmd->sense_buffer);
len = (len > 40) ? 40 : len;
if (dev_status == 0x02 /*CHECK_CONDITION*/) {
u32 len = min(SCSI_SENSE_BUFFERSIZE, 40);
// Copy over the sense data
memcpy_fromio(cmd->sense_buffer, (reply+28) , len);
if(cmd->sense_buffer[0] == 0x70 /* class 7 */ &&