mv643xx_eth: fix unicast address filter corruption on mtu change
[safe/jmp/linux-2.6] / drivers / scsi / fdomain.c
index 36169d5..32eef66 100644 (file)
@@ -3,7 +3,7 @@
  * Revised: Mon Dec 28 21:59:02 1998 by faith@acm.org
  * Author: Rickard E. Faith, faith@cs.unc.edu
  * Copyright 1992-1996, 1998 Rickard E. Faith (faith@acm.org)
- * Shared IRQ supported added 7/7/2001  Alan Cox <alan@redhat.com>
+ * Shared IRQ supported added 7/7/2001  Alan Cox <alan@lxorguk.ukuu.org.uk>
 
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
 #include <scsi/scsi_ioctl.h>
 #include "fdomain.h"
 
+#ifndef PCMCIA
 MODULE_AUTHOR("Rickard E. Faith");
 MODULE_DESCRIPTION("Future domain SCSI driver");
 MODULE_LICENSE("GPL");
+#endif
 
   
 #define VERSION          "$Revision: 5.51 $"
@@ -387,7 +389,9 @@ static void __iomem *    bios_mem;
 static int               bios_major;
 static int               bios_minor;
 static int               PCI_bus;
+#ifdef CONFIG_PCI
 static struct pci_dev  *PCI_dev;
+#endif
 static int               Quantum;      /* Quantum board variant */
 static int               interrupt_level;
 static volatile int      in_command;
@@ -1319,7 +1323,7 @@ static irqreturn_t do_fdomain_16x0_intr(int irq, void *dev_id)
            if (current_SC->SCp.buffers_residual) {
               --current_SC->SCp.buffers_residual;
               ++current_SC->SCp.buffer;
-              current_SC->SCp.ptr = page_address(current_SC->SCp.buffer->page) + current_SC->SCp.buffer->offset;
+              current_SC->SCp.ptr = sg_virt(current_SC->SCp.buffer);
               current_SC->SCp.this_residual = current_SC->SCp.buffer->length;
            } else
                  break;
@@ -1352,7 +1356,7 @@ static irqreturn_t do_fdomain_16x0_intr(int irq, void *dev_id)
             && current_SC->SCp.buffers_residual) {
            --current_SC->SCp.buffers_residual;
            ++current_SC->SCp.buffer;
-           current_SC->SCp.ptr = page_address(current_SC->SCp.buffer->page) + current_SC->SCp.buffer->offset;
+           current_SC->SCp.ptr = sg_virt(current_SC->SCp.buffer);
            current_SC->SCp.this_residual = current_SC->SCp.buffer->length;
         }
       }
@@ -1437,12 +1441,11 @@ static int fdomain_16x0_queue(struct scsi_cmnd *SCpnt,
 
    if (scsi_sg_count(current_SC)) {
           current_SC->SCp.buffer = scsi_sglist(current_SC);
-          current_SC->SCp.ptr = page_address(current_SC->SCp.buffer->page)
-                  + current_SC->SCp.buffer->offset;
+          current_SC->SCp.ptr = sg_virt(current_SC->SCp.buffer);
           current_SC->SCp.this_residual    = current_SC->SCp.buffer->length;
           current_SC->SCp.buffers_residual = scsi_sg_count(current_SC) - 1;
    } else {
-          current_SC->SCp.ptr              = 0;
+          current_SC->SCp.ptr              = NULL;
           current_SC->SCp.this_residual    = 0;
           current_SC->SCp.buffer           = NULL;
           current_SC->SCp.buffers_residual = 0;
@@ -1764,6 +1767,7 @@ struct scsi_host_template fdomain_driver_template = {
 };
 
 #ifndef PCMCIA
+#ifdef CONFIG_PCI
 
 static struct pci_device_id fdomain_pci_tbl[] __devinitdata = {
        { PCI_VENDOR_ID_FD, PCI_DEVICE_ID_FD_36C70,
@@ -1771,7 +1775,7 @@ static struct pci_device_id fdomain_pci_tbl[] __devinitdata = {
        { }
 };
 MODULE_DEVICE_TABLE(pci, fdomain_pci_tbl);
-
+#endif
 #define driver_template fdomain_driver_template
 #include "scsi_module.c"