]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/megaraid.c
[PATCH] libata-dev: move the CDB-intr DMA blacklisting
[linux-2.6-omap-h63xx.git] / drivers / scsi / megaraid.c
index 7144674bc8e677adae796bef8ed8a5cea0e0f323..c33857e7b33b6a669b5ff029958fc131ce084d5b 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/interrupt.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/dma-mapping.h>
 #include <scsi/scsicam.h>
 
 #include "scsi.h"
@@ -523,7 +524,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
         * filter the internal and ioctl commands
         */
        if((cmd->cmnd[0] == MEGA_INTERNAL_CMD)) {
-               return cmd->buffer;
+               return cmd->request_buffer;
        }
 
 
@@ -2094,7 +2095,7 @@ make_local_pdev(adapter_t *adapter, struct pci_dev **pdev)
 
        memcpy(*pdev, adapter->dev, sizeof(struct pci_dev));
 
-       if( pci_set_dma_mask(*pdev, 0xffffffff) != 0 ) {
+       if( pci_set_dma_mask(*pdev, DMA_32BIT_MASK) != 0 ) {
                kfree(*pdev);
                return -1;
        }
@@ -4470,7 +4471,6 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
 {
        Scsi_Cmnd       *scmd;
        struct  scsi_device *sdev;
-       unsigned long   flags = 0;
        scb_t   *scb;
        int     rval;
 
@@ -4492,7 +4492,7 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
        scmd->device = sdev;
 
        scmd->device->host = adapter->host;
-       scmd->buffer = (void *)scb;
+       scmd->request_buffer = (void *)scb;
        scmd->cmnd[0] = MEGA_INTERNAL_CMD;
 
        scb->state |= SCB_ACTIVE;
@@ -4859,10 +4859,10 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
        /* Set the Mode of addressing to 64 bit if we can */
        if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) {
-               pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+               pci_set_dma_mask(pdev, DMA_64BIT_MASK);
                adapter->has_64bit_addr = 1;
        } else  {
-               pci_set_dma_mask(pdev, 0xffffffff);
+               pci_set_dma_mask(pdev, DMA_32BIT_MASK);
                adapter->has_64bit_addr = 0;
        }