This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / scsi / NCR_D700.c
index c2a3151..fce63c7 100644 (file)
@@ -201,20 +201,34 @@ NCR_D700_probe_one(struct NCR_D700_private *p, int siop,
        NCR_700_set_io_mapped(hostdata);
 
        /* and register the siop */
-       host = NCR_700_detect(&NCR_D700_driver_template, hostdata,
-                             p->dev, irq,
-                             /* FIXME: read this from SUS */
-                             id_array[slot * 2 + siop]);
+       host = NCR_700_detect(&NCR_D700_driver_template, hostdata);
        if (!host) {
                ret = -ENOMEM;
                goto detect_failed;
        }
 
+       host->irq = irq;
+       /* FIXME: Read this from SUS */
+       host->this_id = id_array[slot * 2 + siop];
+       printk(KERN_NOTICE "NCR D700: SIOP%d, SCSI id is %d\n",
+                       siop, host->this_id);
+       if (request_irq(irq, NCR_700_intr, SA_SHIRQ, "NCR_D700", host)) {
+               printk(KERN_ERR "NCR D700: SIOP%d: irq problem, "
+                               "detatching\n", siop);
+               ret = -ENODEV;
+               goto irq_failed;
+       }
+
+       scsi_add_host(host, p->dev); /* XXX handle failure */
        scsi_scan_host(host);
 
        p->hosts[siop] = host;
+       hostdata->dev = p->dev;
        return 0;
 
+ irq_failed:
+       scsi_host_put(host);
+       NCR_700_release(host);
  detect_failed:
        release_region(host->base, 64);
  region_failed: