From 6dd49175d030d18a5c53e15c4d5f51ffb766f632 Mon Sep 17 00:00:00 2001 From: Kmods SIG Date: Jan 13 2022 23:40:35 +0000 Subject: Switch to EL kernel source and versioning --- diff --git a/.gitignore b/.gitignore index 0977527..27e0206 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/sky2-5.8.tar.xz +SOURCES/sky2-4.18.0-211.el8.tar.xz diff --git a/.kmod-sky2.metadata b/.kmod-sky2.metadata index 3fc1c1f..5e6cb47 100644 --- a/.kmod-sky2.metadata +++ b/.kmod-sky2.metadata @@ -1 +1 @@ -0724f50dec4b3414db841fd5ccfc4e7230d02502 SOURCES/sky2-5.8.tar.xz +0ede93a2fc814b53362e346939b9e66d5e066b45 SOURCES/sky2-4.18.0-211.el8.tar.xz diff --git a/SOURCES/0001-sky2-Increase-D3-delay-again.patch b/SOURCES/0001-sky2-Increase-D3-delay-again.patch new file mode 100644 index 0000000..efcb80d --- /dev/null +++ b/SOURCES/0001-sky2-Increase-D3-delay-again.patch @@ -0,0 +1,34 @@ +From 1765f5dcd00963e33f1b8a4e0f34061fbc0e2f7f Mon Sep 17 00:00:00 2001 +From: Kai-Heng Feng +Date: Tue, 19 Feb 2019 23:45:29 +0800 +Subject: [Backport 1765f5dcd009] sky2: Increase D3 delay again + +Another platform requires even longer delay to make the device work +correctly after S3. + +So increase the delay to 300ms. + +BugLink: https://bugs.launchpad.net/bugs/1798921 + +Signed-off-by: Kai-Heng Feng +Signed-off-by: David S. Miller +--- + src/sky2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/sky2.c b/src/sky2.c +index f3a5fa84860f907748e702fb11521ff625d0f340..57727fe1501ee851ec5ca3e4dfe45d54ee5934e9 100644 +--- a/src/sky2.c ++++ b/src/sky2.c +@@ -5073,7 +5073,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + INIT_WORK(&hw->restart_work, sky2_restart); + + pci_set_drvdata(pdev, hw); +- pdev->d3_delay = 200; ++ pdev->d3_delay = 300; + + return 0; + +-- +2.31.1 + diff --git a/SOURCES/0002-sky2-Disable-MSI-on-Dell-Inspiron-1545-and-Gateway-P.patch b/SOURCES/0002-sky2-Disable-MSI-on-Dell-Inspiron-1545-and-Gateway-P.patch new file mode 100644 index 0000000..8f77c2a --- /dev/null +++ b/SOURCES/0002-sky2-Disable-MSI-on-Dell-Inspiron-1545-and-Gateway-P.patch @@ -0,0 +1,83 @@ +From b33b7cd6fd86478dd2890a9abeb6f036aa01fdf7 Mon Sep 17 00:00:00 2001 +From: Kai-Heng Feng +Date: Mon, 4 Mar 2019 15:00:03 +0800 +Subject: [Backport b33b7cd6fd86] sky2: Disable MSI on Dell Inspiron 1545 and + Gateway P-79 + +Some sky2 chips fire IRQ after S3, before the driver is fully resumed: +[ 686.804877] do_IRQ: 1.37 No irq handler for vector + +This is likely a platform bug that device isn't fully quiesced during +S3. Use MSI-X, maskable MSI or INTx can prevent this issue from +happening. + +Since MSI-X and maskable MSI are not supported by this device, fallback +to use INTx on affected platforms. + +BugLink: https://bugs.launchpad.net/bugs/1807259 +BugLink: https://bugs.launchpad.net/bugs/1809843 +Signed-off-by: Kai-Heng Feng +Signed-off-by: David S. Miller +--- + src/sky2.c | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +diff --git a/src/sky2.c b/src/sky2.c +index 57727fe1501ee851ec5ca3e4dfe45d54ee5934e9..8b3495ee2b6eb7aeeabdb4449e21e05f61562435 100644 +--- a/src/sky2.c ++++ b/src/sky2.c +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + + #include + +@@ -93,7 +94,7 @@ static int copybreak __read_mostly = 128; + module_param(copybreak, int, 0); + MODULE_PARM_DESC(copybreak, "Receive copy threshold"); + +-static int disable_msi = 0; ++static int disable_msi = -1; + module_param(disable_msi, int, 0); + MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); + +@@ -4917,6 +4918,24 @@ static const char *sky2_name(u8 chipid, char *buf, int sz) + return buf; + } + ++static const struct dmi_system_id msi_blacklist[] = { ++ { ++ .ident = "Dell Inspiron 1545", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1545"), ++ }, ++ }, ++ { ++ .ident = "Gateway P-79", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Gateway"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "P-79"), ++ }, ++ }, ++ {} ++}; ++ + static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + { + struct net_device *dev, *dev1; +@@ -5028,6 +5047,9 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + goto err_out_free_pci; + } + ++ if (disable_msi == -1) ++ disable_msi = !!dmi_check_system(msi_blacklist); ++ + if (!disable_msi && pci_enable_msi(pdev) == 0) { + err = sky2_test_msi(hw); + if (err) { +-- +2.31.1 + diff --git a/SOURCES/0003-sky2-Disable-MSI-on-P5W-DH-Deluxe.patch b/SOURCES/0003-sky2-Disable-MSI-on-P5W-DH-Deluxe.patch new file mode 100644 index 0000000..a6380d1 --- /dev/null +++ b/SOURCES/0003-sky2-Disable-MSI-on-P5W-DH-Deluxe.patch @@ -0,0 +1,36 @@ +From 76104862cccaeaa84fdd23e39f2610a96296291c Mon Sep 17 00:00:00 2001 +From: Tasos Sahanidis +Date: Sun, 14 Jul 2019 13:31:11 +0300 +Subject: [Backport 76104862ccca] sky2: Disable MSI on P5W DH Deluxe + +The onboard sky2 NICs send IRQs after S3, resulting in ethernet not +working after resume. +Maskable MSI and MSI-X are also not supported, so fall back to INTx. + +Signed-off-by: Tasos Sahanidis +Signed-off-by: David S. Miller +--- + src/sky2.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/sky2.c b/src/sky2.c +index fe518c854d1fcc78d600f261926923ee2ed7d5aa..f518312ffe695470bf1dd4239d9e2b1b08e5ea54 100644 +--- a/src/sky2.c ++++ b/src/sky2.c +@@ -4917,6 +4917,13 @@ static const struct dmi_system_id msi_blacklist[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "P-79"), + }, + }, ++ { ++ .ident = "ASUS P5W DH Deluxe", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTEK COMPUTER INC"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "P5W DH Deluxe"), ++ }, ++ }, + {} + }; + +-- +2.31.1 + diff --git a/SOURCES/0004-sky2-Disable-MSI-on-ASUS-P6T.patch b/SOURCES/0004-sky2-Disable-MSI-on-ASUS-P6T.patch new file mode 100644 index 0000000..2a9057f --- /dev/null +++ b/SOURCES/0004-sky2-Disable-MSI-on-ASUS-P6T.patch @@ -0,0 +1,41 @@ +From a261e3797506bd561700be643fe1a85bf81e9661 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 23 Jul 2019 17:15:25 +0200 +Subject: [Backport a261e3797506] sky2: Disable MSI on ASUS P6T + +The onboard sky2 NIC on ASUS P6T WS PRO doesn't work after PM resume +due to the infamous IRQ problem. Disabling MSI works around it, so +let's add it to the blacklist. + +Unfortunately the BIOS on the machine doesn't fill the standard +DMI_SYS_* entry, so we pick up DMI_BOARD_* entries instead. + +BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1142496 +Reported-and-tested-by: Marcus Seyfarth +Signed-off-by: Takashi Iwai +Signed-off-by: David S. Miller +--- + src/sky2.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/sky2.c b/src/sky2.c +index f518312ffe695470bf1dd4239d9e2b1b08e5ea54..a01c75ede871a378ac6e32e7b939c4bdd1d112a6 100644 +--- a/src/sky2.c ++++ b/src/sky2.c +@@ -4924,6 +4924,13 @@ static const struct dmi_system_id msi_blacklist[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "P5W DH Deluxe"), + }, + }, ++ { ++ .ident = "ASUS P6T", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), ++ DMI_MATCH(DMI_BOARD_NAME, "P6T"), ++ }, ++ }, + {} + }; + +-- +2.31.1 + diff --git a/SOURCES/0005-sky2-Disable-MSI-on-yet-another-ASUS-boards-P6Xxxx.patch b/SOURCES/0005-sky2-Disable-MSI-on-yet-another-ASUS-boards-P6Xxxx.patch new file mode 100644 index 0000000..5f1ece3 --- /dev/null +++ b/SOURCES/0005-sky2-Disable-MSI-on-yet-another-ASUS-boards-P6Xxxx.patch @@ -0,0 +1,39 @@ +From 189308d5823a089b56e2299cd96589507dac7319 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 28 Aug 2019 08:31:19 +0200 +Subject: [Backport 189308d5823a] sky2: Disable MSI on yet another ASUS boards + (P6Xxxx) + +A similar workaround for the suspend/resume problem is needed for yet +another ASUS machines, P6X models. Like the previous fix, the BIOS +doesn't provide the standard DMI_SYS_* entry, so again DMI_BOARD_* +entries are used instead. + +Reported-and-tested-by: SteveM +Signed-off-by: Takashi Iwai +Signed-off-by: David S. Miller +--- + src/sky2.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/sky2.c b/src/sky2.c +index a01c75ede871a378ac6e32e7b939c4bdd1d112a6..e0363870f3a55c2bb784a55e9d3ef1aafcf89e4a 100644 +--- a/src/sky2.c ++++ b/src/sky2.c +@@ -4931,6 +4931,13 @@ static const struct dmi_system_id msi_blacklist[] = { + DMI_MATCH(DMI_BOARD_NAME, "P6T"), + }, + }, ++ { ++ .ident = "ASUS P6X", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), ++ DMI_MATCH(DMI_BOARD_NAME, "P6X"), ++ }, ++ }, + {} + }; + +-- +2.31.1 + diff --git a/SOURCES/0006-net-sky2-reject-unsupported-coalescing-params.patch b/SOURCES/0006-net-sky2-reject-unsupported-coalescing-params.patch new file mode 100644 index 0000000..b02de46 --- /dev/null +++ b/SOURCES/0006-net-sky2-reject-unsupported-coalescing-params.patch @@ -0,0 +1,35 @@ +From a1edda361520f80c68e56380c097b125b375261c Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Thu, 12 Mar 2020 21:07:55 -0700 +Subject: [Backport a1edda361520] net: sky2: reject unsupported coalescing + params + +Set ethtool_ops->supported_coalesce_params to let +the core reject unsupported coalescing parameters. + +This driver did not previously reject unsupported parameters. + +Signed-off-by: Jakub Kicinski +Signed-off-by: David S. Miller +--- + src/sky2.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/sky2.c b/src/sky2.c +index ebfd0ceac884d9afb7a623f013595ced19eabac0..241f007169797b8a21e4496610b700698bd1d8c1 100644 +--- a/src/sky2.c ++++ b/src/sky2.c +@@ -4400,6 +4400,10 @@ static int sky2_set_features(struct net_device *dev, netdev_features_t features) + } + + static const struct ethtool_ops sky2_ethtool_ops = { ++ .supported_coalesce_params = ETHTOOL_COALESCE_USECS | ++ ETHTOOL_COALESCE_MAX_FRAMES | ++ ETHTOOL_COALESCE_RX_USECS_IRQ | ++ ETHTOOL_COALESCE_RX_MAX_FRAMES_IRQ, + .get_drvinfo = sky2_get_drvinfo, + .get_wol = sky2_get_wol, + .set_wol = sky2_set_wol, +-- +2.31.1 + diff --git a/SOURCES/0007-Marvell-Sky2-Ethernet-adapter-fix-warning-messages.patch b/SOURCES/0007-Marvell-Sky2-Ethernet-adapter-fix-warning-messages.patch new file mode 100644 index 0000000..052fbc0 --- /dev/null +++ b/SOURCES/0007-Marvell-Sky2-Ethernet-adapter-fix-warning-messages.patch @@ -0,0 +1,39 @@ +From 18755e270666ce869289bceb734d25eae2be9da9 Mon Sep 17 00:00:00 2001 +From: Krzysztof Halasa +Date: Thu, 18 Feb 2021 13:34:42 +0100 +Subject: [Backport 18755e270666] Marvell Sky2 Ethernet adapter: fix warning + messages. + +sky2.c driver uses netdev_warn() before the net device is initialized. +Fix it by using dev_warn() instead. + +Signed-off-by: Krzysztof Halasa + +Link: https://lore.kernel.org/r/m3a6s1r1ul.fsf@t19.piap.pl +Signed-off-by: Jakub Kicinski +--- + src/sky2.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/sky2.c b/src/sky2.c +index ebe1406c6e64821f26e9f025d9ce8f01b0f74c42..dbec8e187a6821558b5bf8373364eeb3487bf06d 100644 +--- a/src/sky2.c ++++ b/src/sky2.c +@@ -4806,12 +4806,11 @@ static struct net_device *sky2_init_netdev(struct sky2_hw *hw, unsigned port, + if (!is_valid_ether_addr(dev->dev_addr)) { + struct sockaddr sa = { AF_UNSPEC }; + +- netdev_warn(dev, +- "Invalid MAC address, defaulting to random\n"); ++ dev_warn(&hw->pdev->dev, "Invalid MAC address, defaulting to random\n"); + eth_hw_addr_random(dev); + memcpy(sa.sa_data, dev->dev_addr, ETH_ALEN); + if (sky2_set_mac_address(dev, &sa)) +- netdev_warn(dev, "Failed to set MAC address.\n"); ++ dev_warn(&hw->pdev->dev, "Failed to set MAC address.\n"); + } + + return dev; +-- +2.31.1 + diff --git a/SPECS/kmod-sky2.spec b/SPECS/kmod-sky2.spec index 27bfc80..6ccc469 100644 --- a/SPECS/kmod-sky2.spec +++ b/SPECS/kmod-sky2.spec @@ -1,6 +1,8 @@ %global pkg sky2 -%global kernel_version 4.18.0-358.el8 +%global driver_version 4.18.0-211.el8 + +%global kernel_version 4.18.0-348.el8 %global _use_internal_dependency_generator 0 %global __find_requires /usr/lib/rpm/redhat/find-requires @@ -18,14 +20,21 @@ Name: kmod-%{pkg} -Version: 5.8 -Release: 9%{?dist} +Version: 4.18.0.211 +Release: 1%{?dist} Summary: Marvell Yukon 2 Gigabit Ethernet (%{pkg}) driver License: GPLv2 URL: https://www.kernel.org/ -Source0: %{pkg}-%{version}.tar.xz +Source0: %{pkg}-%{driver_version}.tar.xz +Patch1: 0001-sky2-Increase-D3-delay-again.patch +Patch2: 0002-sky2-Disable-MSI-on-Dell-Inspiron-1545-and-Gateway-P.patch +Patch3: 0003-sky2-Disable-MSI-on-P5W-DH-Deluxe.patch +Patch4: 0004-sky2-Disable-MSI-on-ASUS-P6T.patch +Patch5: 0005-sky2-Disable-MSI-on-yet-another-ASUS-boards-P6Xxxx.patch +Patch6: 0006-net-sky2-reject-unsupported-coalescing-params.patch +Patch7: 0007-Marvell-Sky2-Ethernet-adapter-fix-warning-messages.patch ExclusiveArch: x86_64 aarch64 @@ -105,7 +114,7 @@ chipset: %prep -%autosetup -p1 -n %{pkg}-%{version} +%autosetup -p1 -n %{pkg}-%{driver_version} %build @@ -167,17 +176,6 @@ fi %changelog -* Tue Jan 11 2022 Kmods SIG - 5.8-9 -- Bump release v5.8 to 2e42c35a290b - -* Mon Jan 10 2022 Kmods SIG - 5.8-8 -- Rebuild for 4.18.0-358.el8 - -* Thu Oct 21 2021 Peter Georg - 5.8-7 -- Rebuild for 4.18.0-348.el8 - -* Wed Sep 29 2021 Peter Georg - 5.8-6 -- Rebuild for 4.18.0-338.el8 - -* Tue Sep 28 2021 Peter Georg - 5.8-5 -- Convert to kABI tracking kmod package (kernel >= 4.18.0-315.el8) +* Wed Jan 12 2022 Kmods SIG - 4.18.0.211-1 +- Switch to EL kernel source and versioning +- kABI tracking kmod package (kernel >= 4.18.0-348.el8)