]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/dpt_i2o.c
ipw2200: do not byteswap struct ipw_associate
[linux-2.6-omap-h63xx.git] / drivers / scsi / dpt_i2o.c
index b31d1c95c9fbd4d1a16c04856e088a54411801d5..19cce125124c8d423fc9cd500175f2b70bd9e7ce 100644 (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 == SAM_STAT_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 */ &&