]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/dpt_i2o.c
KVM: Portability: MMU initialization and teardown split
[linux-2.6-omap-h63xx.git] / drivers / scsi / dpt_i2o.c
index 70f48a1a6d588fe0dc11530fa7d3383bc5cc8e37..19cce125124c8d423fc9cd500175f2b70bd9e7ce 100644 (file)
@@ -906,8 +906,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
        }
 
        pci_set_master(pDev);
-       if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) &&
-           pci_set_dma_mask(pDev, DMA_32BIT_MASK))
+       if (pci_set_dma_mask(pDev, DMA_32BIT_MASK))
                return -EINVAL;
 
        base_addr0_phys = pci_resource_start(pDev,0);
@@ -2297,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 */ &&