From owner-svn-src-head@freebsd.org Fri Jun 1 16:46:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0D59F7D138; Fri, 1 Jun 2018 16:46:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 52AEC86810; Fri, 1 Jun 2018 16:46:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 309892B61C; Fri, 1 Jun 2018 16:46:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w51GkUqX018869; Fri, 1 Jun 2018 16:46:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w51GkUgW018868; Fri, 1 Jun 2018 16:46:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <201806011646.w51GkUgW018868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 1 Jun 2018 16:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334489 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 334489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2018 16:46:30 -0000 Author: np Date: Fri Jun 1 16:46:29 2018 New Revision: 334489 URL: https://svnweb.freebsd.org/changeset/base/334489 Log: 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 Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jun 1 16:31:05 2018 (r334488) +++ head/sys/dev/cxgbe/t4_main.c Fri Jun 1 16:46:29 2018 (r334489) @@ -2312,7 +2312,7 @@ cxgbe_media_status(struct ifnet *ifp, struct ifmediare 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_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 @@ no_media: } 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);