🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19373

Re: [PATCH net-next v3 3/3] ptp: ocp: support the WiWi revision 02 Time Card

#19373
From: Ahmad Byagowi
Date: Thu, 19 Nov 2026 21:20
76 lines
15236 bytes
Hi Vadim,

On Thu, 19 Nov 2026 at 18:44:38 +0000, Vadim Fedorenko wrote:

Regarding the different addressing and interrupt layout:
> another resource table.

Agreed. The next revision has a dedicated ocp_wiwi_resource table with
final BAR0 addresses and MSI-X vector numbers. I removed the runtime
offset/vector adjustment, the temporary resource copy, and the WiWi
filtering from ptp_ocp_register_resources(). The existing FB/Celestica,
ART, ADVA and ADVA X1 tables are unchanged. The WiWi table explicitly
contains the three UARTs and typed XIIC data, but no GNSS2 or SPI entry.

Regarding UART access and the omitted second GNSS interface:
> Why it's not a problem for ADVA and ART boards?

I conflated the peripheral IP with the host interface in that description.
The aligned 32-bit requirement is specific to the WiWi LitePCIe path;
sharing UART IP does not establish the same PCIe access restrictions.
UART width is now selected by per-resource data, with the existing
byte-access default preserved for the other boards. WiWi's XIIC child
uses the force_32bit_access flag from patch 1.

The UART list is a separate issue. ART already has one GNSS UART entry;
ADVA and ADVA X1 have GNSS and MAC entries, not GNSS2. Thomas described
WiWi's second GNSS UART as instantiated but unwired on this board, so
the WiWi table exposes only GNSS, MAC and NMEA. I am not inferring wiring
for arbitrary boards from their PCI revision or claiming that the other
boards have a GNSS2 defect. The external SMA PPS2 input remains available.

Regarding the additional interrupt-readiness check:
> new revision but not for the older ones?

WiWi has a separate LitePCIe per-input gate at BAR0+0x1800, in addition
to the PCI MSI-X masks. The legacy probe does not program that gate.
The WiWi path first opens only UART/XIIC inputs for child probe; it opens
timing inputs after the PHC and handlers exist. Because ptp_clock_register()
can expose the PHC before that second write, an early arm request returns
-EAGAIN without changing subscription state or programming the source.
After the checked write/readback it can be retried. Disable is not gated.

Both early and late gate writes now use the same checked-readback helper;
failure returns -EIO and unwinds probe. This is software ordering, not a
claim that WiWi loses masked pulses or that older firmware replays them.
The common timestamp-removal spinlock fix remains separate and is used
by all boards.

Regarding the path to supporting updates:
> enable flash upgrades?

Not through a supported in-driver procedure in this series. I kept SPI
absent from the WiWi table and its input masked, and reject every WiWi
devlink flash request before looking up MTD or writing anything. There
is no override. This intentionally also removes raw MTD read access.

The documentation now spells out the follow-up needed: validate the
controller's access width and interrupt behavior, specify and check the
WiWi image header and board/revision compatibility, protect the golden
region in every erase/write path including raw MTD, then validate update
readback, activation and interrupted-update/watchdog recovery. Thomas's
description of a modified spi-xilinx path is not validation of an upstream
update implementation. A running build ID is not proof of the active slot.

Validation for this draft includes actual-source resource/UART/gate/flash
tests under ASan/UBSan, the spinlock removal-race suite (100 runs), and
13 deliberately broken variants rejected by the tests. The x86-64 PTP
and XIIC objects build with W=1 and KCFLAGS=-Werror; all four XIIC KUnit
tests pass under QEMU. The five-architecture Kconfig checks also pass.
No new physical-card test, firmware update or masked-pulse replay test
is claimed; the machine has been reserved for Windows HLK. I will report
that limitation in v4.

