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 Limit MA10-ST0's quirk only for on-chip de...
details: https://anonhg.NetBSD.org/src/rev/2eb849d19857
branches: trunk
changeset: 943122:2eb849d19857
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Aug 27 04:54:43 2020 +0000
description:
Limit MA10-ST0's quirk only for on-chip devices.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 37 ++++++++++++++++++++++---------------
1 files changed, 22 insertions(+), 15 deletions(-)
diffs (67 lines):
diff -r 2a0c021792c9 -r 2eb849d19857 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Aug 27 04:49:52 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Aug 27 04:54:43 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.247 2020/08/27 04:49:52 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.248 2020/08/27 04:54:43 msaitoh Exp $ */
/******************************************************************************
@@ -768,19 +768,26 @@
ixgbe_quirks(struct adapter *adapter)
{
device_t dev = adapter->dev;
+ struct ixgbe_hw *hw = &adapter->hw;
const char *vendor, *product;
- /* Quirk for inverted logic of SFP+'s MOD_ABS */
- vendor = pmf_get_platform("system-vendor");
- product = pmf_get_platform("system-product");
-
- if ((vendor == NULL) || (product == NULL))
- return;
-
- if ((strcmp(vendor, "GIGABYTE") == 0) &&
- (strcmp(product, "MA10-ST0") == 0)) {
- aprint_verbose_dev(dev, "Enable SFP+ MOD_ABS inverse quirk\n");
- adapter->quirks |= IXGBE_QUIRK_MOD_ABS_INVERT;
+ if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SFP_N) {
+ /*
+ * Quirk for inverted logic of SFP+'s MOD_ABS on GIGABYTE
+ * MA10-ST0.
+ */
+ vendor = pmf_get_platform("system-vendor");
+ product = pmf_get_platform("system-product");
+
+ if ((vendor == NULL) || (product == NULL))
+ return;
+
+ if ((strcmp(vendor, "GIGABYTE") == 0) &&
+ (strcmp(product, "MA10-ST0") == 0)) {
+ aprint_verbose_dev(dev,
+ "Enable SFP+ MOD_ABS inverse quirk\n");
+ adapter->quirks |= IXGBE_QUIRK_MOD_ABS_INVERT;
+ }
}
}
@@ -831,9 +838,6 @@
aprint_normal(": %s, Version - %s\n",
ixgbe_strings[ent->index], ixgbe_driver_version);
- /* Set quirk flags */
- ixgbe_quirks(adapter);
-
/* Core Lock Init */
IXGBE_CORE_LOCK_INIT(adapter, device_xname(dev));
@@ -860,6 +864,9 @@
hw->subsystem_vendor_id = PCI_SUBSYS_VENDOR(subid);
hw->subsystem_device_id = PCI_SUBSYS_ID(subid);
+ /* Set quirk flags */
+ ixgbe_quirks(adapter);
+
/*
* Make sure BUSMASTER is set
*/
Home |
Main Index |
Thread Index |
Old Index