2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/net/ethernet/intel/igc
Christopher S M Hall 714cd033da igc: increase wait time before retrying PTM
The i225/i226 hardware retries if it receives an inappropriate response
from the upstream device. If the device retries too quickly, the root
port does not respond.

The wait between attempts was reduced from 10us to 1us in commit
6b8aa753a9 ("igc: Decrease PTM short interval from 10 us to 1 us"), which
said:

  With the 10us interval, we were seeing PTM transactions take around
  12us. Hardware team suggested this interval could be lowered to 1us
  which was confirmed with PCIe sniffer. With the 1us interval, PTM
  dialogs took around 2us.

While a 1us short cycle time was thought to be theoretically sufficient, it
turns out in practice it is not quite long enough. It is unclear if the
problem is in the root port or an issue in i225/i226.

Increase the wait from 1us to 4us. Increasing to 2us appeared to work in
practice on the setups we have available. A value of 4us was chosen due to
the limited hardware available for testing, with a goal of ensuring we wait
long enough without overly penalizing the response time when unnecessary.

The issue can be reproduced with the following:

$ sudo phc2sys -R 1000 -O 0 -i tsn0 -m

Note: 1000 Hz (-R 1000) is unrealistically large, but provides a way to
quickly reproduce the issue.

PHC2SYS exits with:

"ioctl PTP_OFFSET_PRECISE: Connection timed out" when the PTM transaction
  fails

Fixes: 6b8aa753a9 ("igc: Decrease PTM short interval from 10 us to 1 us")
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com>
Tested-by: Avigail Dahan <avigailx.dahan@intel.com>
Signed-off-by: Christopher S M Hall <christopher.s.hall@intel.com>
Reviewed-by: Corinna Vinschen <vinschen@redhat.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-04-11 09:13:28 -07:00
..
igc_base.c igc: return early when failing to read EECD register 2025-01-07 09:01:15 -08:00
igc_base.h igc: Add support for PTP .getcyclesx64() 2023-11-13 15:17:09 -08:00
igc_defines.h igc: increase wait time before retrying PTM 2025-04-11 09:13:28 -07:00
igc_diag.c igc: remove autoneg parameter from igc_mac_info 2024-11-13 10:30:21 -08:00
igc_diag.h
igc_dump.c
igc_ethtool.c igc: remove autoneg parameter from igc_mac_info 2024-11-13 10:30:21 -08:00
igc_hw.h igc: Remove unused igc_read/write_pcie_cap_reg 2025-01-06 13:32:44 -08:00
igc_i225.c igc: field get conversion 2023-12-18 11:20:43 -08:00
igc_i225.h
igc_leds.c igc: Fix LED-related deadlock on driver unbind 2024-04-24 20:09:30 -07:00
igc_mac.c igc: remove autoneg parameter from igc_mac_info 2024-11-13 10:30:21 -08:00
igc_mac.h
igc_main.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
igc_nvm.c igc: Remove unused igc_acquire/release_nvm 2025-01-06 13:32:44 -08:00
igc_nvm.h igc: Remove unused igc_acquire/release_nvm 2025-01-06 13:32:44 -08:00
igc_phy.c igc: remove autoneg parameter from igc_mac_info 2024-11-13 10:30:21 -08:00
igc_phy.h igc: Change type of the 'igc_check_downshift' method 2022-05-10 14:02:53 -07:00
igc_ptp.c igc: fix PTM cycle trigger logic 2025-04-11 09:13:11 -07:00
igc_regs.h igc: Move the MULTI GBT AN Control Register to _regs file 2024-08-30 07:44:39 -07:00
igc_tsn.c igc: Add MQPRIO offload support 2024-08-30 07:33:46 -07:00
igc_tsn.h igc: Fix qbv_config_change_errors logics 2024-08-07 13:30:23 -07:00
igc_xdp.c igc: Fix XSK queue NAPI ID mapping 2025-04-02 08:51:41 -07:00
igc_xdp.h
igc.h igc: Fix XSK queue NAPI ID mapping 2025-04-02 08:51:41 -07:00
Makefile net: intel: Use *-y instead of *-objs in Makefile 2024-06-10 19:52:44 -07:00