From 1c09010c344ed80abec776b83a3005a0d2598ee7 Mon Sep 17 00:00:00 2001 From: Josip Ponjavic Date: Fri, 13 Dec 2019 14:53:51 +0100 Subject: [PATCH] 5.4.3-2 (clr 5.4.2-875) add revert e1000e patch --- .SRCINFO | 4 +- PKGBUILD | 6 +- Revert-e1000e-5.4.patch | 155 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+), 3 deletions(-) create mode 100644 Revert-e1000e-5.4.patch diff --git a/.SRCINFO b/.SRCINFO index 1b4535b..5bc96d2 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = linux-clear pkgdesc = Clear Linux pkgver = 5.4.3 - pkgrel = 1 + pkgrel = 2 url = https://github.com/clearlinux-pkgs/linux arch = x86_64 license = GPL2 @@ -20,6 +20,7 @@ pkgbase = linux-clear source = enable_additional_cpu_optimizations-20190822.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/20190822.tar.gz source = pci-enable-overrides-for-missing-acs-capabilities.patch source = futex-wait-multiple-5.2.1.patch::https://aur.archlinux.org/cgit/aur.git/plain/futex-wait-multiple-5.2.1.patch?h=linux-fsync + source = Revert-e1000e-5.4.patch validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E sha256sums = bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491 @@ -29,6 +30,7 @@ pkgbase = linux-clear sha256sums = 8c11086809864b5cef7d079f930bd40da8d0869c091965fa62e95de9a0fe13b5 sha256sums = 4127910703ed934224941114c2a4e0bcc5b4841f46d04063ed7b20870a51baa0 sha256sums = b8a9225b4b5cbabac26398d11cc26566e4407d150dacb92f3411c9bb8cc23942 + sha256sums = f774eb33e8457d2f64852200654cc8c9e0f7ebe1264771c0b6dbc221ec3b9a3f pkgname = linux-clear pkgdesc = The Clear Linux kernel and modules diff --git a/PKGBUILD b/PKGBUILD index 08e2441..4783d79 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -64,7 +64,7 @@ _srcname=linux-${_major} _clr=${_major}.2-875 pkgbase=linux-clear pkgver=${_major}.${_minor} -pkgrel=1 +pkgrel=2 pkgdesc='Clear Linux' arch=('x86_64') url="https://github.com/clearlinux-pkgs/linux" @@ -80,6 +80,7 @@ source=( "enable_additional_cpu_optimizations-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/$_gcc_more_v.tar.gz" 'pci-enable-overrides-for-missing-acs-capabilities.patch' 'futex-wait-multiple-5.2.1.patch::https://aur.archlinux.org/cgit/aur.git/plain/futex-wait-multiple-5.2.1.patch?h=linux-fsync' + 'Revert-e1000e-5.4.patch' ) export KBUILD_BUILD_HOST=archlinux @@ -334,7 +335,8 @@ sha256sums=('bf338980b1670bca287f9994b7441c2361907635879169c64ae78364efc5f491' 'SKIP' '8c11086809864b5cef7d079f930bd40da8d0869c091965fa62e95de9a0fe13b5' '4127910703ed934224941114c2a4e0bcc5b4841f46d04063ed7b20870a51baa0' - 'b8a9225b4b5cbabac26398d11cc26566e4407d150dacb92f3411c9bb8cc23942') + 'b8a9225b4b5cbabac26398d11cc26566e4407d150dacb92f3411c9bb8cc23942' + 'f774eb33e8457d2f64852200654cc8c9e0f7ebe1264771c0b6dbc221ec3b9a3f') validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds diff --git a/Revert-e1000e-5.4.patch b/Revert-e1000e-5.4.patch new file mode 100644 index 0000000..b770f1e --- /dev/null +++ b/Revert-e1000e-5.4.patch @@ -0,0 +1,155 @@ +diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h +index 6c51b1bad8c4..37a2314d3e6b 100644 +--- a/drivers/net/ethernet/intel/e1000e/e1000.h ++++ b/drivers/net/ethernet/intel/e1000e/e1000.h +@@ -185,13 +185,12 @@ struct e1000_phy_regs { + + /* board specific private data structure */ + struct e1000_adapter { ++ struct timer_list watchdog_timer; + struct timer_list phy_info_timer; + struct timer_list blink_timer; + + struct work_struct reset_task; +- struct delayed_work watchdog_task; +- +- struct workqueue_struct *e1000_workqueue; ++ struct work_struct watchdog_task; + + const struct e1000_info *ei; + +diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c +index d7d56e42a6aa..060daf66bf63 100644 +--- a/drivers/net/ethernet/intel/e1000e/netdev.c ++++ b/drivers/net/ethernet/intel/e1000e/netdev.c +@@ -1780,8 +1780,7 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data) + } + /* guard against interrupt when we're going down */ + if (!test_bit(__E1000_DOWN, &adapter->state)) +- mod_delayed_work(adapter->e1000_workqueue, +- &adapter->watchdog_task, HZ); ++ mod_timer(&adapter->watchdog_timer, jiffies + 1); + } + + /* Reset on uncorrectable ECC error */ +@@ -1861,8 +1860,7 @@ static irqreturn_t e1000_intr(int __always_unused irq, void *data) + } + /* guard against interrupt when we're going down */ + if (!test_bit(__E1000_DOWN, &adapter->state)) +- mod_delayed_work(adapter->e1000_workqueue, +- &adapter->watchdog_task, HZ); ++ mod_timer(&adapter->watchdog_timer, jiffies + 1); + } + + /* Reset on uncorrectable ECC error */ +@@ -1907,8 +1905,7 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data) + hw->mac.get_link_status = true; + /* guard against interrupt when we're going down */ + if (!test_bit(__E1000_DOWN, &adapter->state)) +- mod_delayed_work(adapter->e1000_workqueue, +- &adapter->watchdog_task, HZ); ++ mod_timer(&adapter->watchdog_timer, jiffies + 1); + } + + if (!test_bit(__E1000_DOWN, &adapter->state)) +@@ -4281,6 +4278,7 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset) + + napi_synchronize(&adapter->napi); + ++ del_timer_sync(&adapter->watchdog_timer); + del_timer_sync(&adapter->phy_info_timer); + + spin_lock(&adapter->stats64_lock); +@@ -5152,11 +5150,25 @@ static void e1000e_check_82574_phy_workaround(struct e1000_adapter *adapter) + } + } + ++/** ++ * e1000_watchdog - Timer Call-back ++ * @data: pointer to adapter cast into an unsigned long ++ **/ ++static void e1000_watchdog(struct timer_list *t) ++{ ++ struct e1000_adapter *adapter = from_timer(adapter, t, watchdog_timer); ++ ++ /* Do the rest outside of interrupt context */ ++ schedule_work(&adapter->watchdog_task); ++ ++ /* TODO: make this use queue_delayed_work() */ ++} ++ + static void e1000_watchdog_task(struct work_struct *work) + { + struct e1000_adapter *adapter = container_of(work, + struct e1000_adapter, +- watchdog_task.work); ++ watchdog_task); + struct net_device *netdev = adapter->netdev; + struct e1000_mac_info *mac = &adapter->hw.mac; + struct e1000_phy_info *phy = &adapter->hw.phy; +@@ -5404,9 +5416,8 @@ static void e1000_watchdog_task(struct work_struct *work) + + /* Reset the timer */ + if (!test_bit(__E1000_DOWN, &adapter->state)) +- queue_delayed_work(adapter->e1000_workqueue, +- &adapter->watchdog_task, +- round_jiffies(2 * HZ)); ++ mod_timer(&adapter->watchdog_timer, ++ round_jiffies(jiffies + 2 * HZ)); + } + + #define E1000_TX_FLAGS_CSUM 0x00000001 +@@ -7259,21 +7270,11 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + goto err_eeprom; + } + +- adapter->e1000_workqueue = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0, +- e1000e_driver_name); +- +- if (!adapter->e1000_workqueue) { +- err = -ENOMEM; +- goto err_workqueue; +- } +- +- INIT_DELAYED_WORK(&adapter->watchdog_task, e1000_watchdog_task); +- queue_delayed_work(adapter->e1000_workqueue, &adapter->watchdog_task, +- 0); +- ++ timer_setup(&adapter->watchdog_timer, e1000_watchdog, 0); + timer_setup(&adapter->phy_info_timer, e1000_update_phy_info, 0); + + INIT_WORK(&adapter->reset_task, e1000_reset_task); ++ INIT_WORK(&adapter->watchdog_task, e1000_watchdog_task); + INIT_WORK(&adapter->downshift_task, e1000e_downshift_workaround); + INIT_WORK(&adapter->update_phy_task, e1000e_update_phy_task); + INIT_WORK(&adapter->print_hang_task, e1000_print_hw_hang); +@@ -7367,9 +7368,6 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + return 0; + + err_register: +- flush_workqueue(adapter->e1000_workqueue); +- destroy_workqueue(adapter->e1000_workqueue); +-err_workqueue: + if (!(adapter->flags & FLAG_HAS_AMT)) + e1000e_release_hw_control(adapter); + err_eeprom: +@@ -7416,17 +7414,15 @@ static void e1000_remove(struct pci_dev *pdev) + */ + if (!down) + set_bit(__E1000_DOWN, &adapter->state); ++ del_timer_sync(&adapter->watchdog_timer); + del_timer_sync(&adapter->phy_info_timer); + + cancel_work_sync(&adapter->reset_task); ++ cancel_work_sync(&adapter->watchdog_task); + cancel_work_sync(&adapter->downshift_task); + cancel_work_sync(&adapter->update_phy_task); + cancel_work_sync(&adapter->print_hang_task); + +- cancel_delayed_work(&adapter->watchdog_task); +- flush_workqueue(adapter->e1000_workqueue); +- destroy_workqueue(adapter->e1000_workqueue); +- + if (adapter->flags & FLAG_HAS_HW_TIMESTAMP) { + cancel_work_sync(&adapter->tx_hwtstamp_work); + if (adapter->tx_hwtstamp_skb) {