diff --git a/devices/igb/Makefile.am b/devices/igb/Makefile.am index 0a5f7275..1ee45730 100644 --- a/devices/igb/Makefile.am +++ b/devices/igb/Makefile.am @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ # -# Copyright (C) 2006-2021 Florian Pose, Ingenieurgemeinschaft IgH +# Copyright (C) 2006-2026 Florian Pose, Ingenieurgemeinschaft IgH # # This file is part of the IgH EtherCAT Master. # @@ -26,14 +26,14 @@ EXTRA_DIST = \ e1000_82575-3.18-ethercat.h \ e1000_82575-3.18-orig.c \ e1000_82575-3.18-orig.h \ - e1000_82575-4.19-ethercat.c \ - e1000_82575-4.19-ethercat.h \ - e1000_82575-4.19-orig.c \ - e1000_82575-4.19-orig.h \ e1000_82575-4.4-ethercat.c \ e1000_82575-4.4-ethercat.h \ e1000_82575-4.4-orig.c \ e1000_82575-4.4-orig.h \ + e1000_82575-4.19-ethercat.c \ + e1000_82575-4.19-ethercat.h \ + e1000_82575-4.19-orig.c \ + e1000_82575-4.19-orig.h \ e1000_82575-5.10-ethercat.c \ e1000_82575-5.10-ethercat.h \ e1000_82575-5.10-orig.c \ @@ -55,8 +55,8 @@ EXTRA_DIST = \ e1000_82575-6.4-orig.c \ e1000_82575-6.4-orig.h \ e1000_82575-6.8-ethercat.c \ - e1000_82575-6.8-orig.c \ e1000_82575-6.8-ethercat.h \ + e1000_82575-6.8-orig.c \ e1000_82575-6.8-orig.h \ e1000_82575-6.12-ethercat.c \ e1000_82575-6.12-ethercat.h \ @@ -64,10 +64,10 @@ EXTRA_DIST = \ e1000_82575-6.12-orig.h \ e1000_defines-3.18-ethercat.h \ e1000_defines-3.18-orig.h \ - e1000_defines-4.19-ethercat.h \ - e1000_defines-4.19-orig.h \ e1000_defines-4.4-ethercat.h \ e1000_defines-4.4-orig.h \ + e1000_defines-4.19-ethercat.h \ + e1000_defines-4.19-orig.h \ e1000_defines-5.10-ethercat.h \ e1000_defines-5.10-orig.h \ e1000_defines-5.14-ethercat.h \ @@ -84,10 +84,10 @@ EXTRA_DIST = \ e1000_defines-6.12-orig.h \ e1000_hw-3.18-ethercat.h \ e1000_hw-3.18-orig.h \ - e1000_hw-4.19-ethercat.h \ - e1000_hw-4.19-orig.h \ e1000_hw-4.4-ethercat.h \ e1000_hw-4.4-orig.h \ + e1000_hw-4.19-ethercat.h \ + e1000_hw-4.19-orig.h \ e1000_hw-5.10-ethercat.h \ e1000_hw-5.10-orig.h \ e1000_hw-5.14-ethercat.h \ @@ -106,14 +106,14 @@ EXTRA_DIST = \ e1000_i210-3.18-ethercat.h \ e1000_i210-3.18-orig.c \ e1000_i210-3.18-orig.h \ - e1000_i210-4.19-ethercat.c \ - e1000_i210-4.19-ethercat.h \ - e1000_i210-4.19-orig.c \ - e1000_i210-4.19-orig.h \ e1000_i210-4.4-ethercat.c \ e1000_i210-4.4-ethercat.h \ e1000_i210-4.4-orig.c \ e1000_i210-4.4-orig.h \ + e1000_i210-4.19-ethercat.c \ + e1000_i210-4.19-ethercat.h \ + e1000_i210-4.19-orig.c \ + e1000_i210-4.19-orig.h \ e1000_i210-5.10-ethercat.c \ e1000_i210-5.10-ethercat.h \ e1000_i210-5.10-orig.c \ @@ -146,14 +146,14 @@ EXTRA_DIST = \ e1000_mac-3.18-ethercat.h \ e1000_mac-3.18-orig.c \ e1000_mac-3.18-orig.h \ - e1000_mac-4.19-ethercat.c \ - e1000_mac-4.19-ethercat.h \ - e1000_mac-4.19-orig.c \ - e1000_mac-4.19-orig.h \ e1000_mac-4.4-ethercat.c \ e1000_mac-4.4-ethercat.h \ e1000_mac-4.4-orig.c \ e1000_mac-4.4-orig.h \ + e1000_mac-4.19-ethercat.c \ + e1000_mac-4.19-ethercat.h \ + e1000_mac-4.19-orig.c \ + e1000_mac-4.19-orig.h \ e1000_mac-5.10-ethercat.c \ e1000_mac-5.10-ethercat.h \ e1000_mac-5.10-orig.c \ @@ -186,14 +186,14 @@ EXTRA_DIST = \ e1000_mbx-3.18-ethercat.h \ e1000_mbx-3.18-orig.c \ e1000_mbx-3.18-orig.h \ - e1000_mbx-4.19-ethercat.c \ - e1000_mbx-4.19-ethercat.h \ - e1000_mbx-4.19-orig.c \ - e1000_mbx-4.19-orig.h \ e1000_mbx-4.4-ethercat.c \ e1000_mbx-4.4-ethercat.h \ e1000_mbx-4.4-orig.c \ e1000_mbx-4.4-orig.h \ + e1000_mbx-4.19-ethercat.c \ + e1000_mbx-4.19-ethercat.h \ + e1000_mbx-4.19-orig.c \ + e1000_mbx-4.19-orig.h \ e1000_mbx-5.10-ethercat.c \ e1000_mbx-5.10-ethercat.h \ e1000_mbx-5.10-orig.c \ @@ -226,14 +226,14 @@ EXTRA_DIST = \ e1000_nvm-3.18-ethercat.h \ e1000_nvm-3.18-orig.c \ e1000_nvm-3.18-orig.h \ - e1000_nvm-4.19-ethercat.c \ - e1000_nvm-4.19-ethercat.h \ - e1000_nvm-4.19-orig.c \ - e1000_nvm-4.19-orig.h \ e1000_nvm-4.4-ethercat.c \ e1000_nvm-4.4-ethercat.h \ e1000_nvm-4.4-orig.c \ e1000_nvm-4.4-orig.h \ + e1000_nvm-4.19-ethercat.c \ + e1000_nvm-4.19-ethercat.h \ + e1000_nvm-4.19-orig.c \ + e1000_nvm-4.19-orig.h \ e1000_nvm-5.10-ethercat.c \ e1000_nvm-5.10-ethercat.h \ e1000_nvm-5.10-orig.c \ @@ -255,7 +255,7 @@ EXTRA_DIST = \ e1000_nvm-6.4-orig.c \ e1000_nvm-6.4-orig.h \ e1000_nvm-6.8-ethercat.c \ - e1000_nvm-6.8-orig.h \ + e1000_nvm-6.8-ethercat.h \ e1000_nvm-6.8-orig.c \ e1000_nvm-6.8-orig.h \ e1000_nvm-6.12-ethercat.c \ @@ -266,14 +266,14 @@ EXTRA_DIST = \ e1000_phy-3.18-ethercat.h \ e1000_phy-3.18-orig.c \ e1000_phy-3.18-orig.h \ - e1000_phy-4.19-ethercat.c \ - e1000_phy-4.19-ethercat.h \ - e1000_phy-4.19-orig.c \ - e1000_phy-4.19-orig.h \ e1000_phy-4.4-ethercat.c \ e1000_phy-4.4-ethercat.h \ e1000_phy-4.4-orig.c \ e1000_phy-4.4-orig.h \ + e1000_phy-4.19-ethercat.c \ + e1000_phy-4.19-ethercat.h \ + e1000_phy-4.19-orig.c \ + e1000_phy-4.19-orig.h \ e1000_phy-5.10-ethercat.c \ e1000_phy-5.10-ethercat.h \ e1000_phy-5.10-orig.c \ @@ -289,11 +289,9 @@ EXTRA_DIST = \ e1000_phy-6.1-ethercat.c \ e1000_phy-6.1-ethercat.h \ e1000_phy-6.1-orig.c \ - e1000_phy-6.1-orig.c \ e1000_phy-6.4-ethercat.c \ e1000_phy-6.4-ethercat.h \ e1000_phy-6.4-orig.h \ - e1000_phy-6.4-orig.h \ e1000_phy-6.8-ethercat.c \ e1000_phy-6.8-ethercat.h \ e1000_phy-6.8-orig.c \ @@ -304,10 +302,10 @@ EXTRA_DIST = \ e1000_phy-6.12-orig.h \ e1000_regs-3.18-ethercat.h \ e1000_regs-3.18-orig.h \ - e1000_regs-4.19-ethercat.h \ - e1000_regs-4.19-orig.h \ e1000_regs-4.4-ethercat.h \ e1000_regs-4.4-orig.h \ + e1000_regs-4.19-ethercat.h \ + e1000_regs-4.19-orig.h \ e1000_regs-5.10-ethercat.h \ e1000_regs-5.10-orig.h \ e1000_regs-5.14-ethercat.h \ @@ -324,10 +322,10 @@ EXTRA_DIST = \ e1000_regs-6.12-orig.h \ igb-3.18-ethercat.h \ igb-3.18-orig.h \ - igb-4.19-ethercat.h \ - igb-4.19-orig.h \ igb-4.4-ethercat.h \ igb-4.4-orig.h \ + igb-4.19-ethercat.h \ + igb-4.19-orig.h \ igb-5.10-ethercat.h \ igb-5.10-orig.h \ igb-5.14-ethercat.h \ @@ -344,10 +342,10 @@ EXTRA_DIST = \ igb-6.12-orig.h \ igb_ethtool-3.18-ethercat.c \ igb_ethtool-3.18-orig.c \ - igb_ethtool-4.19-ethercat.c \ - igb_ethtool-4.19-orig.c \ igb_ethtool-4.4-ethercat.c \ igb_ethtool-4.4-orig.c \ + igb_ethtool-4.19-ethercat.c \ + igb_ethtool-4.19-orig.c \ igb_ethtool-5.10-ethercat.c \ igb_ethtool-5.10-orig.c \ igb_ethtool-5.14-ethercat.c \ @@ -362,10 +360,10 @@ EXTRA_DIST = \ igb_ethtool-6.12-orig.c \ igb_hwmon-3.18-ethercat.c \ igb_hwmon-3.18-orig.c \ - igb_hwmon-4.19-ethercat.c \ - igb_hwmon-4.19-orig.c \ igb_hwmon-4.4-ethercat.c \ igb_hwmon-4.4-orig.c \ + igb_hwmon-4.19-ethercat.c \ + igb_hwmon-4.19-orig.c \ igb_hwmon-5.10-ethercat.c \ igb_hwmon-5.10-orig.c \ igb_hwmon-5.14-ethercat.c \ @@ -382,10 +380,10 @@ EXTRA_DIST = \ igb_hwmon-6.12-orig.c \ igb_main-3.18-ethercat.c \ igb_main-3.18-orig.c \ - igb_main-4.19-ethercat.c \ - igb_main-4.19-orig.c \ igb_main-4.4-ethercat.c \ igb_main-4.4-orig.c \ + igb_main-4.19-ethercat.c \ + igb_main-4.19-orig.c \ igb_main-5.10-ethercat.c \ igb_main-5.10-orig.c \ igb_main-5.14-ethercat.c \ @@ -402,10 +400,10 @@ EXTRA_DIST = \ igb_main-6.12-orig.c \ igb_ptp-3.18-ethercat.c \ igb_ptp-3.18-orig.c \ - igb_ptp-4.19-ethercat.c \ - igb_ptp-4.19-orig.c \ igb_ptp-4.4-ethercat.c \ igb_ptp-4.4-orig.c \ + igb_ptp-4.19-ethercat.c \ + igb_ptp-4.19-orig.c \ igb_ptp-5.10-ethercat.c \ igb_ptp-5.10-orig.c \ igb_ptp-5.14-ethercat.c \ diff --git a/devices/igb/e1000_i210-6.8-ethercat.c b/devices/igb/e1000_i210-6.8-ethercat.c index 01d94414..668bfdb2 100644 --- a/devices/igb/e1000_i210-6.8-ethercat.c +++ b/devices/igb/e1000_i210-6.8-ethercat.c @@ -8,6 +8,7 @@ #include #include #include + #include "e1000_hw-6.8-ethercat.h" #include "e1000_i210-6.8-ethercat.h" diff --git a/devices/igb/e1000_nvm-6.8-ethercat.c b/devices/igb/e1000_nvm-6.8-ethercat.c index 378b68c5..d44f41cb 100644 --- a/devices/igb/e1000_nvm-6.8-ethercat.c +++ b/devices/igb/e1000_nvm-6.8-ethercat.c @@ -4,6 +4,7 @@ #include #include #include + #include "e1000_mac-6.8-ethercat.h" #include "e1000_nvm-6.8-ethercat.h" diff --git a/devices/igb/e1000_phy-6.8-ethercat.c b/devices/igb/e1000_phy-6.8-ethercat.c index 287ef690..ddcc8a46 100644 --- a/devices/igb/e1000_phy-6.8-ethercat.c +++ b/devices/igb/e1000_phy-6.8-ethercat.c @@ -4,6 +4,7 @@ #include #include #include + #include "e1000_mac-6.8-ethercat.h" #include "e1000_phy-6.8-ethercat.h" diff --git a/devices/igb/igb_ethtool-6.8-ethercat.c b/devices/igb/igb_ethtool-6.8-ethercat.c index 4f28115b..99698ff3 100644 --- a/devices/igb/igb_ethtool-6.8-ethercat.c +++ b/devices/igb/igb_ethtool-6.8-ethercat.c @@ -18,19 +18,6 @@ #include "igb-6.8-ethercat.h" - -#ifdef CONFIG_SUSE_KERNEL -#include -#else -# ifndef SUSE_VERSION -# define SUSE_VERSION 0 -# endif -# ifndef SUSE_PATCHLEVEL -# define SUSE_PATCHLEVEL 0 -# endif -#endif - - struct igb_stats { char stat_string[ETH_GSTRING_LEN]; int sizeof_stat; diff --git a/devices/igb/igb_main-6.8-ethercat.c b/devices/igb/igb_main-6.8-ethercat.c index 13c6556d..9ce4bffa 100644 --- a/devices/igb/igb_main-6.8-ethercat.c +++ b/devices/igb/igb_main-6.8-ethercat.c @@ -37,6 +37,7 @@ #include #endif #include + #include "igb-6.8-ethercat.h" enum queue_mode { diff --git a/devices/r8169/r8169_main-5.10-ethercat.c b/devices/r8169/r8169_main-5.10-ethercat.c index b00c04af..9c4b8b37 100644 --- a/devices/r8169/r8169_main-5.10-ethercat.c +++ b/devices/r8169/r8169_main-5.10-ethercat.c @@ -5093,7 +5093,9 @@ static void rtl_remove_one(struct pci_dev *pdev) rtl_release_firmware(tp); /* restore original MAC address */ - rtl_rar_set(tp, tp->dev->perm_addr); + if (is_valid_ether_addr(tp->dev->perm_addr)) { + rtl_rar_set(tp, tp->dev->perm_addr); + } } static const struct net_device_ops rtl_netdev_ops = { diff --git a/devices/r8169/r8169_main-5.14-ethercat.c b/devices/r8169/r8169_main-5.14-ethercat.c index 287bda91..7306ccd8 100644 --- a/devices/r8169/r8169_main-5.14-ethercat.c +++ b/devices/r8169/r8169_main-5.14-ethercat.c @@ -5071,7 +5071,9 @@ static void rtl_remove_one(struct pci_dev *pdev) rtl_release_firmware(tp); /* restore original MAC address */ - rtl_rar_set(tp, tp->dev->perm_addr); + if (is_valid_ether_addr(tp->dev->perm_addr)) { + rtl_rar_set(tp, tp->dev->perm_addr); + } } static const struct net_device_ops rtl_netdev_ops = { diff --git a/devices/r8169/r8169_main-5.15-ethercat.c b/devices/r8169/r8169_main-5.15-ethercat.c index 0e1f88f9..e115922a 100644 --- a/devices/r8169/r8169_main-5.15-ethercat.c +++ b/devices/r8169/r8169_main-5.15-ethercat.c @@ -5064,7 +5064,9 @@ static void rtl_remove_one(struct pci_dev *pdev) rtl_release_firmware(tp); /* restore original MAC address */ - rtl_rar_set(tp, tp->dev->perm_addr); + if (is_valid_ether_addr(tp->dev->perm_addr)) { + rtl_rar_set(tp, tp->dev->perm_addr); + } } static const struct net_device_ops rtl_netdev_ops = { diff --git a/devices/r8169/r8169_main-6.1-ethercat.c b/devices/r8169/r8169_main-6.1-ethercat.c index 3f4a77ca..f488fa84 100644 --- a/devices/r8169/r8169_main-6.1-ethercat.c +++ b/devices/r8169/r8169_main-6.1-ethercat.c @@ -4942,7 +4942,9 @@ static void rtl_remove_one(struct pci_dev *pdev) rtl_release_firmware(tp); /* restore original MAC address */ - rtl_rar_set(tp, tp->dev->perm_addr); + if (is_valid_ether_addr(tp->dev->perm_addr)) { + rtl_rar_set(tp, tp->dev->perm_addr); + } } static const struct net_device_ops rtl_netdev_ops = { diff --git a/devices/r8169/r8169_main-6.12-ethercat.c b/devices/r8169/r8169_main-6.12-ethercat.c index 9f81baf5..b1a31f50 100644 --- a/devices/r8169/r8169_main-6.12-ethercat.c +++ b/devices/r8169/r8169_main-6.12-ethercat.c @@ -5168,8 +5168,9 @@ static void rtl_shutdown(struct pci_dev *pdev) rtnl_unlock(); /* Restore original MAC address */ - rtl_rar_set(tp, tp->dev->perm_addr); - + if (is_valid_ether_addr(tp->dev->perm_addr)) { + rtl_rar_set(tp, tp->dev->perm_addr); + } if (system_state == SYSTEM_POWER_OFF && !tp->dash_enabled) { pci_wake_from_d3(pdev, tp->saved_wolopts); pci_set_power_state(pdev, PCI_D3hot); @@ -5202,7 +5203,9 @@ static void rtl_remove_one(struct pci_dev *pdev) rtl_release_firmware(tp); /* restore original MAC address */ - rtl_rar_set(tp, tp->dev->perm_addr); + if (is_valid_ether_addr(tp->dev->perm_addr)) { + rtl_rar_set(tp, tp->dev->perm_addr); + } } static const struct net_device_ops rtl_netdev_ops = { diff --git a/devices/r8169/r8169_main-6.4-ethercat.c b/devices/r8169/r8169_main-6.4-ethercat.c index f17815d8..5b2f1d9c 100644 --- a/devices/r8169/r8169_main-6.4-ethercat.c +++ b/devices/r8169/r8169_main-6.4-ethercat.c @@ -4984,7 +4984,9 @@ static void rtl_remove_one(struct pci_dev *pdev) rtl_release_firmware(tp); /* restore original MAC address */ - rtl_rar_set(tp, tp->dev->perm_addr); + if (is_valid_ether_addr(tp->dev->perm_addr)) { + rtl_rar_set(tp, tp->dev->perm_addr); + } } static const struct net_device_ops rtl_netdev_ops = {