Date: Tue, 19 Dec 2017 22:06:25 +0000 (UTC) From: Stephen Hurd <shurd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327001 - head/sys/dev/bnxt Message-ID: <201712192206.vBJM6Pqo049646@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: shurd Date: Tue Dec 19 22:06:25 2017 New Revision: 327001 URL: https://svnweb.freebsd.org/changeset/base/327001 Log: On Link up & down, update media types It's possible to change the SFP module when link is down, which would change the available media types. This is part of D13358. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Modified: head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Tue Dec 19 21:07:30 2017 (r327000) +++ head/sys/dev/bnxt/if_bnxt.c Tue Dec 19 22:06:25 2017 (r327001) @@ -2224,6 +2224,10 @@ bnxt_report_link(struct bnxt_softc *softc) link_info->last_flow_ctrl.tx = link_info->flow_ctrl.tx; link_info->last_flow_ctrl.rx = link_info->flow_ctrl.rx; link_info->last_flow_ctrl.autoneg = link_info->flow_ctrl.autoneg; + /* update media types */ + ifmedia_removeall(softc->media); + bnxt_add_media_types(softc); + ifmedia_set(softc->media, IFM_ETHER | IFM_AUTO); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712192206.vBJM6Pqo049646>