Module Name:    src
Committed By:   msaitoh
Date:           Fri Oct 13 04:52:40 UTC 2017

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Set baudrate correctly. A device which use mii(4) interface can set
if_baudrate atomatically by mii_phy_statusmsg(). ixg(4) and ixv(4) don't
use mii(4), so calling ifmedia_baudrate() directly is required.

 XXX need the same same work for wm(4)'s TBI and SERDEV devices.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.103 src/sys/dev/pci/ixgbe/ixgbe.c:1.104
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.103	Wed Oct  4 07:13:00 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Oct 13 04:52:40 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.103 2017/10/04 07:13:00 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.104 2017/10/13 04:52:40 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -2594,6 +2594,8 @@ ixgbe_media_status(struct ifnet *ifp, st
 		ifmr->ifm_active |= IFM_UNKNOWN;
 #endif
 
+	ifp->if_baudrate = ifmedia_baudrate(ifmr->ifm_active);
+
 	/* Display current flow control setting used on link */
 	if (hw->fc.current_mode == ixgbe_fc_rx_pause ||
 	    hw->fc.current_mode == ixgbe_fc_full)

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.69 src/sys/dev/pci/ixgbe/ixv.c:1.70
--- src/sys/dev/pci/ixgbe/ixv.c:1.69	Wed Oct  4 11:03:20 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Fri Oct 13 04:52:40 2017
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.69 2017/10/04 11:03:20 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.70 2017/10/13 04:52:40 msaitoh Exp $*/
 
 /******************************************************************************
 
@@ -966,6 +966,8 @@ ixv_media_status(struct ifnet *ifp, stru
 			break;
 	}
 
+	ifp->if_baudrate = ifmedia_baudrate(ifmr->ifm_active);
+
 	IXGBE_CORE_UNLOCK(adapter);
 
 	return;

Reply via email to