Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Use IFM_1000_KX and IFM_2500_KX.
details: https://anonhg.NetBSD.org/src/rev/c95dc7ae8591
branches: trunk
changeset: 354328:c95dc7ae8591
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Jun 12 03:03:22 2017 +0000
description:
Use IFM_1000_KX and IFM_2500_KX.
diffstat:
sys/dev/pci/if_wm.c | 8 ++++----
sys/dev/pci/ixgbe/ixgbe.c | 34 +++++++---------------------------
2 files changed, 11 insertions(+), 31 deletions(-)
diffs (102 lines):
diff -r 8ea1c4a59c0f -r c95dc7ae8591 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Mon Jun 12 01:01:01 2017 +0000
+++ b/sys/dev/pci/if_wm.c Mon Jun 12 03:03:22 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.508 2017/04/13 10:37:36 knakahara Exp $ */
+/* $NetBSD: if_wm.c,v 1.509 2017/06/12 03:03:22 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508 2017/04/13 10:37:36 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.509 2017/06/12 03:03:22 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -10451,9 +10451,9 @@
status = CSR_READ(sc, WMREG_STATUS);
if (((status & STATUS_2P5_SKU) != 0)
&& ((status & STATUS_2P5_SKU_OVER) == 0)) {
- ADD("2500baseKX-FDX", IFM_2500_SX | IFM_FDX,ANAR_X_FD);
+ ADD("2500baseKX-FDX", IFM_2500_KX | IFM_FDX,ANAR_X_FD);
} else
- ADD("1000baseSX-FDX", IFM_1000_SX | IFM_FDX,ANAR_X_FD);
+ ADD("1000baseKX-FDX", IFM_1000_KX | IFM_FDX,ANAR_X_FD);
} else if (sc->sc_type == WM_T_82545) {
/* Only 82545 is LX (XXX except SFP) */
ADD("1000baseLX", IFM_1000_LX, ANAR_X_HD);
diff -r 8ea1c4a59c0f -r c95dc7ae8591 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Jun 12 01:01:01 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Jun 12 03:03:22 2017 +0000
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.88 2017/06/02 08:16:52 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.89 2017/06/12 03:03:22 msaitoh Exp $*/
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2063,37 +2063,14 @@
** XXX: These need to use the proper media types once
** they're added.
*/
-#ifndef IFM_ETH_XTYPE
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;
- break;
- case IXGBE_LINK_SPEED_2_5GB_FULL:
- ifmr->ifm_active |= IFM_2500_SX | IFM_FDX;
- break;
- case IXGBE_LINK_SPEED_1GB_FULL:
- ifmr->ifm_active |= IFM_1000_CX | IFM_FDX;
- break;
- }
- else if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KX4
- || layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX)
- switch (adapter->link_speed) {
- case IXGBE_LINK_SPEED_10GB_FULL:
- ifmr->ifm_active |= IFM_10G_CX4 | IFM_FDX;
- break;
- case IXGBE_LINK_SPEED_2_5GB_FULL:
- ifmr->ifm_active |= IFM_2500_SX | IFM_FDX;
- break;
- case IXGBE_LINK_SPEED_1GB_FULL:
- ifmr->ifm_active |= IFM_1000_CX | IFM_FDX;
- break;
- }
#else
- if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR)
- switch (adapter->link_speed) {
- case IXGBE_LINK_SPEED_10GB_FULL:
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;
@@ -2106,7 +2083,11 @@
|| 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;
@@ -2115,7 +2096,6 @@
ifmr->ifm_active |= IFM_1000_KX | IFM_FDX;
break;
}
-#endif
/* If nothing is recognized... */
#if 0
Home |
Main Index |
Thread Index |
Old Index