[SCSI] qla2xxx: Add support for fabric name FC transport attribute.
[pandora-kernel.git] / drivers / scsi / sim710.c
index 63bf2ae..b27e854 100644 (file)
@@ -26,7 +26,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 
 #include <linux/blkdev.h>
@@ -75,7 +74,7 @@ param_setup(char *str)
                else if(!strncmp(pos, "id:", 3)) {
                        if(slot == -1) {
                                printk(KERN_WARNING "sim710: Must specify slot for id parameter\n");
-                       } else if(slot > MAX_SLOTS) {
+                       } else if(slot >= MAX_SLOTS) {
                                printk(KERN_WARNING "sim710: Illegal slot %d for id %d\n", slot, val);
                        } else {
                                id_array[slot] = val;
@@ -120,11 +119,10 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
        }
 
        /* Fill in the three required pieces of hostdata */
-       hostdata->base = base_addr;
+       hostdata->base = ioport_map(base_addr, 64);
        hostdata->differential = differential;
        hostdata->clock = clock;
        hostdata->chip710 = 1;
-       NCR_700_set_io_mapped(hostdata);
 
        /* and register the chip */
        if((host = NCR_700_detect(&sim710_driver_template, hostdata, dev))
@@ -133,8 +131,9 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
                goto out_release;
        }
        host->this_id = scsi_id;
+       host->base = base_addr;
        host->irq = irq;
-       if (request_irq(irq, NCR_700_intr, SA_SHIRQ, "sim710", host)) {
+       if (request_irq(irq, NCR_700_intr, IRQF_SHARED, "sim710", host)) {
                printk(KERN_ERR "sim710: request_irq failed\n");
                goto out_put_host;
        }
@@ -146,7 +145,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
  out_put_host:
        scsi_host_put(host);
  out_release:
-       release_region(host->base, 64);
+       release_region(base_addr, 64);
  out_free:
        kfree(hostdata);
  out:
@@ -164,6 +163,7 @@ sim710_device_remove(struct device *dev)
        NCR_700_release(host);
        kfree(hostdata);
        free_irq(host->irq, host);
+       release_region(host->base, 64);
        return 0;
 }