πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18673

Re: [PATCH net-next v3 1/3] i2c: xiic: allow platforms to require 32-bit register accesses

#18673
From: netdev-bot+sashiko
Date: Wed, 18 Nov 2026 18:22
65 lines
10509 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] In drivers/i2c/busses/i2c-xiic.c, this patch extends the block
  comment above the register accessors (lines 281-290), but the…

--

i2c: xiic: allow platforms to require 32-bit register accesses

This patch adds a force_32bit_access flag to the xiic platform data. When
the flag is set, the byte and halfword register accessors issue aligned
32-bit accesses, still in the detected endianness. The first user is the
WiWi Time Card, whose LitePCIe bridge cannot handle subword MMIO.

> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> index ab7916745ad39..edb5e271c8cde 100644
> --- a/drivers/i2c/busses/i2c-xiic.c
> +++ b/drivers/i2c/busses/i2c-xiic.c

[ ... ]

> @@ -282,52 +284,68 @@ static int xiic_i2c_runtime_resume(struct device *dev)
>   * Only the least significant byte [doublet] of the register are ever
>   * accessed. This requires an offset of 3 [2] from the base address for
>   * big-endian systems.
> + * Some bridges only support aligned 32-bit accesses. For these, access the
> + * entire register in its detected byte order, without a read-modify-write:
> + * reading or writing a FIFO register must perform exactly one transaction.
>   */

[Severity: Low]
This isn't a bug, but the first sentence of this comment now contradicts
the new mode. It still says only the least significant byte [doublet] is
"ever accessed", using a +3 [+2] offset on big-endian.

When i2c->force_32bit_access is set, xiic_setreg8() and xiic_setreg16()
zero-extend the value and write the whole 32-bit register at the base
offset, with no +3/+2 adjustment:

    if (i2c->force_32bit_access) {
        xiic_setreg32(i2c, reg, value);
        return;
    }

In the same mode, xiic_getreg8() reads the full register through
xiic_getreg32() and truncates the result.

Could the first sentence be changed so it only describes the default
accessors?

The comment also doesn't say what the new mode relies on. The registers
written through xiic_setreg8() and xiic_setreg16() (XIIC_CR_REG_OFFSET,
XIIC_RFD_REG_OFFSET, XIIC_DTR_REG_OFFSET) now get zeros in their upper
bits. Should the comment note that those upper bits must be reserved or
ignored on write?

