]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/nsp32.c
Merge branch 'master'
[linux-2.6-omap-h63xx.git] / drivers / scsi / nsp32.c
index 5159ceea319eb99e34f8bb7fd10527562b179d5b..e4ff4f00676d7635a3a744d272ff1b2d4d5f79fb 100644 (file)
@@ -481,7 +481,7 @@ static int nsp32_selection_autopara(struct scsi_cmnd *SCpnt)
        nsp32_hw_data  *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
        unsigned int    base    = SCpnt->device->host->io_port;
        unsigned int    host_id = SCpnt->device->host->this_id;
-       unsigned char   target  = SCpnt->device->id;
+       unsigned char   target  = scmd_id(SCpnt);
        nsp32_autoparam *param  = data->autoparam;
        unsigned char   phase;
        int             i, ret;
@@ -612,7 +612,7 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt)
        nsp32_hw_data  *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
        unsigned int    base    = SCpnt->device->host->io_port;
        unsigned int    host_id = SCpnt->device->host->this_id;
-       unsigned char   target  = SCpnt->device->id;
+       unsigned char   target  = scmd_id(SCpnt);
        unsigned char   phase;
        int             status;
        unsigned short  command = 0;
@@ -973,7 +973,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
        }
 
        /* check target ID is not same as this initiator ID */
-       if (SCpnt->device->id == SCpnt->device->host->this_id) {
+       if (scmd_id(SCpnt) == SCpnt->device->host->this_id) {
                nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???");
                SCpnt->result = DID_BAD_TARGET << 16;
                done(SCpnt);
@@ -1028,7 +1028,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
         * (target don't have SDTR_DONE and SDTR_INITIATOR), sync
         * message SDTR is needed to do synchronous transfer.
         */
-       target = &data->target[SCpnt->device->id];
+       target = &data->target[scmd_id(SCpnt)];
        data->cur_target = target;
 
        if (!(target->sync_flag & (SDTR_DONE | SDTR_INITIATOR | SDTR_TARGET))) {
@@ -2719,9 +2719,7 @@ static int nsp32_detect(Scsi_Host_Template *sht)
        host->unique_id = data->BaseAddress;
        host->n_io_port = data->NumAddress;
        host->base      = (unsigned long)data->MmioAddress;
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,63))
-       scsi_set_device(host, &PCIDEV->dev);
-#else
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,63))
        scsi_set_pci_device(host, PCIDEV);
 #endif