[PATCH] Replace 0xff.. with correct DMA_xBIT_MASK
[pandora-kernel.git] / drivers / scsi / qlogicfc.c
index a4b3b3f..52b224a 100644 (file)
@@ -61,6 +61,8 @@
 #include <linux/unistd.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
+#include <linux/dma-mapping.h>
+#include <linux/jiffies.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include "scsi.h"
@@ -711,7 +713,7 @@ static inline void isp2x00_disable_irqs(struct Scsi_Host *host)
 }
 
 
-static int isp2x00_detect(Scsi_Host_Template * tmpt)
+static int isp2x00_detect(struct scsi_host_template * tmpt)
 {
        int hosts = 0;
        unsigned long wait_time;
@@ -737,8 +739,8 @@ static int isp2x00_detect(Scsi_Host_Template * tmpt)
                                continue;
 
                        /* Try to configure DMA attributes. */
-                       if (pci_set_dma_mask(pdev, 0xffffffffffffffffULL) &&
-                           pci_set_dma_mask(pdev, 0xffffffffULL))
+                       if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) &&
+                           pci_set_dma_mask(pdev, DMA_32BIT_MASK))
                                        continue;
 
                        host = scsi_register(tmpt, sizeof(struct isp2x00_hostdata));
@@ -1325,7 +1327,7 @@ static int isp2x00_queuecommand(Scsi_Cmnd * Cmnd, void (*done) (Scsi_Cmnd *))
                cmd->control_flags = cpu_to_le16(CFLAG_READ);
 
        if (Cmnd->device->tagged_supported) {
-               if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (2 * ISP_TIMEOUT)) {
+               if (time_after(jiffies, hostdata->tag_ages[Cmnd->device->id] + (2 * ISP_TIMEOUT))) {
                        cmd->control_flags |= cpu_to_le16(CFLAG_ORDERED_TAG);
                        hostdata->tag_ages[Cmnd->device->id] = jiffies;
                } else
@@ -2210,7 +2212,7 @@ void isp2x00_print_scsi_cmd(Scsi_Cmnd * cmd)
 
 MODULE_LICENSE("GPL");
 
-static Scsi_Host_Template driver_template = {
+static struct scsi_host_template driver_template = {
         .detect                 = isp2x00_detect,
         .release                = isp2x00_release,
         .info                   = isp2x00_info,