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 No functional change.
details: https://anonhg.NetBSD.org/src/rev/20457683da77
branches: trunk
changeset: 1027204:20457683da77
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Dec 10 11:33:11 2021 +0000
description:
No functional change.
- Sync with FreeBSD ix-3.3.18.
- Rename ixgbe_get_advertise() to ixgbe_get_default_advertise.
- Sort lines, modify comment and whitespace to reduce diff against FreeBSD.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 40 ++++++++++++++++++++--------------------
sys/dev/pci/ixgbe/ixgbe.h | 10 +++++-----
2 files changed, 25 insertions(+), 25 deletions(-)
diffs (123 lines):
diff -r d34257c6502b -r 20457683da77 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Fri Dec 10 11:31:22 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Fri Dec 10 11:33:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.295 2021/12/07 22:13:56 andvar Exp $ */
+/* $NetBSD: ixgbe.c,v 1.296 2021/12/10 11:33:11 msaitoh Exp $ */
/******************************************************************************
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.295 2021/12/07 22:13:56 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.296 2021/12/10 11:33:11 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -235,7 +235,7 @@
static void ixgbe_clear_evcnt(struct adapter *);
static int ixgbe_set_flowcntl(struct adapter *, int);
static int ixgbe_set_advertise(struct adapter *, int);
-static int ixgbe_get_advertise(struct adapter *);
+static int ixgbe_get_default_advertise(struct adapter *);
/* Sysctl handlers */
static void ixgbe_set_sysctl_value(struct adapter *, const char *,
@@ -1229,7 +1229,7 @@
/* Set an initial dmac value */
adapter->dmac = 0;
/* Set initial advertised speeds (if applicable) */
- adapter->advertise = ixgbe_get_advertise(adapter);
+ adapter->advertise = ixgbe_get_default_advertise(adapter);
if (adapter->feat_cap & IXGBE_FEATURE_SRIOV)
ixgbe_define_iov_schemas(dev, &error);
@@ -5536,10 +5536,10 @@
*
* Flags:
* 0x00 - Default (all capable link speed)
- * 0x01 - advertise 100 Mb
- * 0x02 - advertise 1G
- * 0x04 - advertise 10G
- * 0x08 - advertise 10 Mb
+ * 0x1 - advertise 100 Mb
+ * 0x2 - advertise 1G
+ * 0x4 - advertise 10G
+ * 0x8 - advertise 10 Mb (yes, Mb)
* 0x10 - advertise 2.5G
* 0x20 - advertise 5G
************************************************************************/
@@ -5640,19 +5640,19 @@
} /* ixgbe_set_advertise */
/************************************************************************
- * ixgbe_get_advertise - Get current advertised speed settings
+ * ixgbe_get_default_advertise - Get default advertised speed settings
*
* Formatted for sysctl usage.
* Flags:
- * 0x01 - advertise 100 Mb
- * 0x02 - advertise 1G
- * 0x04 - advertise 10G
- * 0x08 - advertise 10 Mb (yes, Mb)
+ * 0x1 - advertise 100 Mb
+ * 0x2 - advertise 1G
+ * 0x4 - advertise 10G
+ * 0x8 - advertise 10 Mb (yes, Mb)
* 0x10 - advertise 2.5G
* 0x20 - advertise 5G
************************************************************************/
static int
-ixgbe_get_advertise(struct adapter *adapter)
+ixgbe_get_default_advertise(struct adapter *adapter)
{
struct ixgbe_hw *hw = &adapter->hw;
int speed;
@@ -5673,15 +5673,15 @@
return (0);
speed =
- ((link_caps & IXGBE_LINK_SPEED_10GB_FULL) ? 0x04 : 0) |
- ((link_caps & IXGBE_LINK_SPEED_1GB_FULL) ? 0x02 : 0) |
- ((link_caps & IXGBE_LINK_SPEED_100_FULL) ? 0x01 : 0) |
- ((link_caps & IXGBE_LINK_SPEED_10_FULL) ? 0x08 : 0) |
+ ((link_caps & IXGBE_LINK_SPEED_10GB_FULL) ? 0x4 : 0) |
+ ((link_caps & IXGBE_LINK_SPEED_5GB_FULL) ? 0x20 : 0) |
((link_caps & IXGBE_LINK_SPEED_2_5GB_FULL) ? 0x10 : 0) |
- ((link_caps & IXGBE_LINK_SPEED_5GB_FULL) ? 0x20 : 0);
+ ((link_caps & IXGBE_LINK_SPEED_1GB_FULL) ? 0x2 : 0) |
+ ((link_caps & IXGBE_LINK_SPEED_100_FULL) ? 0x1 : 0) |
+ ((link_caps & IXGBE_LINK_SPEED_10_FULL) ? 0x8 : 0);
return speed;
-} /* ixgbe_get_advertise */
+} /* ixgbe_get_default_advertise */
/************************************************************************
* ixgbe_sysctl_dmac - Manage DMA Coalescing
diff -r d34257c6502b -r 20457683da77 sys/dev/pci/ixgbe/ixgbe.h
--- a/sys/dev/pci/ixgbe/ixgbe.h Fri Dec 10 11:31:22 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.h Fri Dec 10 11:33:11 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.83 2021/11/17 06:37:44 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.84 2021/12/10 11:33:11 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -676,10 +676,10 @@
/* Sysctl help messages; displayed with sysctl -d */
#define IXGBE_SYSCTL_DESC_ADV_SPEED \
"\nControl advertised link speed using these flags:\n" \
- "\t0x01 - advertise 100M\n" \
- "\t0x02 - advertise 1G\n" \
- "\t0x04 - advertise 10G\n" \
- "\t0x08 - advertise 10M\n" \
+ "\t0x1 - advertise 100M\n" \
+ "\t0x2 - advertise 1G\n" \
+ "\t0x4 - advertise 10G\n" \
+ "\t0x8 - 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."
Home |
Main Index |
Thread Index |
Old Index