🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19367

[PATCH net v2 0/4] ptp: ocp: fix timestamp teardown and DPLL routing

#19367
From: Ahmad Byagowi
Date: Thu, 19 Nov 2026 21:19
48 lines
12973 bytes
These fixes address existing Time Card teardown and routing issues and
are independent of the WiWi board support series.

Changes since v1:
- Patch 1 uses the existing device spinlock instead of a new mutex, as
  suggested by Vadim Fedorenko. It covers the stopping check, PPS map
  changes and MMIO, but releases the lock before pci_irq_vector() and
  synchronize_irq(). The vector lookup takes the MSI descriptor mutex.
- During teardown, the PPS no-state-change shortcut is bypassed so a
  concurrent disable which has cleared the map cannot cause detach to
  skip its own IRQ drain.
- The source-derived removal harness now checks that MMIO remains locked,
  vector lookup and IRQ synchronization are unlocked, and an in-flight
  disable cannot skip teardown synchronization. Six intentional
  regressions are rejected.
- Code changes in patches 2-4 are unchanged. Group Fixes, Link and
  Signed-off-by trailers without intervening blank lines, addressing
  the v1 verify_fixes CI finding.

The common and WiWi-integration PTP objects compile for x86-64 with W=1
and KCFLAGS=-Werror. Source-derived ASan/UBSan removal and routing checks
pass. The old-source control still reproduces rearming. These are mocked
MMIO/IRQ interleaving tests, not kernel lockdep, KASAN or physical unbind
tests. No production machine, card firmware or Windows HLK host was used.

The issues were reported in the netdev Sashiko AI review and checked
against the upstream source. Codex prepared the code, changelogs and
software tests at the request to separate common fixes from WiWi support;
this revision checks Vadim's spinlock suggestion and extends the removal
tests. The patch changelogs describe the discovery and testing details.

Previous series:
https://lore.kernel.org/r/20261118-timecard-common-301f823ddd-0-ahmadexp@gmail.com
Review:
https://lore.kernel.org/r/ad6883e5-c103-4f82-8040-e5463477ca10@linux.dev

Base: 2a324a58a084c5cfd7e5a2f55e0786bee170a4a5 (same net base as v1).
WiWi v4 remains separate and unsent.

Ahmad Byagowi (4):
  ptp: ocp: prevent timestamp rearming during detach
  ptp: ocp: use hardware selectors in DPLL frequency operations
  ptp: ocp: report disabled SMA inputs consistently over DPLL
  ptp: ocp: correct the DCF output frequency

 drivers/ptp/ptp_ocp.c | 43 ++++++++++++++++++++++++++++++++++---------
 1 file changed, 34 insertions(+), 9 deletions(-)
Technical Details
Message-ID: <20261119-timecard-common-v2-078fe69f33-0-ahmadexp@gmail.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367321-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367321-linux-kernel-netdev=dewy.ru
From: ahmadexp@gmail.com (Ahmad Byagowi)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v2 0/4] ptp: ocp: fix timestamp teardown and DPLL routing
Date: Thu, 19 Nov 2026 13:19:46 -0800
Organization: Usenet Network
Message-ID: <20261119-timecard-common-v2-078fe69f33-0-ahmadexp@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2982793"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8cDVUGlPE5ZyXRCQW99dfTWqBfk= sha256:uTwERZkbepbKOPLGoUQTSTwCvU4p4H7tClbb8OUFCpE=
	sha1:pKXKygVx2QABP67JGFqwMxvjAyQ= sha256:eoKMhzzer9tImPMVPrSCi2tYSIbLT4WAuM1M6jyodWw=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 88C01115782; Fri, 20 Nov 2026 00:20:10 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id xCKYm2Z5FRaX;
	Fri, 20 Nov 2026 00:20:06 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-367321-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 8007211577E; Fri, 20 Nov 2026 00:19:57 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 29177262BCB; Thu, 19 Nov 2026 21:19:51 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795123190;
	b=nziM+Ijy7I9KZEVrlt7CLpkb20goRQgrHePk5LjqMk93dXXhqUPWTch/ymPTORkJ+iCN
	 hDhHO9duTh01gh9SP5pQorblIOxLAIIM2jNZIeUc3f+uOM0AV6OTlzzb5GKI9HM6vmSP8
	 KWwtTIe0iSb5bkCwBmWIrgBl9yGsI5SG2xreyTLMsTSqRCZYRL587Yby93wmgh0Rdvyqe
	 KQlmruX5jxN0PXeZBTirl0aMVOnoAjeYP+qooFabJwoMS9E8gxk9FMVY7a/wQHxovcXmm
	 J/MKV9odzazT83k1kVB+1t6nH3z/brNfJvJU+2iG3FIr2+hYIMzipdS2Ka77aptGKIw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795123190;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding;
	bh=Z209N0q+r1NjNxUhzR6kiPLATti/mGc4UR2/BzH8DBo=;
	b=lxrsNIjAKo4Uh85nLaky3KIME5iq4zt+DvztXUdrUw7brKx/rNNawi0y9boXJSDCdJdU
	 jbpS0iG6U/JsVP3w/OiI2a8AmpQeaxxqLQbtZawieJc93/d4g4uSY1wPhFi9wRm84peKo
	 ALJtRt+OxZ8kzCDQSQF6JPVGgc0du5jD2MN+yp9SMxJlCy7x4yn/Vpk518qg+ZfIq11Ko
	 0sN08RYtk6UuwXGgtu30qM0vq0tP5v3JurLfJ1cVqigmAEOS2McgNq+KrgbyRGVTlecf5
	 RcruEnUjYp6ZSqgZmEfEpB73L+9Gf3BrMpa/VY20nI82Z0F39O0PM3BexRA3pXMqLKw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bUS7xvyG;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id BF42260A2608;
	Thu, 19 Nov 2026 21:19:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bUS7xvyG
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.54
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795123189;
	b=S0v8QHVSy1kUz4gXOZuVDpsC8Gme66s/aK5hIdmWEwQi5e1l9ggO5LAl3sC2zKOcKOtj
	 80aW1QgeKIk6qAaTqzXIoMF5cG2FRRvs6kpfFsZLc8ljoRMD1GBuk2j7ou5avbyZ4HNgX
	 md2dqz4RGnEHrO6KgRLpxcaRNFHAjrXlDrZrCUcepCbhyw3ZgpQXrPVOT12RCLx9Zukzw
	 9nr2sTRdZhlcwvFFU1gT4Cxw+CaPraWx2rn6yRLtPQXEl3JO33y3E8FEyvRfP7kDkOAKn
	 CfkXNKcUhL04Qj1RoUQwzwNnR6gAct9v2T6SyDwNHV/fcCkwQd+6gnSwSeNJQuZ94kQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795123189;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding;
	bh=Z209N0q+r1NjNxUhzR6kiPLATti/mGc4UR2/BzH8DBo=;
	b=uB3f8cdVIQ8Si7COCnyilsJIPTe0DidxTeJuJaafifMmjXWLrSS8lqyLodKJUr50tXbP
	 bDT0Y0iEpwmpu+Lw//EfDPxLQCwUMsiOOWPgu7Od3Gy2S4XKqoCa1IhLtxnOa2wdo61wu
	 VT3tKCXe3O7/O+57VeMMeyDpQP017b9a/K1XtepAMDu/uoUy2FXkxdkEXCQvqJ6XDHrKi
	 kLf+PN85r+awQ7BpV4Y8ys8cF/hp5Tc0JeH6QSsd722xfr61py8MHfIz2v8nBwLRdNDQz
	 i3PBQ5GGyytKd0uKo7XhXGTRIJmIN9s2xfuq+MjJGGQp5s0bEFJlyz8q6xog8S3y5ww==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=bUS7xvyG;
	arc=none smtp.remote-ip=74.125.82.54
