Date: Thu, 23 Mar 2017 06:45:57 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r315817 - stable/10/sys/dev/mpt Message-ID: <201703230645.v2N6jv1Y056846@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu Mar 23 06:45:57 2017 New Revision: 315817 URL: https://svnweb.freebsd.org/changeset/base/315817 Log: MFC r314968: Report some more data in XPT_PATH_INQ. I am not sure they are used anywhere, but why not. Modified: stable/10/sys/dev/mpt/mpt.h stable/10/sys/dev/mpt/mpt_cam.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpt/mpt.h ============================================================================== --- stable/10/sys/dev/mpt/mpt.h Thu Mar 23 06:45:11 2017 (r315816) +++ stable/10/sys/dev/mpt/mpt.h Thu Mar 23 06:45:57 2017 (r315817) @@ -614,6 +614,7 @@ struct mpt_softc { struct { char wwnn[19]; char wwpn[19]; + uint32_t portid; } fc; } scinfo; Modified: stable/10/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/10/sys/dev/mpt/mpt_cam.c Thu Mar 23 06:45:11 2017 (r315816) +++ stable/10/sys/dev/mpt/mpt_cam.c Thu Mar 23 06:45:57 2017 (r315817) @@ -475,6 +475,12 @@ mpt_read_config_info_fc(struct mpt_softc break; } + mpt->scinfo.fc.wwnn = ((uint64_t)mpt->mpt_fcport_page0.WWNN.High << 32) + | 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%08x%08x WWPN 0x%08x%08x " "Speed %u-Gbit\n", topology, @@ -3566,6 +3572,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?201703230645.v2N6jv1Y056846>