svn commit: r209383 - stable/8/sys/dev/isp
Matt Jacob
mjacob at FreeBSD.org
Mon Jun 21 04:37:39 UTC 2010
Author: mjacob
Date: Mon Jun 21 04:37:39 2010
New Revision: 209383
URL: http://svn.freebsd.org/changeset/base/209383
Log:
This is an MFC of 208895.
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.
Modified:
stable/8/sys/dev/isp/isp_freebsd.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/ixgbe/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/geom/sched/ (props changed)
Modified: stable/8/sys/dev/isp/isp_freebsd.c
==============================================================================
--- stable/8/sys/dev/isp/isp_freebsd.c Mon Jun 21 04:06:01 2010 (r209382)
+++ stable/8/sys/dev/isp/isp_freebsd.c Mon Jun 21 04:37:39 2010 (r209383)
@@ -4499,6 +4499,7 @@ isp_action(struct cam_sim *sim, union cc
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;
@@ -4510,8 +4511,9 @@ isp_action(struct cam_sim *sim, union cc
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;
More information about the svn-src-stable
mailing list