Thanks,
Ahmad
Technical Details
Message-ID: <20261119-timecard-common-v2-078fe69f33-r3-ahmadexp@gmail.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367327-linux-kernel-netdev=dewy.ru
References: <20261116-wiwi-v3-87afa10a8-0-ahmadexp@gmail.com> <20261116-wiwi-v3-87afa10a8-3-ahmadexp@gmail.com> <890ef941-0c52-4e3c-9fce-70b11fd1b198@linux.dev>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367327-linux-kernel-netdev=dewy.ru
From: ahmadexp@gmail.com (Ahmad Byagowi)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 3/3] ptp: ocp: support the WiWi revision 02 Time Card
Date: Thu, 19 Nov 2026 13:20:01 -0800
Organization: Usenet Network
Message-ID: <20261119-timecard-common-v2-078fe69f33-r3-ahmadexp@gmail.com>
References: <20261116-wiwi-v3-87afa10a8-0-ahmadexp@gmail.com> <20261116-wiwi-v3-87afa10a8-3-ahmadexp@gmail.com> <890ef941-0c52-4e3c-9fce-70b11fd1b198@linux.dev>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2983144"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:L5d6PfQ8MNv1npyYUemL/34bXhw= sha256:/mWhMp8Y9rZiFmA8HLb1/QmLW+pP4+XO5MjNv0MrxSU=
	sha1:dLeRVtInWMmEKyE2oBlvMvIZ9Bs= sha256:5QCDwp4WtBWOD1p5AVj1tgefktPlRrJJ6S4/tOZWJUs=
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 CE902115788; Fri, 20 Nov 2026 00:20:37 +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 VHbFqKqnFgBL;
	Fri, 20 Nov 2026 00:20:34 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-367327-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 9937A115780; Fri, 20 Nov 2026 00:20:26 +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 0B58B2650D6; Thu, 19 Nov 2026 21:20:07 +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=1795123206;
	b=Y6IjWQ63vl3k5U15hxe0la02awG3zBmy44elrKFDomaDpOWLtBO9pjacnXOMQDLtfqjd
	 BBTbzTcJWCu6oBgH3bdI8MTqT68Z6BPyAqqbNwkiYoSrnOEQA4LungEIojOYr28YrsOMd
	 L4t0XIGCXmXa/XCkypFbmOlIDzvXfE6aFFOTwOsRcDVEWaIhiXhohs7L7i56OIpinIOmv
	 1sn9JzfRUR6Vp+CGcerq5Dh67ih1b3DtB2RUT49HMmxcVQNQyWVk1KH1cuHfXRMt6E3xv
	 WbkJML7KOQMur5JGoV8WKnCzoIkz2Tmvi8VAtCpJ0HtKfP2lkpp8/pmzGXf41GzSLQQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795123206;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Transfer-Encoding;
	bh=IoA82Q2ZEVJNJ0FtORDuYOR+6+olp8aB1qEhIgqXksI=;
	b=33CK98KqmgW6ewZHT20tkDTRqSujJLmpR4+5dLB0v1v0nWtNe6mQh/Z/SJopEgamKyyl
	 Thrp5e0lXrrwzDcEy8e8K8aWHYIeGgigLr0P5HFPZ3hAMRwjNZjVm9jWI5y06yegfPn63
	 8jhTPVSME5QD2fgOcIW7qznh1CYC3KEWnGt/tZZcMn0D/jAIS2xZuS6d8hzrdcHhWZgSO
	 bWBxbtKzb9J7ZRk3eiVIKJ/4jY3mbp3oLZgox12r6JBZbSyaHjDtRQhPnLoy+YQ+Du6yt
	 O3nmo2HtADVKTrpbkfH0aOTiMFtLuvgvgqcGTSeN2A9y9dLWm/cR1FkNfd3FC+q92pw==
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=thKTbKYD;
	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 5AE7C606A335;
	Thu, 19 Nov 2026 21:20:06 +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=thKTbKYD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.176
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795123205;
	b=M4nb3k+r6oyHdmYNew0MmukeI6pOstmvyp1xd34qTbeCqTRKCV1KKIqF1ZAxw3NmEQ4W
	 Dbz7arC6f5lLdU1gyPttSPEQEnKVEHrNaX1qhZiAyCjW6ivr1BMO5j7C8z3AqJ1JtnDf9
	 jpl2/PXSwVgu/MMD1B2y1bMnVItzEEtxaiet2LQ32EnC+iedon5U75YEQjYyH+sEh4K6o
	 ISj4AviN4VDjgsl0nE1N5ULSN65V2LKWbi3AZ0YbWNYzBwIKWmvM1JFE5GX175cTnOnAR
	 EVW7EhyBGRRKCuEfM9DKHT3gr2aZDFlg4XbTP2FWKD1WC5keoa3c80r1qJsY4gpGBHA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795123205;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 MIME-Version:Content-Transfer-Encoding;
	bh=IoA82Q2ZEVJNJ0FtORDuYOR+6+olp8aB1qEhIgqXksI=;
	b=yKeDaZe0U+LV72ytDASqRFFQtgvT+0qTFDpudsFirKbx9tEUX5lH2uvvyJSxGyaVZ2wE
	 HO5DsSEOnJ5XMUjb2wgPNbq0rFLR6cP4qykeAaqpOhZCohNfDr+Yz071Thx/fDlYIYJxc
	 zf1U1U9CBg9b8JBuGEzUN45wEZ1yriGRKJCXzg6zEsDVz5MhZQcfyR/KOFWqaVfw1UxNm
	 q7V+zzHscT2vG+qwPw+YU4vDTTOzEVeZS8CscSAR5DGwIwCsOFLgvlnGsUkYGiuQBlwId
	 pg+/GDAAFnO7g1oRwtaTo/OREWS84vzHXZgPMc4PDG7IXlxu90iPqkX0VoeKayWjyMw==
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=thKTbKYD;
	arc=none smtp.remote-ip=74.125.82.176
