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 - Handle hw.ixgN.advertise_speed correctly.
details: https://anonhg.NetBSD.org/src/rev/cf39b4601c5a
branches: trunk
changeset: 357245:cf39b4601c5a
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Nov 02 08:41:15 2017 +0000
description:
- Handle hw.ixgN.advertise_speed correctly.
- Fix hw.ixgN.advertise_speed sysctl's description.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 9 ++++-----
sys/dev/pci/ixgbe/ixgbe.h | 14 ++++++++------
2 files changed, 12 insertions(+), 11 deletions(-)
diffs (58 lines):
diff -r 34e6a8f1ed29 -r cf39b4601c5a sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Nov 02 02:08:02 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Nov 02 08:41:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.108 2017/10/26 01:40:33 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.109 2017/11/02 08:41:15 msaitoh Exp $ */
/******************************************************************************
@@ -2689,9 +2689,8 @@
hw->mac.autotry_restart = TRUE;
hw->mac.ops.setup_link(hw, speed, TRUE);
- if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) {
- adapter->advertise = 0;
- } else {
+ adapter->advertise = 0;
+ if (IFM_SUBTYPE(ifm->ifm_media) != IFM_AUTO) {
if ((speed & IXGBE_LINK_SPEED_10GB_FULL) != 0)
adapter->advertise |= 1 << 2;
if ((speed & IXGBE_LINK_SPEED_1GB_FULL) != 0)
@@ -4783,7 +4782,7 @@
return (EINVAL);
}
- if (advertise < 0x0 || advertise > 0xF) {
+ if (advertise < 0x0 || advertise > 0x2f) {
device_printf(dev,
"Invalid advertised speed; valid modes are 0x0 through 0x7\n");
return (EINVAL);
diff -r 34e6a8f1ed29 -r cf39b4601c5a sys/dev/pci/ixgbe/ixgbe.h
--- a/sys/dev/pci/ixgbe/ixgbe.h Thu Nov 02 02:08:02 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.h Thu Nov 02 08:41:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.26 2017/08/30 08:49:18 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.27 2017/11/02 08:41:15 msaitoh Exp $ */
/******************************************************************************
@@ -631,11 +631,13 @@
/* Sysctl help messages; displayed with sysctl -d */
#define IXGBE_SYSCTL_DESC_ADV_SPEED \
"\nControl advertised link speed using these flags:\n" \
- "\t0x1 - advertise 100M\n" \
- "\t0x2 - advertise 1G\n" \
- "\t0x4 - advertise 10G\n\n" \
- "\t0x8 - advertise 10M\n\n" \
- "\t100M and 10M are only supported on certain adapters."
+ "\t0x01 - advertise 100M\n" \
+ "\t0x02 - advertise 1G\n" \
+ "\t0x04 - advertise 10G\n" \
+ "\t0x08 - advertise 10M\n" \
+ "\t0x10 - advertise 2.5G\n" \
+ "\t0x20 - advertise 5G\n\n" \
+ "\t5G, 2.5G, 100M and 10M are only supported on certain adapters."
#define IXGBE_SYSCTL_DESC_SET_FC \
"\nSet flow control mode using these values:\n" \
Home |
Main Index |
Thread Index |
Old Index