[ ... ]

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116-wiwi-v3-87afa10a8-0-ahmadexp%40gmail.com
Technical Details
Message-ID: <179502617544.3136.16911407487347494512@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366329-linux-kernel-netdev=dewy.ru
References: <20261116-wiwi-v3-87afa10a8-1-ahmadexp@gmail.com>

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!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366329-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 1/3] i2c: xiic: allow platforms to require 32-bit register accesses
Date: Wed, 18 Nov 2026 18:22:55 +0000
Organization: Usenet Network
Message-ID: <179502617544.3136.16911407487347494512@kernel.org>
References: <20261116-wiwi-v3-87afa10a8-1-ahmadexp@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network; logging-data="2663030"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:YU+42iuy9VEmQr/YgpGCxIUxT58= sha256:GyTMV+78/PRU1W8AGpF2PS3yel4l5h3tolBfhh48iro= sha1:7xfEBXeyrVgZHBG1tJH+kVm0vps= sha256:EBsMWI/cUmsQkppfS4/HFod1v4+rTc+zjjoFjKl+KFI=
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 8D93A11535E; Wed, 18 Nov 2026 21:23:55 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org
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 8ECojF4m876z; Wed, 18 Nov 2026 21:23:51 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366329-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id B7816114CB4; Wed, 18 Nov 2026 21:23:42 +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 07FA1C6ABC; Wed, 18 Nov 2026 18:23:08 +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=1795026177; b=ZOd680OAabg/AwvMOUAG6wni2buv1494882JfY+9PzqHIQJY0tZy+JEamf5hLLid/qvX oTgeOXAlWrcR2L8z7apNGYJg3SpREUtTRPQHTiK32OOq50JDONDos/vqF9ZdD4L3zQP9I AdgTveSiHH5Hpigq2E/noPr11yZ9ZykQv75v/0AG8U81frUcXorcxkCUT3MQ848OWjjVr kADiMQPzQi7fiEOFt+4GwyQjDyBEEwIMIbRQ8xrXLaBoOtEenB9IecUkoVGu9//h2pved A0azflfVRJ4+WeoYi0y+C/C4mY8gZVSjYG2La1P9K5/VOxZCdQGMPMziHUuV8jcnQng==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795026177; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=h61PfhcBe+DMs3O1zi49O1Oj5TJ4u6zGftAUCUm0Yw4=; b=FYWa8BsRqOSoQ3lc+CpEqIxv+hGZhizjSa9biYo9aiNXwRUIUualn1oLdrDfEeNgMIae vokhov+tV7Ne5ztahkCA8Ak/F2sL7B8BsU/F/eo4Bd1CYXWCiM+ZbWgYQhTRig8JyK/LG wCW1lriE1FcQl82cznUplVD5RhbKcmaC330+Ti3+6BcwGggrM9Kg6lPRBHvGnBX/lqzmo 5JhwNqWFeoYYch0iSqBdzc9jbz/MCS1wqpvpPjxrO0HAjRF44yMufUDJUAAOfEx5kNwKv NUYo+02HgSKnN+90C1XAtspV20hN7Hcj+ptENtXFxkrRPtc/BdUfr3rz+q0vzpcl0Tw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Iasr3mdk; 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 D5A4F60A2609; Wed, 18 Nov 2026 18:22:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Iasr3mdk
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795026177; b=b0XLLYR2gnwzmQHPg2SdjIApjWyG0O8CLshYmq9bhVYWgeGxpL+7adGNFLLnM5vqO1ZX 8ENmnE6TZhomQfh8DnzF0XJrWCykg78087QGYN3dhx9wMYbD1uOi0dcg43ZYnEZrrmECe pWVlpYz50BHOXCD6njh2YgPehJj1W/3B/ufnY2f1xINwX496ilm8/G4fDI/dk8/3PLj/e gKunmRauFYORq5Jt7Cu0j1f16cs/3VHmkY8+CfEz913Suc+D1jF1u7gfe5qeS/0XXVxn+ Tmf8W+pce3wRNNDpyGWwjPcMpnhzIh5wCPEUmQrcMmgXJX94XNUxDlzpE5G8a4UXnaw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795026177; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=h61PfhcBe+DMs3O1zi49O1Oj5TJ4u6zGftAUCUm0Yw4=; b=HUVJr36Q8/R5eXSzI6PFdjBqreOOg3qE9J8aZ3OvAkaAgyYBypgupbLbaRDljaee7b/r otXQzhEZhZCuTRhYbONKqsEfExYDTKAlfwawuXrUzSO/kZzNVEj0wA9Ur3iqWr4V1laWE bxVUsKC0NirfcU3T8tYWrUNr5uaQbiC6VonrtW26h0VkcUNt4DBoU0C/H3ZTKUhWlOEFc /HKh/M7PxBTiSNS3nvUR2IwTOvwrtgYzdwOIurUaBEu3RXlBfh4gyog+oWQIzl1kZZSMf bLYT4gH+Chci+QrcGy4iKDO8PxfP9pV0x3/ymXKQgdFYaF8OMtl/XwpqYqZ2riA83zQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Iasr3mdk; arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01C3C606A339; Wed, 18 Nov 2026 18:22:56 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD4BC1F000C4; Wed, 18 Nov 2026 18:22:55 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795026176; bh=h61PfhcBe+DMs3O1zi49O1Oj5TJ4u6zGftAUCUm0Yw4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Iasr3mdk0AKFIO3+dZ2tvHrk79f/1jiQx0zK4tVnYkfDbEF6b5MvBIgjqbLa8LW0z 9GjhOAa3uspo/P3kXqzq1V+qh7dCNV8LanDx+1KAFEeBmR5nrNdt2Ev2ArwQZ/6Vgn ur/VetQwgpTfPvwnRox30OYgzJiXT9U8sIZcxS2C42TEZk7A3jLh5X24jeEy/c3Yzb 9tkU/5T2xh6K27wUdyJQrOrKLtQgkFPGikU16AOKsxGuiwMY1l9YKAX9MuWxOAiCMv w5fp5kjoIQdpnT5tmjVcyWu0lTRVSmyZc7Vagrr7/OkwIHfASgW9HEP1ho2Cd78o5Y FIJf0UuHqFDdQ==
X-Cc: netdev@vger.kernel.org, vadim.fedorenko@linux.dev, 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, pabeni@redhat.com, rdunlap@infradead.org, richardcochran@gmail.com, skhan@linuxfoundation.org
X-In-Reply-To: <20261116-wiwi-v3-87afa10a8-1-ahmadexp@gmail.com>
X-sashiko-severity: Low
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