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 IFM_1000_KX more.
details: https://anonhg.NetBSD.org/src/rev/e383e1ed77e7
branches: trunk
changeset: 354639:e383e1ed77e7
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Jun 23 04:36:48 2017 +0000
description:
Use IFM_1000_KX more.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 45 ++++++++-------------------------------------
1 files changed, 8 insertions(+), 37 deletions(-)
diffs (94 lines):
diff -r 385293c82fd0 -r e383e1ed77e7 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Fri Jun 23 04:27:55 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Fri Jun 23 04:36:48 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.89 2017/06/12 03:03:22 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.90 2017/06/23 04:36:48 msaitoh Exp $*/
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2145,41 +2145,19 @@
** media types of the adapter; ifmedia will take care of
** that for us.
*/
-#ifndef IFM_ETH_XTYPE
switch (IFM_SUBTYPE(ifm->ifm_media)) {
case IFM_AUTO:
case IFM_10G_T:
speed |= IXGBE_LINK_SPEED_100_FULL;
case IFM_10G_LRM:
+ case IFM_10G_LR:
+#ifndef IFM_ETH_XTYPE
case IFM_10G_SR: /* KR, too */
- case IFM_10G_LR:
case IFM_10G_CX4: /* KX4 */
- speed |= IXGBE_LINK_SPEED_1GB_FULL;
- case IFM_10G_TWINAX:
- speed |= IXGBE_LINK_SPEED_10GB_FULL;
- break;
- case IFM_1000_T:
- speed |= IXGBE_LINK_SPEED_100_FULL;
- case IFM_1000_LX:
- case IFM_1000_SX:
- case IFM_1000_CX: /* KX */
- speed |= IXGBE_LINK_SPEED_1GB_FULL;
- break;
- case IFM_100_TX:
- speed |= IXGBE_LINK_SPEED_100_FULL;
- break;
- default:
- goto invalid;
- }
#else
- switch (IFM_SUBTYPE(ifm->ifm_media)) {
- case IFM_AUTO:
- case IFM_10G_T:
- speed |= IXGBE_LINK_SPEED_100_FULL;
- case IFM_10G_LRM:
case IFM_10G_KR:
- case IFM_10G_LR:
case IFM_10G_KX4:
+#endif
speed |= IXGBE_LINK_SPEED_1GB_FULL;
case IFM_10G_TWINAX:
speed |= IXGBE_LINK_SPEED_10GB_FULL;
@@ -2197,7 +2175,6 @@
default:
goto invalid;
}
-#endif
hw->mac.autotry_restart = TRUE;
hw->mac.ops.setup_link(hw, speed, TRUE);
@@ -3260,10 +3237,6 @@
ADD(AIFM_10G_KX4, 0);
ADD(AIFM_10G_KX4 | IFM_FDX, 0);
}
- if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX) {
- ADD(IFM_1000_KX, 0);
- ADD(IFM_1000_KX | IFM_FDX, 0);
- }
#else
if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR) {
device_printf(dev, "Media supported: 10GbaseKR\n");
@@ -3277,13 +3250,11 @@
ADD(IFM_10G_CX4, 0);
ADD(IFM_10G_CX4 | IFM_FDX, 0);
}
+#endif
if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX) {
- device_printf(dev, "Media supported: 1000baseKX\n");
- device_printf(dev, "1000baseKX mapped to 1000baseCX\n");
- ADD(IFM_1000_CX, 0);
- ADD(IFM_1000_CX | IFM_FDX, 0);
- }
-#endif
+ ADD(IFM_1000_KX, 0);
+ ADD(IFM_1000_KX | IFM_FDX, 0);
+ }
if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_BX)
device_printf(dev, "Media supported: 1000baseBX\n");
/* XXX no ifmedia_set? */
Home |
Main Index |
Thread Index |
Old Index