Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe Set baudrate correctly. A device which use...



details:   https://anonhg.NetBSD.org/src/rev/fcf269ceba74
branches:  trunk
changeset: 356795:fcf269ceba74
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Oct 13 04:52:40 2017 +0000

description:
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.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  4 +++-
 sys/dev/pci/ixgbe/ixv.c   |  4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r c687b0f65412 -r fcf269ceba74 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Fri Oct 13 03:11:50 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Fri Oct 13 04:52:40 2017 +0000
@@ -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 @@
                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)
diff -r c687b0f65412 -r fcf269ceba74 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Fri Oct 13 03:11:50 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Fri Oct 13 04:52:40 2017 +0000
@@ -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 @@
                        break;
        }
 
+       ifp->if_baudrate = ifmedia_baudrate(ifmr->ifm_active);
+
        IXGBE_CORE_UNLOCK(adapter);
 
        return;



Home | Main Index | Thread Index | Old Index