Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
[cascardo/linux.git] / drivers / scsi / megaraid.c
index 4a6feb1..80b68a2 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"
@@ -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;
        }
@@ -4479,7 +4480,7 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
         * serialized. This is so because we want to reserve maximum number of
         * available command ids for the I/O commands.
         */
-       down(&adapter->int_mtx);
+       mutex_lock(&adapter->int_mtx);
 
        scb = &adapter->int_scb;
        memset(scb, 0, sizeof(scb_t));
@@ -4527,7 +4528,7 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
                        mc->cmd, mc->opcode, mc->subopcode, scmd->result);
        }
 
-       up(&adapter->int_mtx);
+       mutex_unlock(&adapter->int_mtx);
 
        return rval;
 }
@@ -4859,14 +4860,14 @@ 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;
        }
                
-       init_MUTEX(&adapter->int_mtx);
+       mutex_init(&adapter->int_mtx);
        init_completion(&adapter->int_waitq);
 
        adapter->this_id = DEFAULT_INITIATOR_ID;
@@ -5049,7 +5050,7 @@ static struct pci_device_id megaraid_pci_tbl[] = {
 MODULE_DEVICE_TABLE(pci, megaraid_pci_tbl);
 
 static struct pci_driver megaraid_pci_driver = {
-       .name           = "megaraid",
+       .name           = "megaraid_legacy",
        .id_table       = megaraid_pci_tbl,
        .probe          = megaraid_probe_one,
        .remove         = __devexit_p(megaraid_remove_one),