diff options
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index b31d1c95c9fb..577b34c93a07 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -2296,9 +2296,8 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) | |||
2296 | 2296 | ||
2297 | // copy over the request sense data if it was a check | 2297 | // copy over the request sense data if it was a check |
2298 | // condition status | 2298 | // condition status |
2299 | if(dev_status == 0x02 /*CHECK_CONDITION*/) { | 2299 | if (dev_status == 0x02 /*CHECK_CONDITION*/) { |
2300 | u32 len = sizeof(cmd->sense_buffer); | 2300 | u32 len = min(SCSI_SENSE_BUFFERSIZE, 40); |
2301 | len = (len > 40) ? 40 : len; | ||
2302 | // Copy over the sense data | 2301 | // Copy over the sense data |
2303 | memcpy_fromio(cmd->sense_buffer, (reply+28) , len); | 2302 | memcpy_fromio(cmd->sense_buffer, (reply+28) , len); |
2304 | if(cmd->sense_buffer[0] == 0x70 /* class 7 */ && | 2303 | if(cmd->sense_buffer[0] == 0x70 /* class 7 */ && |