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/mptfc.c | |
parent | c972c70fa03097be4235fc441658290a3b7af06f (diff) | |
download | blackbird-op-linux-914c2d8e597798d62c2e0a3cba737bf6f611eecf.tar.gz blackbird-op-linux-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/mptfc.c')
-rw-r--r-- | drivers/message/fusion/mptfc.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 5a30621051c3..b343f2a68b1c 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -349,24 +349,6 @@ mptfc_generate_rport_ids(FCDevicePage0_t *pg0, struct fc_rport_identifiers *rid) } static void -mptfc_remap_sdev(struct scsi_device *sdev, void *arg) -{ - VirtDevice *vdev; - VirtTarget *vtarget; - struct scsi_target *starget; - - starget = scsi_target(sdev); - if (starget->hostdata == arg) { - vtarget = arg; - vdev = sdev->hostdata; - if (vdev) { - vdev->bus_id = vtarget->bus_id; - vdev->target_id = vtarget->target_id; - } - } -} - -static void mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) { struct fc_rport_identifiers rport_ids; @@ -423,8 +405,6 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) if (vtarget) { vtarget->target_id = pg0->CurrentTargetID; vtarget->bus_id = pg0->CurrentBus; - starget_for_each_device(ri->starget, - vtarget,mptfc_remap_sdev); } ri->remap_needed = 0; } @@ -432,7 +412,7 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) "mptfc_reg_dev.%d: %x, %llx / %llx, tid %d, " "rport tid %d, tmo %d\n", ioc->name, - oc->sh->host_no, + ioc->sh->host_no, pg0->PortIdentifier, pg0->WWNN, pg0->WWPN, @@ -553,23 +533,26 @@ mptfc_slave_alloc(struct scsi_device *sdev) } vdev->vtarget = vtarget; - vdev->ioc_id = hd->ioc->id; vdev->lun = sdev->lun; - vdev->target_id = vtarget->target_id; - vdev->bus_id = vtarget->bus_id; spin_unlock_irqrestore(&hd->ioc->fc_rport_lock,flags); vtarget->num_luns++; +#ifdef DMPT_DEBUG_FC + { + struct mptfc_rport_info *ri; + ri = *((struct mptfc_rport_info **)rport->dd_data); dfcprintk ((MYIOC_s_INFO_FMT "mptfc_slv_alloc.%d: num_luns %d, sdev.id %d, " "CurrentTargetID %d, %x %llx %llx\n", - ioc->name, + hd->ioc->name, sdev->host->host_no, vtarget->num_luns, sdev->id, ri->pg0.CurrentTargetID, ri->pg0.PortIdentifier, ri->pg0.WWPN, ri->pg0.WWNN)); + } +#endif return 0; } |