Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Mar 2017 17:53:38 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314968 - head/sys/dev/mpt
Message-ID:  <201703091753.v29HrcqB076047@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Mar  9 17:53:37 2017
New Revision: 314968
URL: https://svnweb.freebsd.org/changeset/base/314968

Log:
  Report some more data in XPT_PATH_INQ.
  
  I am not sure they are used anywhere, but why not.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/mpt/mpt.h
  head/sys/dev/mpt/mpt_cam.c

Modified: head/sys/dev/mpt/mpt.h
==============================================================================
--- head/sys/dev/mpt/mpt.h	Thu Mar  9 17:35:35 2017	(r314967)
+++ head/sys/dev/mpt/mpt.h	Thu Mar  9 17:53:37 2017	(r314968)
@@ -614,6 +614,7 @@ struct mpt_softc {
 		struct {
 			uint64_t wwnn;
 			uint64_t wwpn;
+			uint32_t portid;
 		} fc;
 	} scinfo;
 

Modified: head/sys/dev/mpt/mpt_cam.c
==============================================================================
--- head/sys/dev/mpt/mpt_cam.c	Thu Mar  9 17:35:35 2017	(r314967)
+++ head/sys/dev/mpt/mpt_cam.c	Thu Mar  9 17:53:37 2017	(r314968)
@@ -479,6 +479,7 @@ mpt_read_config_info_fc(struct mpt_softc
 	    | mpt->mpt_fcport_page0.WWNN.Low;
 	mpt->scinfo.fc.wwpn = ((uint64_t)mpt->mpt_fcport_page0.WWPN.High << 32)
 	    | mpt->mpt_fcport_page0.WWPN.Low;
+	mpt->scinfo.fc.portid = mpt->mpt_fcport_page0.PortIdentifier;
 
 	mpt_lprt(mpt, MPT_PRT_INFO,
 	    "FC Port Page 0: Topology <%s> WWNN 0x%16jx WWPN 0x%16jx "
@@ -3590,6 +3591,11 @@ mpt_action(struct cam_sim *sim, union cc
 			cpi->transport = XPORT_FC;
 			cpi->transport_version = 0;
 			cpi->protocol_version = SCSI_REV_SPC;
+			cpi->xport_specific.fc.wwnn = mpt->scinfo.fc.wwnn;
+			cpi->xport_specific.fc.wwpn = mpt->scinfo.fc.wwpn;
+			cpi->xport_specific.fc.port = mpt->scinfo.fc.portid;
+			cpi->xport_specific.fc.bitrate =
+			    100000 * mpt->mpt_fcport_speed;
 		} else if (mpt->is_sas) {
 			cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED;
 			cpi->base_transfer_speed = 300000;



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