vserver 2.0 rc7
[linux-2.6.git] / drivers / scsi / 53c700.c
index 8adef65..4b1bb52 100644 (file)
@@ -296,8 +296,7 @@ NCR_700_get_SXFER(struct scsi_device *SDp)
 
 struct Scsi_Host *
 NCR_700_detect(struct scsi_host_template *tpnt,
-              struct NCR_700_Host_Parameters *hostdata, struct device *dev,
-              unsigned long irq, u8 scsi_id)
+              struct NCR_700_Host_Parameters *hostdata, struct device *dev)
 {
        dma_addr_t pScript, pSlots;
        __u8 *memory;
@@ -390,11 +389,8 @@ NCR_700_detect(struct scsi_host_template *tpnt,
        host->max_lun = NCR_700_MAX_LUNS;
        BUG_ON(NCR_700_transport_template == NULL);
        host->transportt = NCR_700_transport_template;
-       host->unique_id = hostdata->base;
-       host->base = hostdata->base;
+       host->unique_id = (unsigned long)hostdata->base;
        hostdata->eh_complete = NULL;
-       host->irq = irq;
-       host->this_id = scsi_id;
        host->hostdata[0] = (unsigned long)hostdata;
        /* kick the chip */
        NCR_700_writeb(0xff, host, CTEST9_REG);
@@ -415,28 +411,16 @@ NCR_700_detect(struct scsi_host_template *tpnt,
        /* reset the chip */
        NCR_700_chip_reset(host);
 
-       if (request_irq(irq, NCR_700_intr, SA_SHIRQ, dev->bus_id, host)) {
-               dev_printk(KERN_ERR, dev, "53c700: irq %lu request failed\n ",
-                          irq);
-               goto out_put_host;
-       }
-
        if (scsi_add_host(host, dev)) {
                dev_printk(KERN_ERR, dev, "53c700: scsi_add_host failed\n");
-               goto out_release_irq;
+               scsi_host_put(host);
+               return NULL;
        }
 
        spi_signalling(host) = hostdata->differential ? SPI_SIGNAL_HVD :
                SPI_SIGNAL_SE;
 
        return host;
-
- out_release_irq:
-       free_irq(irq, host);
- out_put_host:
-       scsi_host_put(host);
-
-       return NULL;
 }
 
 int
@@ -824,6 +808,7 @@ process_extended_message(struct Scsi_Host *host,
        switch(hostdata->msgin[2]) {
        case A_SDTR_MSG:
                if(SCp != NULL && NCR_700_is_flag_set(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION)) {
+                       struct scsi_target *starget = SCp->device->sdev_target;
                        __u8 period = hostdata->msgin[3];
                        __u8 offset = hostdata->msgin[4];
 
@@ -831,22 +816,15 @@ process_extended_message(struct Scsi_Host *host,
                                offset = 0;
                                period = 0;
                        }
+
+                       spi_offset(starget) = offset;
+                       spi_period(starget) = period;
                        
                        if(NCR_700_is_flag_set(SCp->device, NCR_700_DEV_PRINT_SYNC_NEGOTIATION)) {
-                               if(spi_offset(SCp->device->sdev_target) != 0)
-                                       printk(KERN_INFO "scsi%d: (%d:%d) Synchronous at offset %d, period %dns\n",
-                                              host->host_no, pun, lun,
-                                              offset, period*4);
-                               else
-                                       printk(KERN_INFO "scsi%d: (%d:%d) Asynchronous\n",
-                                              host->host_no, pun, lun);
+                               spi_display_xfer_agreement(starget);
                                NCR_700_clear_flag(SCp->device, NCR_700_DEV_PRINT_SYNC_NEGOTIATION);
                        }
-                               
-                       spi_offset(SCp->device->sdev_target) = offset;
-                       spi_period(SCp->device->sdev_target) = period;
                        
-
                        NCR_700_set_flag(SCp->device, NCR_700_DEV_NEGOTIATED_SYNC);
                        NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION);