From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E387E42189F; Fri, 29 May 2026 20:00:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780084848; cv=none; b=pAcw6JnO/XXF7Q08VsNbEnPBX/2Bq4nMDKbtZoT6ACOEJiyU5kbVFATp+N9d6+LKJv/WZxdMKeRQVTnlj6FDvZabKCf98LwiWTLM06xIgxqxv2xYjsOz4mVroAhg40NT0SgtALhkmyAuUJ/qSHedYYGrdQr58vXgLN9XLHOGH/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780084848; c=relaxed/simple; bh=9h44xDzk/nsmksBrMxzxTymh97zrP5YJwq4ovabSkLc=; h=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=SdC0pkD5/s5C/vu/YlfCiUYYtE6LxB2WMf04FOIFemmCNdRCAizZVV04eCAZ62WaUm62o7sauRSW8425dcGNy7fT1ribqADeh5WgAZEA6968sG57e6FpD/EWf3i4ANlAQbzmK+ySvzGtXF0SmvVhOPPnquai9vrK1nDNZnrVmh8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZpMxLFcA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZpMxLFcA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80ECA1F00893; Fri, 29 May 2026 20:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780084847; bh=XYNT0eEpSeu3BKtrv2cuCAZMt8IThI/nHA1fOsyw8Do=; h=Date:From:To:Cc:Subject:References; b=ZpMxLFcAbmjMSbsGKjqTdwpU1V3XXcrdTnPC9U1kk+bcHnzYThtbYqI4ZaJf3jWqE ia4Zs0zSRAJY2iAaljZx2A5fECiFxU2H+sxREcYQofD3dlXdmYI9FjePEukp7EtZGb XFVKYDaHEEAz7W16M2d37bzwzcGho66wpCBmYezOC0/g4cebDRRvaYCThwAWVsy419 SFuVOsOjka4nshaJV/CuJiHfFYnjW8LrTY44VXdTSHaW8VaRKzHh739e+nJy4gRg0l 9A08TKX/0KcNFCu60AMucb1pQqh3b17oYPjLhLusuj9l3wQ+sU3lJg2GQKeTLthgoe GcU6Z9MSKfA2w== Date: Fri, 29 May 2026 22:00:44 +0200 Message-ID: <20260529195557.637381831@kernel.org> User-Agent: quilt/0.69 From: Thomas Gleixner To: LKML Cc: David Woodhouse , Miroslav Lichvar , John Stultz , Stephen Boyd , Anna-Maria Behnsen , Frederic Weisbecker , thomas.weissschuh@linutronix.de, Arthur Kiyanovski , Rodolfo Giometti , Vincent Donnefort , Marc Zyngier , Oliver Upton , kvmarm@lists.linux.dev, Oliver Upton , Richard Cochran , netdev@vger.kernel.org, Takashi Iwai , Miri Korenblit , Johannes Berg , Jacob Keller , Tony Nguyen , Saeed Mahameed , Peter Hilber , "Michael S. Tsirkin" , virtualization@lists.linux.dev, linux-wireless@vger.kernel.org, linux-sound@vger.kernel.org, David Woodhouse , Vadim Fedorenko Subject: [patch V2 14/25] igc: Use provided clock ID for history snapshot References: <20260529193435.921555544@kernel.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 From: Thomas Gleixner The PTP core indicates in system_device_crosststamp::clock_id the clock ID for which the system time stamp should be taken. That allows to utilize hardware timestamps with e.g. AUX clocks. Save the provided clock ID and use it in igc_phc_get_syncdevicetime() for taking the history snapshot. No functional change. Signed-off-by: Thomas Gleixner Tested-by: Arthur Kiyanovski Reviewed-by: David Woodhouse Reviewed-by: Jacob Keller Acked-by: Jacob Keller --- drivers/net/ethernet/intel/igc/igc.h | 1 + drivers/net/ethernet/intel/igc/igc_ptp.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -326,6 +326,7 @@ struct igc_adapter { struct timespec64 prev_ptp_time; /* Pre-reset PTP clock */ ktime_t ptp_reset_start; /* Reset time in clock mono */ struct system_time_snapshot snapshot; + clockid_t snapshot_clock_id; struct mutex ptm_lock; /* Only allow one PTM transaction at a time */ char fw_version[32]; --- a/drivers/net/ethernet/intel/igc/igc_ptp.c +++ b/drivers/net/ethernet/intel/igc/igc_ptp.c @@ -1049,7 +1049,7 @@ static int igc_phc_get_syncdevicetime(kt */ do { /* Get a snapshot of system clocks to use as historic value. */ - ktime_get_snapshot(&adapter->snapshot); + ktime_get_snapshot_id(adapter->snapshot_clock_id, &adapter->snapshot); igc_ptm_trigger(hw); @@ -1103,6 +1103,8 @@ static int igc_ptp_getcrosststamp(struct /* This blocks until any in progress PTM transactions complete */ mutex_lock(&adapter->ptm_lock); + adapter->snapshot_clock_id = cts->clock_id; + ret = get_device_system_crosststamp(igc_phc_get_syncdevicetime, adapter, &adapter->snapshot, cts); mutex_unlock(&adapter->ptm_lock);