diff options
author | mjacob <mjacob@FreeBSD.org> | 2010-06-07 17:39:36 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2010-06-07 17:39:36 +0000 |
commit | 077fb66c209247ede4b3f3db646d9423d6c923cd (patch) | |
tree | f6834d50d76020d98a6700102dc34419c10d7e0f /sys/dev/isp | |
parent | 259851f89cb7d6760b891887a6ae6350c5985f53 (diff) | |
download | FreeBSD-src-077fb66c209247ede4b3f3db646d9423d6c923cd.zip FreeBSD-src-077fb66c209247ede4b3f3db646d9423d6c923cd.tar.gz |
Fix XPT_GET_TRAN_SETTING for FC which has been broken for while so that
it will figure out the correct target to handle index and be able to find
things like WWPN, etc.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/isp')
-rw-r--r-- | sys/dev/isp/isp_freebsd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index 597c5c7..1e34cfb 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -4506,6 +4506,7 @@ isp_action(struct cam_sim *sim, union ccb *ccb) fcparam *fcp = FCPARAM(isp, bus); struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; struct ccb_trans_settings_fc *fc = &cts->xport_specific.fc; + unsigned int hdlidx; cts->protocol = PROTO_SCSI; cts->protocol_version = SCSI_REV_2; @@ -4517,8 +4518,9 @@ isp_action(struct cam_sim *sim, union ccb *ccb) fc->valid = CTS_FC_VALID_SPEED; fc->bitrate = 100000; fc->bitrate *= fcp->isp_gbspeed; - if (tgt > 0 && tgt < MAX_FC_TARG) { - fcportdb_t *lp = &fcp->portdb[tgt]; + hdlidx = fcp->isp_dev_map[tgt] - 1; + if (hdlidx < MAX_FC_TARG) { + fcportdb_t *lp = &fcp->portdb[hdlidx]; fc->wwnn = lp->node_wwn; fc->wwpn = lp->port_wwn; fc->port = lp->portid; |