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 Use new media types.



details:   https://anonhg.NetBSD.org/src/rev/f3b1dcd84060
branches:  trunk
changeset: 451348:f3b1dcd84060
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri May 17 07:39:33 2019 +0000

description:
Use new media types.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  25 +------------------------
 1 files changed, 1 insertions(+), 24 deletions(-)

diffs (70 lines):

diff -r 0be332aaeeab -r f3b1dcd84060 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Fri May 17 07:38:48 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Fri May 17 07:39:33 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.183 2019/05/15 02:56:47 ozaki-r Exp $ */
+/* $NetBSD: ixgbe.c,v 1.184 2019/05/17 07:39:33 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -1440,25 +1440,12 @@
                ADD(IFM_10G_CX4 | IFM_FDX, 0);
        }
 
-#ifdef IFM_ETH_XTYPE
        if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR) {
                ADD(IFM_10G_KR | IFM_FDX, 0);
        }
        if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KX4) {
                ADD(IFM_10G_KX4 | IFM_FDX, 0);
        }
-#else
-       if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR) {
-               device_printf(dev, "Media supported: 10GbaseKR\n");
-               device_printf(dev, "10GbaseKR mapped to 10GbaseSR\n");
-               ADD(IFM_10G_SR | IFM_FDX, 0);
-       }
-       if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KX4) {
-               device_printf(dev, "Media supported: 10GbaseKX4\n");
-               device_printf(dev, "10GbaseKX4 mapped to 10GbaseCX4\n");
-               ADD(IFM_10G_CX4 | IFM_FDX, 0);
-       }
-#endif
        if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX) {
                ADD(IFM_1000_KX | IFM_FDX, 0);
        }
@@ -2840,11 +2827,7 @@
        if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR)
                switch (adapter->link_speed) {
                case IXGBE_LINK_SPEED_10GB_FULL:
-#ifndef IFM_ETH_XTYPE
-                       ifmr->ifm_active |= IFM_10G_SR | IFM_FDX;
-#else
                        ifmr->ifm_active |= IFM_10G_KR | IFM_FDX;
-#endif
                        break;
                case IXGBE_LINK_SPEED_2_5GB_FULL:
                        ifmr->ifm_active |= IFM_2500_KX | IFM_FDX;
@@ -2858,11 +2841,7 @@
            layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX)
                switch (adapter->link_speed) {
                case IXGBE_LINK_SPEED_10GB_FULL:
-#ifndef IFM_ETH_XTYPE
-                       ifmr->ifm_active |= IFM_10G_CX4 | IFM_FDX;
-#else
                        ifmr->ifm_active |= IFM_10G_KX4 | IFM_FDX;
-#endif
                        break;
                case IXGBE_LINK_SPEED_2_5GB_FULL:
                        ifmr->ifm_active |= IFM_2500_KX | IFM_FDX;
@@ -2942,10 +2921,8 @@
        case IFM_10G_TWINAX:
        case IFM_10G_SR:
        case IFM_10G_CX4:
-#ifdef IFM_ETH_XTYPE
        case IFM_10G_KR:
        case IFM_10G_KX4:
-#endif
                speed |= IXGBE_LINK_SPEED_10GB_FULL;
                break;
        case IFM_5000_T:



Home | Main Index | Thread Index | Old Index