diff options
author | Moore, Eric <Eric.Moore@lsil.com> | 2006-03-14 09:19:36 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-14 14:33:38 -0600 |
commit | 914c2d8e597798d62c2e0a3cba737bf6f611eecf (patch) | |
tree | 7973421cd5cc7ecd644c6c304580a93e42cec244 /drivers/message/fusion/mptscsih.c | |
parent | c972c70fa03097be4235fc441658290a3b7af06f (diff) | |
download | kernel-crypto-914c2d8e597798d62c2e0a3cba737bf6f611eecf.tar.gz kernel-crypto-914c2d8e597798d62c2e0a3cba737bf6f611eecf.tar.xz kernel-crypto-914c2d8e597798d62c2e0a3cba737bf6f611eecf.zip |
[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.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 77289fd07fe..c99a918feb5 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) dsprintk(( "search_running: found (sc=%p, mf = %p) target %d, lun %d \n", hd->ScsiLookup[ii], mf, mf->TargetID, mf->LUN[1])); - if ((mf->TargetID != ((u8)vdevice->target_id)) || (mf->LUN[1] != ((u8) vdevice->lun))) + if ((mf->TargetID != ((u8)vdevice->vtarget->target_id)) || (mf->LUN[1] != ((u8) vdevice->lun))) continue; /* Cleanup @@ -1285,8 +1285,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) /* Use the above information to set up the message frame */ - pScsiReq->TargetID = (u8) vdev->target_id; - pScsiReq->Bus = vdev->bus_id; + pScsiReq->TargetID = (u8) vdev->vtarget->target_id; + pScsiReq->Bus = vdev->vtarget->bus_id; pScsiReq->ChainOffset = 0; if (vdev->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) pScsiReq->Function = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH; @@ -1701,7 +1701,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) vdev = SCpnt->device->hostdata; retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK, - vdev->bus_id, vdev->target_id, vdev->lun, + vdev->vtarget->bus_id, vdev->vtarget->target_id, vdev->lun, ctx2abort, mptscsih_get_tm_timeout(ioc)); printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n", @@ -1752,7 +1752,7 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt) vdev = SCpnt->device->hostdata; retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, - vdev->bus_id, vdev->target_id, + vdev->vtarget->bus_id, vdev->vtarget->target_id, 0, 0, mptscsih_get_tm_timeout(hd->ioc)); printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n", @@ -1803,7 +1803,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt) vdev = SCpnt->device->hostdata; retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, - vdev->bus_id, 0, 0, 0, mptscsih_get_tm_timeout(hd->ioc)); + vdev->vtarget->bus_id, 0, 0, 0, mptscsih_get_tm_timeout(hd->ioc)); printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n", hd->ioc->name, @@ -2162,9 +2162,6 @@ mptscsih_slave_alloc(struct scsi_device *sdev) return -ENOMEM; } - vdev->ioc_id = hd->ioc->id; - vdev->target_id = sdev->id; - vdev->bus_id = sdev->channel; vdev->lun = sdev->lun; sdev->hostdata = vdev; @@ -3366,8 +3363,8 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice) iocmd.data_dma = -1; iocmd.size = 0; iocmd.rsvd = iocmd.rsvd2 = 0; - iocmd.bus = vdevice->bus_id; - iocmd.id = vdevice->target_id; + iocmd.bus = vdevice->vtarget->bus_id; + iocmd.id = vdevice->vtarget->target_id; iocmd.lun = (u8)vdevice->lun; if ((vdevice->vtarget->type == TYPE_DISK) && |