netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: Christopher S M Hall <christopher.s.hall@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, david.zage@intel.com,
	vinicius.gomes@intel.com, netdev@vger.kernel.org,
	rodrigo.cadore@l-acoustics.com
Subject: Re: [PATCH iwl-net v3 0/6] igc: Fix PTM timeout
Date: Wed, 8 Jan 2025 12:10:35 +0100	[thread overview]
Message-ID: <Z35dK7V_OITEoi71@calimero.vinschen.de> (raw)
In-Reply-To: <20241106184722.17230-1-christopher.s.hall@intel.com>

Hi Christopher,

is there any new development in terms of this issue?


Thanks,
Corinna


On Nov  6 18:47, Christopher S M Hall wrote:
> There have been sporadic reports of PTM timeouts using i225/i226 devices
> 
> These timeouts have been root caused to:
> 
> 1) Manipulating the PTM status register while PTM is enabled and triggered
> 2) The hardware retrying too quickly when an inappropriate response is
>    received from the upstream device
> 
> 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
> 
> Additional problem description tested by:
> Corinna Vinschen <vinschen@redhat.com>
> 
>   This patch also fixes a hang in igc_probe() when loading the igc
>   driver in the kdump kernel on systems supporting PTM.
> 
>   The igc driver running in the base kernel enables PTM trigger in
>   igc_probe().  Therefore the driver is always in PTM trigger mode,
>   except in brief periods when manually triggering a PTM cycle.
> 
>   When a crash occurs, the NIC is reset while PTM trigger is enabled.
>   Due to a hardware problem, the NIC is subsequently in a bad busmaster
>   state and doesn't handle register reads/writes.  When running
>   igc_probe() in the kdump kernel, the first register access to a NIC
>   register hangs driver probing and ultimately breaks kdump.
> 
>   With this patch, igc has PTM trigger disabled most of the time,
>   and the trigger is only enabled for very brief (10 - 100 us) periods
>   when manually triggering a PTM cycle.  Chances that a crash occurs
>   during a PTM trigger are not zero, but extremly reduced.
> 
> 
> Changelog:
> 
> v1 -> v2: -Removed patch modifying PTM retry loop count
>       	  -Moved PTM mutex initialization from igc_reset() to igc_ptp_init()
> 	   called once in igc_probe()
> v2 -> v3: -Added mutex_destroy() to clean up PTM lock
> 	  -Added missing checks for PTP enabled flag called from igc_main.c
> 	  -Cleanup PTP module if probe fails
> 	  -Wrap all access to PTM registers with PTM lock/unlock
> 
> Christopher S M Hall (6):
>   igc: Ensure the PTM cycle is reliably triggered
>   igc: Lengthen the hardware retry time to prevent timeouts
>   igc: Move ktime snapshot into PTM retry loop
>   igc: Handle the IGC_PTP_ENABLED flag correctly
>   igc: Cleanup PTP module if probe fails
>   igc: Add lock preventing multiple simultaneous PTM transactions
> 
>  drivers/net/ethernet/intel/igc/igc.h         |   1 +
>  drivers/net/ethernet/intel/igc/igc_defines.h |   3 +-
>  drivers/net/ethernet/intel/igc/igc_main.c    |   1 +
>  drivers/net/ethernet/intel/igc/igc_ptp.c     | 113 ++++++++++++-------
>  4 files changed, 78 insertions(+), 40 deletions(-)
> 
> -- 
> 2.34.1


      parent reply	other threads:[~2025-01-08 11:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 18:47 [PATCH iwl-net v3 0/6] igc: Fix PTM timeout Christopher S M Hall
2024-11-06 18:47 ` [PATCH iwl-net v3 1/6] igc: Ensure the PTM cycle is reliably triggered Christopher S M Hall
2024-11-06 18:47 ` [PATCH iwl-net v3 2/6] igc: Lengthen the hardware retry time to prevent timeouts Christopher S M Hall
2024-11-06 23:13   ` [Intel-wired-lan] " Paul Menzel
2024-11-06 23:53     ` Hall, Christopher S
2024-11-07  5:48       ` Paul Menzel
2024-11-07  5:56         ` Paul Menzel
2024-11-06 18:47 ` [PATCH iwl-net v3 3/6] igc: Move ktime snapshot into PTM retry loop Christopher S M Hall
2024-11-06 18:47 ` [PATCH iwl-net v3 4/6] igc: Handle the IGC_PTP_ENABLED flag correctly Christopher S M Hall
2024-11-06 18:47 ` [PATCH iwl-net v3 5/6] igc: Cleanup PTP module if probe fails Christopher S M Hall
2024-11-06 18:47 ` [PATCH iwl-net v3 6/6] igc: Add lock preventing multiple simultaneous PTM transactions Christopher S M Hall
2024-11-12 15:39 ` [PATCH iwl-net v3 0/6] igc: Fix PTM timeout Corinna Vinschen
2025-01-08 11:10 ` Corinna Vinschen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z35dK7V_OITEoi71@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=christopher.s.hall@intel.com \
    --cc=david.zage@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=rodrigo.cadore@l-acoustics.com \
    --cc=vinicius.gomes@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).