svn commit: r327001 - head/sys/dev/bnxt

Stephen Hurd shurd at FreeBSD.org
Tue Dec 19 22:06:27 UTC 2017


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 at 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


More information about the svn-src-head mailing list