X-Received: from mail-dl1-f54.google.com (mail-dl1-f54.google.com [74.125.82.54])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 962AC606A330
	for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 21:19:49 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 962AC606A330
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dl1-f54.google.com with SMTP id a92af1059eb24-1a2761c69fbso454880c88.0
        for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 13:19:49 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1795123189; x=1795727989; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=Z209N0q+r1NjNxUhzR6kiPLATti/mGc4UR2/BzH8DBo=;
        b=bUS7xvyGUGkeOaq/dSRGdz+KpdCLbg9pl8ojwXebLuQU8HdWWJJwr3H6JuyWAU8lcc
         QXhY51ZOt1bUFAq6xKld4a/p8dqseL3osMWDPbLqLtm5rX9U5qZdDPZxMqHjdHLKfrch
         xyZkZrluj0ZOpB0ElCmQ5wnH2oiJgc8X/FFWnNyCFf2MoErgNc5Y8Ot/PWTpoXR9f8Nv
         rSWUrp7Cg4YkHpepVV6cZCgbvl77TMIwjvDZ8gd/x2G4Whl54vE+tSIYAGOSuY89sOS3
         D+jxhDJ9DpKzpIiaAcFVva9ZIL5Mros/PaOOTA8urffoJMu80xPcdo2hoJdcNHK0SiWS
         okvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1795123189; x=1795727989;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=Z209N0q+r1NjNxUhzR6kiPLATti/mGc4UR2/BzH8DBo=;
        b=zoWYcHxdPj2ThvL2j0GgERFw7URcLhKUrwbCOc/lgutsglo5jNgPgCSs41QWeMy0SJ
         FevgXPNuGeB7xbmwrjqNDob/mhCTXbBKIL7v93mSJH6I98hgaGCI37RmDs16mKmW2hB9
         fbq878dLX0p1opEn7gFe2wjzRLFeXfDodMZ/u0SW7gFna+4/NPjnQAsI2KRSnopYlWha
         FnP7Dp7bgTUqpIMZLz2kz9DqVrI6nPK6T6G9JvVs+xMAy8iMAQvMJINuZh7IgVgZEbTd
         gOC170rpdsEUwv2JTPsKsDkRjelQHPH9jaIvXX7WCt25wBNU9iXR0C7a1uX4K1VRwgPU
         J07A==
X-Gm-Message-State: APuU4Z8CGeIBD7MSTdnAs8NQ0StKmjEWU3drqREr8P/h2wX5htws7Ny2
	ae/EOpp5Ur0tHEheekQkCaLX33BQMWAFAHC814BhuWXCDhx9xdRtJ0jn7lTdTzHU
X-Gm-Gg: AYBFou2YPFI9YtVtLqgyhtqqOkH2aA8rAD3ujGc0SLLLsc6HckN3NWrQJVD4LjHvfGE
	X2fGOrU4th2avMVUVO1Pa1/jgAzfb4g6BIfl9YGb+5GbWwk6qd06sj3JLiHJ3OlKmcn6/pcNL5t
	l+MeCwAk8zDwWg5Ps1Qwid7SGGuJmVnVW48y+ch6/1iHBjbGDUtUEwSgk4Rd0zUt4RWH7aw1xDl
	58kpS/HZtDNlV6hihDnZzbzf/Yp0AQ6f/Z8OSnn2uDct7o+yzaRi0+Xxb2XDYSuAfzkAUNzSdzJ
	V90Z5dwE1uCi8FO9iCD8U+GfvSCyOBJMp/6yKgiOeu6WmAE+Vg8ocJYtvaRUhKIgtDFnUdidhv4
	KYtn6XbHRw9mPzPtqHTT8BBGB4LS/Lp1bA4Om0RKFuxoEwzEBfgPW+OwdGpC/wGXc/hyKiP5cPn
	iOC5CNMOaRk/8pvuETcZkCZjy+Fjv6HOWsJ5Rifhkh3lIQ5KqxnQYHRQA7Z9IAh/ubgUGKXcI4F
	x0zHhWrCsjPqAXEYXoXZBoW55/Wpr4WeRqG2dhafsl9mSs+NYx9duuU5+Gyes2EAcfvCACwMcrm
	whbZAURQjSSoycuxeaFtM/WqEYqfD6hg5pKFXrA/OM9bmipyl1xEI+9+ao5psGVTedL174qUKnE
	cz5wXbW20sQSgNPh1Acmep8NM0O7HeT8VgqgRHR1mkoUMAnPM06T+wRhNX4i9tkngjBTXgxxu
X-Received: by 2002:a05:701b:465f:10b0:1b2:48db:23dd with SMTP id a92af1059eb24-1b5568cfbcdmr843336c88.16.1795123188512;
        Thu, 19 Nov 2026 13:19:48 -0800 (PST)
X-Received: from Mac.localdomain (198-27-228-154.fiber.dynamic.sonic.net. [198.27.228.154])
        by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b556829d31sm2513815c88.9.2026.11.19.13.19.47
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Thu, 19 Nov 2026 13:19:47 -0800 (PST)
X-Cc: andrew+netdev@lunn.ch,
	arkadiusz.kubalewski@intel.com,
	davem@davemloft.net,
	edumazet@kernel.org,
	jiri@resnulli.us,
	kuba@kernel.org,
	pabeni@redhat.com
X-Mailer: git-send-email 2.54.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list