X-Received: from mail-dy1-f176.google.com (mail-dy1-f176.google.com [74.125.82.176])
	(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 2FEE9606A320
	for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 21:20:05 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2FEE9606A320
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-dy1-f176.google.com with SMTP id 5a478bee46e88-381f65e4e4bso254096eec.0
        for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 13:20:05 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1795123204; x=1795728004; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=IoA82Q2ZEVJNJ0FtORDuYOR+6+olp8aB1qEhIgqXksI=;
        b=thKTbKYDMiRq+MDphqsEdZJ4oqLSONrJr8+Bl0EfJzIGzLtw1ICSKZWyDt4a/iUoKI
         xaPkgxIwop0MtzQeIQ7XG9PYu8AeIvOvU/WkzxJ0KqPgD9EnRJtV+G2dcjfmyvIkXEPh
         y5TmAACGTD/8xCPDmaxzk3kEaPffUuEiDe9Ce6Jgq4VlFHdgxaCl6Ro1inR5YtTfq98B
         gkScCe74aRikueGHbzafObsJUvwrhuzfz+l2wNVazIIIK0DP+CHaj5NTCix3xLHNHAtK
         W73tkOULPhrQi3PZfVKcTHSA6R/4uo/czkuCF/LbXgjJKxX8G1IAesrECCCic9Y4jbS0
         mIbg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1795123204; x=1795728004;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :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=IoA82Q2ZEVJNJ0FtORDuYOR+6+olp8aB1qEhIgqXksI=;
        b=V2pVIggaJsE+ILqA/EOuHfGcuAmUDe83JWxvudstJVjKLrbNGIg5EPeaKj3MaVcHIs
         +PG0nIR7zNXi2OxEtrPMdYqaIoX+7V0RAoVy3wYk8I0joKrO8YpkQvk/V2K9yZp5NgRH
         OKCfYC/nK6w4PP4lgLv0NEQTVBDAqR/9MW0iAG9PQnE4w/fhlwVYDmLgtfWJ+1Lw1Qwg
         1LHCznm3ZzYY5YWSxEk+uqIsKLs1wq7bilChC0bme7asp7xlXl3r9TaaxRhKVLmqITAF
         WsgEzSLKvGWcaHG2uE8KcxXoyiBc2It3oCLLFUN7Xu4zcdN3MO+UzHuUEB5dbgUHGWEr
         1ZhQ==
X-Forwarded-Encrypted: i=1; AL+hErH4rNZtWHpUmJH2q1A9jkg53xFcwK1Jk91e5+49JwPF2qSVze5es6A67rokM4oQ4KDacsyvB2w=@vger.kernel.org
X-Gm-Message-State: APuU4Z8ppQWiaEybsU+saVy9cD+fUaJPXRtLzRAmxVOsdBau95WdXMND
	URQceU1bzx+gpFM9GCFUT9vkJK40tUUBphNXKl795OES1RQ1TejOIkAn
X-Gm-Gg: AZFdTZcSE+kgOAknlIiGIl4qL67qnTghSa64kk2yEuF5gkCwtXtI6dErEtzNXgfpu42
	drtRlmei2TIYFaSIlVobcPCVbcNjiC3MeJngLRE16xZjqlx9JDN9IzLsuDXwH6odjwKrO87anhl
	KKGQuNakWWr3odL8yOS2Aun5N18zmXSs9yXUmsH5KKeJ+728nAqTa2pHIOzUI9ANyEtVH0XxN2Q
	yANEj9sGX5SbwxvYRhttS2uDl2UP8qM1P74Twet737fo8kQI7V5miIqbxJKm1ZClhk0IsDW42OM
	ed1THXmpG+aLbR77K7gx6GBoxUmeQEpYT/oyaHZXFor7yQP8nM5bB7OyJHZ+a/ABkOEV3K/QZpw
	SdfgMxwrKjLC2HRJSRmG1eZz/dK9DHxbOoFb6uLDdWFRE7ZQTdSzh3ty68VSXTjVylShJVuXT8D
	UuVZym/Bwn7vDvnPI9ATEH++J52DhRBiKzPesjBOD9HvWzJ+7P9zqUwbMCvq72+KCEGKoJBqPkO
	XMvGSFDsQLZ80o/9nlHfMxbyrogRAkCT0k6jJRemQ4N9f3D6FnxL10AwFxjZ1uD4ME9ZpGk07xF
	WHlx4nPEnUjse2eM8RxI9Xxa10EzaBO1gGzMTPYq+pvB1X2j0FurkOxoWpXGmLudC61LNNHYgEM
	TtyftFygnG4X2BwLHC86FhQ3TM2tUyXYGNuKfqqEP9KrMJQBQ1oR5Eq4hbfDHapMMXC4v4HFfQy
	cT1usKUranbT0RelGBjA==
X-Received: by 2002:a05:693c:8955:10b0:36a:1008:5815 with SMTP id 5a478bee46e88-3856c6ab8e7mr602925eec.5.1795123204235;
        Thu, 19 Nov 2026 13:20:04 -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 5a478bee46e88-38567daaf70sm1382576eec.28.2026.11.19.13.20.02
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Thu, 19 Nov 2026 13:20:03 -0800 (PST)
X-Cc: andi.shyti@kernel.org,
	andrew+netdev@lunn.ch,
	corbet@lwn.net,
	davem@davemloft.net,
	edumazet@kernel.org,
	horms@kernel.org,
	jiri@resnulli.us,
	kuba@kernel.org,
	linux-doc@vger.kernel.org,
	linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org,
	pabeni@redhat.com,
	rdunlap@infradead.org,
	richardcochran@gmail.com,
	skhan@linuxfoundation.org
X-Mailer: git-send-email 2.54.0
X-In-Reply-To: <890ef941-0c52-4e3c-9fce-70b11fd1b198@linux.dev>
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