linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / scsi / BusLogic.c
index 16a12a3..1c45934 100644 (file)
@@ -29,6 +29,7 @@
 #define BusLogic_DriverVersion         "2.1.16"
 #define BusLogic_DriverDate            "18 July 2002"
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
@@ -40,8 +41,6 @@
 #include <linux/stat.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
-#include <linux/jiffies.h>
-#include <linux/dma-mapping.h>
 #include <scsi/scsicam.h>
 
 #include <asm/dma.h>
@@ -677,7 +676,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
                if (pci_enable_device(PCI_Device))
                        continue;
 
-               if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK ))
+               if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff))
                        continue;
 
                Bus = PCI_Device->bus->number;
@@ -832,7 +831,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
                if (pci_enable_device(PCI_Device))
                        continue;
 
-               if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK))
+               if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff))
                        continue;
 
                Bus = PCI_Device->bus->number;
@@ -886,7 +885,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda
                if (pci_enable_device(PCI_Device))
                        continue;
 
-               if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK))
+               if (pci_set_dma_mask(PCI_Device, (u64) 0xffffffff))
                        continue;
 
                Bus = PCI_Device->bus->number;
@@ -1844,7 +1843,7 @@ static boolean __init BusLogic_AcquireResources(struct BusLogic_HostAdapter *Hos
        /*
           Acquire shared access to the IRQ Channel.
         */
-       if (request_irq(HostAdapter->IRQ_Channel, BusLogic_InterruptHandler, IRQF_SHARED, HostAdapter->FullModelName, HostAdapter) < 0) {
+       if (request_irq(HostAdapter->IRQ_Channel, BusLogic_InterruptHandler, SA_SHIRQ, HostAdapter->FullModelName, HostAdapter) < 0) {
                BusLogic_Error("UNABLE TO ACQUIRE IRQ CHANNEL %d - DETACHING\n", HostAdapter, HostAdapter->IRQ_Channel);
                return false;
        }
@@ -2897,7 +2896,7 @@ static int BusLogic_QueueCommand(struct scsi_cmnd *Command, void (*CompletionRou
                 */
                if (HostAdapter->ActiveCommands[TargetID] == 0)
                        HostAdapter->LastSequencePoint[TargetID] = jiffies;
-               else if (time_after(jiffies, HostAdapter->LastSequencePoint[TargetID] + 4 * HZ)) {
+               else if (jiffies - HostAdapter->LastSequencePoint[TargetID] > 4 * HZ) {
                        HostAdapter->LastSequencePoint[TargetID] = jiffies;
                        QueueTag = BusLogic_OrderedQueueTag;
                }