From c27fcc70ccb853a9f4d90819692b2ce2e859ce2c Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Fri, 1 Jun 2018 16:46:29 +0000 Subject: [PATCH] cxgbe(4): Include full duplex mediaopt in media that can be reported as active. Always report full duplex in active media. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index b04722b8cd82..103d85397e96 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2312,7 +2312,7 @@ cxgbe_media_status(struct ifnet *ifp, struct ifmediareq *ifmr) ifmr->ifm_status |= IFM_ACTIVE; /* ifm_active */ - ifmr->ifm_active = IFM_ETHER; + ifmr->ifm_active = IFM_ETHER | IFM_FDX; ifmr->ifm_active &= ~(IFM_ETH_TXPAUSE | IFM_ETH_RXPAUSE); if (lc->fc & PAUSE_RX) ifmr->ifm_active |= IFM_ETH_RXPAUSE; @@ -4191,13 +4191,13 @@ set_current_media(struct port_info *pi, struct ifmedia *ifm) IFM_SUBTYPE(ifm->ifm_cur->ifm_media) == IFM_NONE) return; - mword = IFM_ETHER; lc = &pi->link_cfg; if (lc->requested_aneg == AUTONEG_ENABLE && lc->supported & FW_PORT_CAP_ANEG) { - ifmedia_set(ifm, mword | IFM_AUTO); + ifmedia_set(ifm, IFM_ETHER | IFM_AUTO); return; } + mword = IFM_ETHER | IFM_FDX; if (lc->requested_fc & PAUSE_TX) mword |= IFM_ETH_TXPAUSE; if (lc->requested_fc & PAUSE_RX) @@ -4251,11 +4251,11 @@ build_medialist(struct port_info *pi, struct ifmedia *ifm) } else if (mword == IFM_UNKNOWN) unknown++; else - ifmedia_add4(ifm, IFM_ETHER | mword); + ifmedia_add4(ifm, IFM_ETHER | IFM_FDX | mword); } } if (unknown > 0) /* Add one unknown for all unknown media types. */ - ifmedia_add4(ifm, IFM_ETHER | IFM_UNKNOWN); + ifmedia_add4(ifm, IFM_ETHER | IFM_FDX | IFM_UNKNOWN); if (lc->supported & FW_PORT_CAP_ANEG) ifmedia_add(ifm, IFM_ETHER | IFM_AUTO, 0, NULL);