From 2aa02d0b8f447b49c86d1d21f03d13d01416ac0f Mon Sep 17 00:00:00 2001 From: Jim Ma Date: Thu, 3 Nov 2022 12:35:04 +0000 Subject: [PATCH] igc: Fix BUG: scheduling while atomic backport from https://github.com/torvalds/linux/commit/c80a29f0fe9b6f5457e0788e27d1110577eba99b Signed-off-by: Jim Ma --- HISTORY.md | 27 --------------------------- README.md | 41 +++++++++++++++++++++++++++++++++++++++-- igc_phy.c | 4 ++-- 3 files changed, 41 insertions(+), 31 deletions(-) delete mode 100644 HISTORY.md diff --git a/HISTORY.md b/HISTORY.md deleted file mode 100644 index 8fe2a6d..0000000 --- a/HISTORY.md +++ /dev/null @@ -1,27 +0,0 @@ -## 1.2.0 - -_Date 2022.10.27_ - -Backport fixes from upstream - -* igc: Fix TX timestamp support for non-MSI-X platforms -* igc: Fix typo in i225 LTR functions -* igc: Update I226_K device ID -* igc: Reinstate IGC_REMOVED logic and implement it properly -* igc: Fix infinite loop in release_swfw_sync -* igc: Increase timeout value for Speed 100/1000/2500 -* igc: Fix use-after-free error during reset -* igc: change default return of igc_read_phy_reg() -* igc: Fix an error handling path in 'igc_probe()' - -## 1.1.0 - -_Date 2022.10.27_ - -* Support ethtool operations - -## 1.0.0 - -_Date 2022.10.26_ - -* Backport from Linux Kernel v5.12, commit: 9f4ad9e425a1d3b6a34617b8ea226d56a119a717. \ No newline at end of file diff --git a/README.md b/README.md index 10ce74b..f3c55bc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ # Intel igc driver for Synology Kernel 4.4.180 -> Backport from Linux Kernel v5.12, commit: 9f4ad9e425a1d3b6a34617b8ea226d56a119a717 +> Backport from Linux Kernel v5.12, commit: https://github.com/torvalds/linux/commit/9f4ad9e425a1d3b6a34617b8ea226d56a119a717 + +## Prebuild module + +https://github.com/fbelavenuto/arpl-modules + +Eg: https://github.com/fbelavenuto/arpl-modules/blob/main/geminilake-4.4.180/igc.ko ## Build @@ -54,7 +60,38 @@ ip link set up eth1 # in my machine, the nic name is eth1 ## TODO 1. tc support +2. igc: Enable internal i225 PPS - https://github.com/torvalds/linux/commit/64433e5bf40abf893c7edbc60899bdcdd7c70b76 ## History -[History](HISTORY.md) \ No newline at end of file +### 1.2.1 + +* igc: Fix BUG: scheduling while atomic + +### 1.2.0 + +_Date 2022.10.27_ + +Backport fixes from upstream + +* igc: Fix TX timestamp support for non-MSI-X platforms +* igc: Fix typo in i225 LTR functions +* igc: Update I226_K device ID +* igc: Reinstate IGC_REMOVED logic and implement it properly +* igc: Fix infinite loop in release_swfw_sync +* igc: Increase timeout value for Speed 100/1000/2500 +* igc: Fix use-after-free error during reset +* igc: change default return of igc_read_phy_reg() +* igc: Fix an error handling path in 'igc_probe()' + +### 1.1.0 + +_Date 2022.10.27_ + +* Support ethtool operations + +### 1.0.0 + +_Date 2022.10.26_ + +* Backport from Linux Kernel v5.12, commit: 9f4ad9e425a1d3b6a34617b8ea226d56a119a717. \ No newline at end of file diff --git a/igc_phy.c b/igc_phy.c index 83aeb5e..3fecd50 100644 --- a/igc_phy.c +++ b/igc_phy.c @@ -583,7 +583,7 @@ static s32 igc_read_phy_reg_mdic(struct igc_hw *hw, u32 offset, u16 *data) * the lower time out */ for (i = 0; i < IGC_GEN_POLL_TIMEOUT; i++) { - usleep_range(500, 1000); + udelay(50); mdic = rd32(IGC_MDIC); if (mdic & IGC_MDIC_READY) break; @@ -640,7 +640,7 @@ static s32 igc_write_phy_reg_mdic(struct igc_hw *hw, u32 offset, u16 data) * the lower time out */ for (i = 0; i < IGC_GEN_POLL_TIMEOUT; i++) { - usleep_range(500, 1000); + udelay(50); mdic = rd32(IGC_MDIC); if (mdic & IGC_MDIC_READY) break;