aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
authorMoore, Eric <Eric.Moore@lsil.com>2006-03-14 11:19:36 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 15:33:38 -0500
commit914c2d8e597798d62c2e0a3cba737bf6f611eecf (patch)
tree7973421cd5cc7ecd644c6c304580a93e42cec244 /drivers/message/fusion/mptscsih.c
parentc972c70fa03097be4235fc441658290a3b7af06f (diff)
[SCSI] fusion - removing target_id/bus_id from the VirtDevice structure
It makes no sense in keeping the target_id and bus_id in the VirtDevice structure, when it can be obtained from the VirtTarget structure. In addition, this patch fix's couple compilation bugs in mptfc.c when MPT_DEBUG_FC is enabled. This provided by Micheal Reed. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 77289fd07fe7..c99a918feb58 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -887,7 +887,7 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
887 dsprintk(( "search_running: found (sc=%p, mf = %p) target %d, lun %d \n", 887 dsprintk(( "search_running: found (sc=%p, mf = %p) target %d, lun %d \n",
888 hd->ScsiLookup[ii], mf, mf->TargetID, mf->LUN[1])); 888 hd->ScsiLookup[ii], mf, mf->TargetID, mf->LUN[1]));
889 889
890 if ((mf->TargetID != ((u8)vdevice->target_id)) || (mf->LUN[1] != ((u8) vdevice->lun))) 890 if ((mf->TargetID != ((u8)vdevice->vtarget->target_id)) || (mf->LUN[1] != ((u8) vdevice->lun)))
891 continue; 891 continue;
892 892
893 /* Cleanup 893 /* Cleanup
@@ -1285,8 +1285,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
1285 1285
1286 /* Use the above information to set up the message frame 1286 /* Use the above information to set up the message frame
1287 */ 1287 */
1288 pScsiReq->TargetID = (u8) vdev->target_id; 1288 pScsiReq->TargetID = (u8) vdev->vtarget->target_id;
1289 pScsiReq->Bus = vdev->bus_id; 1289 pScsiReq->Bus = vdev->vtarget->bus_id;
1290 pScsiReq->ChainOffset = 0; 1290 pScsiReq->ChainOffset = 0;
1291 if (vdev->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) 1291 if (vdev->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT)
1292 pScsiReq->Function = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH; 1292 pScsiReq->Function = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH;
@@ -1701,7 +1701,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1701 1701
1702 vdev = SCpnt->device->hostdata; 1702 vdev = SCpnt->device->hostdata;
1703 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK, 1703 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK,
1704 vdev->bus_id, vdev->target_id, vdev->lun, 1704 vdev->vtarget->bus_id, vdev->vtarget->target_id, vdev->lun,
1705 ctx2abort, mptscsih_get_tm_timeout(ioc)); 1705 ctx2abort, mptscsih_get_tm_timeout(ioc));
1706 1706
1707 printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n", 1707 printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n",
@@ -1752,7 +1752,7 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
1752 1752
1753 vdev = SCpnt->device->hostdata; 1753 vdev = SCpnt->device->hostdata;
1754 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 1754 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
1755 vdev->bus_id, vdev->target_id, 1755 vdev->vtarget->bus_id, vdev->vtarget->target_id,
1756 0, 0, mptscsih_get_tm_timeout(hd->ioc)); 1756 0, 0, mptscsih_get_tm_timeout(hd->ioc));
1757 1757
1758 printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n", 1758 printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n",
@@ -1803,7 +1803,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
1803 1803
1804 vdev = SCpnt->device->hostdata; 1804 vdev = SCpnt->device->hostdata;
1805 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, 1805 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
1806 vdev->bus_id, 0, 0, 0, mptscsih_get_tm_timeout(hd->ioc)); 1806 vdev->vtarget->bus_id, 0, 0, 0, mptscsih_get_tm_timeout(hd->ioc));
1807 1807
1808 printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n", 1808 printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n",
1809 hd->ioc->name, 1809 hd->ioc->name,
@@ -2162,9 +2162,6 @@ mptscsih_slave_alloc(struct scsi_device *sdev)
2162 return -ENOMEM; 2162 return -ENOMEM;
2163 } 2163 }
2164 2164
2165 vdev->ioc_id = hd->ioc->id;
2166 vdev->target_id = sdev->id;
2167 vdev->bus_id = sdev->channel;
2168 vdev->lun = sdev->lun; 2165 vdev->lun = sdev->lun;
2169 sdev->hostdata = vdev; 2166 sdev->hostdata = vdev;
2170 2167
@@ -3366,8 +3363,8 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
3366 iocmd.data_dma = -1; 3363 iocmd.data_dma = -1;
3367 iocmd.size = 0; 3364 iocmd.size = 0;
3368 iocmd.rsvd = iocmd.rsvd2 = 0; 3365 iocmd.rsvd = iocmd.rsvd2 = 0;
3369 iocmd.bus = vdevice->bus_id; 3366 iocmd.bus = vdevice->vtarget->bus_id;
3370 iocmd.id = vdevice->target_id; 3367 iocmd.id = vdevice->vtarget->target_id;
3371 iocmd.lun = (u8)vdevice->lun; 3368 iocmd.lun = (u8)vdevice->lun;
3372 3369
3373 if ((vdevice->vtarget->type == TYPE_DISK) && 3370 if ((vdevice->vtarget->type == TYPE_DISK) &&