Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/pci Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/7465e37945f4
branches:  netbsd-9
changeset: 843801:7465e37945f4
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jan 26 11:17:11 2020 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #651):

        sys/dev/pci/if_mcx.c: revision 1.8
        sys/dev/pci/if_mcx.c: revision 1.9

- Change IFM_10G_T(10GBase-T) entry to IFM_10G_CR1(10GBASE-CR1)
- Add the following entries:
        20GBASE-KR2
        56GBASE-R4
        100GBASE-LR4
        100BaseTX
        1000baseT
        10GBase-T
Set if_baudrate.

diffstat:

 sys/dev/pci/if_mcx.c |  25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diffs (81 lines):

diff -r 1ced22ac9073 -r 7465e37945f4 sys/dev/pci/if_mcx.c
--- a/sys/dev/pci/if_mcx.c      Sun Jan 26 11:13:27 2020 +0000
+++ b/sys/dev/pci/if_mcx.c      Sun Jan 26 11:17:11 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mcx.c,v 1.1.2.6 2019/11/26 18:30:57 martin Exp $ */
+/*     $NetBSD: if_mcx.c,v 1.1.2.7 2020/01/26 11:17:11 martin Exp $ */
 /*     $OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
 
 /*
@@ -159,8 +159,10 @@
 #define MCX_ETHER_CAP_10G_CX4  (1 << 2)
 #define MCX_ETHER_CAP_10G_KX4  (1 << 3)
 #define MCX_ETHER_CAP_10G_KR   (1 << 4)
+#define MCX_ETHER_CAP_20G_KR2  (1 << 5)
 #define MCX_ETHER_CAP_40G_CR4  (1 << 6)
 #define MCX_ETHER_CAP_40G_KR4  (1 << 7)
+#define MCX_ETHER_CAP_56G_R4   (1 << 8)
 #define MCX_ETHER_CAP_10G_CR   (1 << 12)
 #define MCX_ETHER_CAP_10G_SR   (1 << 13)
 #define MCX_ETHER_CAP_10G_LR   (1 << 14)
@@ -170,6 +172,10 @@
 #define MCX_ETHER_CAP_100G_CR4 (1 << 20)
 #define MCX_ETHER_CAP_100G_SR4 (1 << 21)
 #define MCX_ETHER_CAP_100G_KR4 (1 << 22)
+#define MCX_ETHER_CAP_100G_LR4 (1 << 23)
+#define MCX_ETHER_CAP_100_TX   (1 << 24)
+#define MCX_ETHER_CAP_1000_T   (1 << 25)
+#define MCX_ETHER_CAP_10G_T    (1 << 26)
 #define MCX_ETHER_CAP_25G_CR   (1 << 27)
 #define MCX_ETHER_CAP_25G_KR   (1 << 28)
 #define MCX_ETHER_CAP_25G_SR   (1 << 29)
@@ -2146,14 +2152,14 @@
        IFM_10G_CX4,
        IFM_10G_KX4,
        IFM_10G_KR,
-       0,
+       IFM_20G_KR2,
        IFM_40G_CR4,
        IFM_40G_KR4,
+       IFM_56G_R4,
        0,
        0,
        0,
-       0,
-       IFM_10G_T,
+       IFM_10G_CR1,
        IFM_10G_SR,
        IFM_10G_LR,
        IFM_40G_SR4,
@@ -2164,10 +2170,10 @@
        IFM_100G_CR4,
        IFM_100G_SR4,
        IFM_100G_KR4,
-       0,
-       0,
-       0,
-       0,
+       IFM_100G_LR4,
+       IFM_100_TX,
+       IFM_1000_T,
+       IFM_10G_T,
        IFM_25G_CR,
        IFM_25G_KR,
        IFM_25G_SR,
@@ -6647,6 +6653,7 @@
        struct ifnet *ifp = &sc->sc_ec.ec_if;
        struct mcx_reg_paos paos;
        int link_state = LINK_STATE_DOWN;
+       struct ifmediareq ifmr;
 
        memset(&paos, 0, sizeof(paos));
        paos.rp_local_port = 1;
@@ -6654,6 +6661,8 @@
            sizeof(paos)) == 0) {
                if (paos.rp_oper_status == MCX_REG_PAOS_OPER_STATUS_UP)
                        link_state = LINK_STATE_UP;
+               mcx_media_status(ifp, &ifmr);
+               ifp->if_baudrate = ifmedia_baudrate(ifmr.ifm_active);
        }
 
        if (link_state != ifp->if_link_state) {



Home | Main Index | Thread Index | Old Index