Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jun 2010 17:39:36 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208895 - head/sys/dev/isp
Message-ID:  <201006071739.o57HdaHd046667@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Mon Jun  7 17:39:36 2010
New Revision: 208895
URL: http://svn.freebsd.org/changeset/base/208895

Log:
  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

Modified:
  head/sys/dev/isp/isp_freebsd.c

Modified: head/sys/dev/isp/isp_freebsd.c
==============================================================================
--- head/sys/dev/isp/isp_freebsd.c	Mon Jun  7 16:32:12 2010	(r208894)
+++ head/sys/dev/isp/isp_freebsd.c	Mon Jun  7 17:39:36 2010	(r208895)
@@ -4506,6 +4506,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;
@@ -4517,8 +4518,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006071739.o57HdaHd046667>