From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-08-20 15:55:44
This series contains updates to igc and e1000e drivers.
Aaron Ma resolves a page fault which occurs when thunderbolt is
unplugged for igc.
Toshiki Nishioka fixes Tx queue looping to use actual number of queues
instead of max value for igc.
Sasha fixes an incorrect latency comparison by decoding the values before
comparing and prevents attempted writes to read-only NVMs for e1000e.
The following are changes since commit ffc9c3ebb4af870a121da99826e9ccb63dc8b3d7:
net: usb: pegasus: fixes of set_register(s) return value evaluation;
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 1GbE
Aaron Ma (1):
igc: fix page fault when thunderbolt is unplugged
Sasha Neftin (2):
e1000e: Fix the max snoop/no-snoop latency for 10M
e1000e: Do not take care about recovery NVM checksum
Toshiki Nishioka (1):
igc: Use num_tx_queues when iterating over tx_ring queue
drivers/net/ethernet/intel/e1000e/ich8lan.c | 32 +++++++++++++-----
drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 ++
drivers/net/ethernet/intel/igc/igc_main.c | 36 ++++++++++++---------
drivers/net/ethernet/intel/igc/igc_ptp.c | 3 +-
4 files changed, 50 insertions(+), 24 deletions(-)
--
2.26.2
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-08-20 15:55:46
From: Sasha Neftin <redacted>
We should decode the latency and the max_latency before directly compare.
The latency should be presented as lat_enc = scale x value:
lat_enc_d = (lat_enc & 0x0x3ff) x (1U << (5*((max_ltr_enc & 0x1c00)
quoted
10)))
Fixes: cf8fb73c23aa ("e1000e: add support for LTR on I217/I218")
Suggested-by: Yee Li <redacted>
Signed-off-by: Sasha Neftin <redacted>
Tested-by: Dvora Fuxbrumer <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/e1000e/ich8lan.c | 14 +++++++++++++-
drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 +++
2 files changed, 16 insertions(+), 1 deletion(-)
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-08-20 15:55:47
From: Toshiki Nishioka <redacted>
Use num_tx_queues rather than the IGC_MAX_TX_QUEUES fixed number 4 when
iterating over tx_ring queue since instantiated queue count could be
less than 4 where on-line cpu count is less than 4.
Fixes: ec50a9d437f0 ("igc: Add support for taprio offloading")
Signed-off-by: Toshiki Nishioka <redacted>
Signed-off-by: Muhammad Husaini Zulkifli <redacted>
Tested-by: Muhammad Husaini Zulkifli <redacted>
Acked-by: Sasha Neftin <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-08-20 15:55:51
From: Sasha Neftin <redacted>
On new platforms, the NVM is read-only. Attempting to update the NVM
is causing a lockup to occur. Do not attempt to write to the NVM
on platforms where it's not supported.
Emit an error message when the NVM checksum is invalid.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213667
Fixes: fb776f5d57ee ("e1000e: Add support for Tiger Lake")
Suggested-by: Dima Ruinskiy <redacted>
Suggested-by: Vitaly Lifshits <redacted>
Signed-off-by: Sasha Neftin <redacted>
Tested-by: Dvora Fuxbrumer <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/e1000e/ich8lan.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-08-20 15:55:52
From: Aaron Ma <redacted>
After unplug thunderbolt dock with i225, pciehp interrupt is triggered,
remove call will read/write mmio address which is already disconnected,
then cause page fault and make system hang.
Check PCI state to remove device safely.
Trace:
BUG: unable to handle page fault for address: 000000000000b604
Oops: 0000 [#1] SMP NOPTI
RIP: 0010:igc_rd32+0x1c/0x90 [igc]
Call Trace:
igc_ptp_suspend+0x6c/0xa0 [igc]
igc_ptp_stop+0x12/0x50 [igc]
igc_remove+0x7f/0x1c0 [igc]
pci_device_remove+0x3e/0xb0
__device_release_driver+0x181/0x240
Fixes: 13b5b7fd6a4a ("igc: Add support for Tx/Rx rings")
Fixes: b03c49cde61f ("igc: Save PTP time before a reset")
Signed-off-by: Aaron Ma <redacted>
Tested-by: Dvora Fuxbrumer <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 32 ++++++++++++++---------
drivers/net/ethernet/intel/igc/igc_ptp.c | 3 ++-
2 files changed, 21 insertions(+), 14 deletions(-)
@@ -149,6 +149,9 @@ static void igc_release_hw_control(struct igc_adapter *adapter)structigc_hw*hw=&adapter->hw;u32ctrl_ext;+if(!pci_device_is_present(adapter->pdev))+return;+/* Let firmware take over control of h/w */ctrl_ext=rd32(IGC_CTRL_EXT);wr32(IGC_CTRL_EXT,
@@ -4449,26 +4452,29 @@ void igc_down(struct igc_adapter *adapter)igc_ptp_suspend(adapter);-/* disable receives in the hardware */-rctl=rd32(IGC_RCTL);-wr32(IGC_RCTL,rctl&~IGC_RCTL_EN);-/* flush and sleep below */-+if(pci_device_is_present(adapter->pdev)){+/* disable receives in the hardware */+rctl=rd32(IGC_RCTL);+wr32(IGC_RCTL,rctl&~IGC_RCTL_EN);+/* flush and sleep below */+}/* set trans_start so we don't get spurious watchdogs during reset */netif_trans_update(netdev);netif_carrier_off(netdev);netif_tx_stop_all_queues(netdev);-/* disable transmits in the hardware */-tctl=rd32(IGC_TCTL);-tctl&=~IGC_TCTL_EN;-wr32(IGC_TCTL,tctl);-/* flush both disables and wait for them to finish */-wrfl();-usleep_range(10000,20000);+if(pci_device_is_present(adapter->pdev)){+/* disable transmits in the hardware */+tctl=rd32(IGC_TCTL);+tctl&=~IGC_TCTL_EN;+wr32(IGC_TCTL,tctl);+/* flush both disables and wait for them to finish */+wrfl();+usleep_range(10000,20000);-igc_irq_disable(adapter);+igc_irq_disable(adapter);+}adapter->flags&=~IGC_FLAG_NEED_LINK_UPDATE;
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-08-20 21:56:37
On Fri, 20 Aug 2021 08:59:12 -0700 Tony Nguyen wrote:
From: Aaron Ma <redacted>
After unplug thunderbolt dock with i225, pciehp interrupt is triggered,
remove call will read/write mmio address which is already disconnected,
then cause page fault and make system hang.
Check PCI state to remove device safely.
Trace:
BUG: unable to handle page fault for address: 000000000000b604
Oops: 0000 [#1] SMP NOPTI
RIP: 0010:igc_rd32+0x1c/0x90 [igc]
Call Trace:
igc_ptp_suspend+0x6c/0xa0 [igc]
igc_ptp_stop+0x12/0x50 [igc]
igc_remove+0x7f/0x1c0 [igc]
pci_device_remove+0x3e/0xb0
__device_release_driver+0x181/0x240
Fixes: 13b5b7fd6a4a ("igc: Add support for Tx/Rx rings")
Fixes: b03c49cde61f ("igc: Save PTP time before a reset")
Seems like a whack-a-mole that should be addressed a little bit more
systematically. Why not return ~0 if hw_addr is NULL? That's what would
happen first time timeout is hit, right? Please consider this.
Pulled, thanks!