From 471f963d40a62aacb2d708bdd11e1f9e97b1b984 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 9 Mar 2017 17:53:37 +0000 Subject: [PATCH] Report some more data in XPT_PATH_INQ. I am not sure they are used anywhere, but why not. MFC after: 2 weeks --- sys/dev/mpt/mpt.h | 1 + sys/dev/mpt/mpt_cam.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h index 3cd1cd091096..74b1525de03f 100644 --- a/sys/dev/mpt/mpt.h +++ b/sys/dev/mpt/mpt.h @@ -614,6 +614,7 @@ struct mpt_softc { struct { uint64_t wwnn; uint64_t wwpn; + uint32_t portid; } fc; } scinfo; diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index b00f67e329df..d2b853c57e9c 100644 --- a/sys/dev/mpt/mpt_cam.c +++ b/sys/dev/mpt/mpt_cam.c @@ -479,6 +479,7 @@ mpt_read_config_info_fc(struct mpt_softc *mpt) | 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 ccb *ccb) 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;