Article View: linux.kernel.netdev
Article #22223Re: [PATCH net v4 07/10] net: au1000: restore RX buffer addresses when restarting the MAC
From: netdev-bot+sashiko
Date: Wed, 25 Nov 2026 01:28
Date: Wed, 25 Nov 2026 01:28
82 lines
10882 bytes
10882 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 `au1000_init()`
(drivers/net/ethernet/amd/au1000_eth.c:727-728), the patch writes theβ¦
--
net: au1000: restore RX buffer addresses when restarting the MAC
The commit changes au1000_init() to reload each RX descriptor's buffer
address from rx_db_inuse[] before setting RX_DMA_ENABLE. Before this,
it only OR-ed in the enable bit on whatever address the DMA engine had
left behind. That could make a receive after close/reopen start partway
into its buffer.
> diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
> index ea2766343d518..ec28ed33bf698 100644
> --- a/drivers/net/ethernet/amd/au1000_eth.c
> +++ b/drivers/net/ethernet/amd/au1000_eth.c
> @@ -724,7 +724,8 @@ static int au1000_init(struct net_device *dev)
>
>
> for (i = 0; i < NUM_RX_DMA; i++)
> - aup->rx_dma_ring[i]->buff_stat |= RX_DMA_ENABLE;
> + writel(lower_32_bits(aup->rx_db_inuse[i]->dma_addr) |
> + RX_DMA_ENABLE, &aup->rx_dma_ring[i]->buff_stat);
[Severity: Low]
This isn't a bug, but should this be a plain store, like the other
accesses to buff_stat?
The commit message says this matches the receive completion path.
That path does a plain C assignment, not a writel():
drivers/net/ethernet/amd/au1000_eth.c:au1000_rx() {
...
prxd->buff_stat = lower_32_bits(pDB->dma_addr) | RX_DMA_ENABLE;
...
}
au1000_probe() initializes the same field the same way:
aup->rx_dma_ring[i]->buff_stat = lower_32_bits(pDB->dma_addr);
au1000_reset_mac_unlocked() and the reads in au1000_init() and
au1000_rx() also use plain loads and stores.
In au1000_eth.h, rx_dma_ring is declared without __iomem:
struct rx_dma *rx_dma_ring[NUM_RX_DMA];
Passing &aup->rx_dma_ring[i]->buff_stat to writel() therefore gives a
sparse different-address-space warning. It also means this one
register is now accessed in two different styles.
The driver already passes non-__iomem pointers to writel() for
aup->mac and aup->enable. What this patch adds is the mixed accessor
style on buff_stat.
There's no runtime difference. MIPS_AU1X00_ENET depends on
MIPS_ALCHEMY, which only supports little-endian, so writel() and the
plain store write the same bits.
Would a plain store match the surrounding code better, like this:
aup->rx_dma_ring[i]->buff_stat =
lower_32_bits(aup->rx_db_inuse[i]->dma_addr) | RX_DMA_ENABLE;
The other option is to mark rx_dma_ring and tx_dma_ring as __iomem
and convert every access to readl()/writel().
>
> wmb(); /* drain writebuffer */
>
--
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261121004809.1690280-1-f.fainelli%40gmail.com
Technical Details
Message-ID:
<179557011055.3135.6140198422373932770@kernel.org>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370941-linux-kernel-netdev=dewy.ruReferences:
<20261121004809.1690280-8-f.fainelli@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370941-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v4 07/10] net: au1000: restore RX buffer addresses when restarting the MAC Date: Wed, 25 Nov 2026 01:28:30 +0000 Organization: Usenet Network Message-ID: <179557011055.3135.6140198422373932770@kernel.org> References: <20261121004809.1690280-8-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="81815"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:erf+FV3texf/2QYv4q1QOzKSqaw= sha256:XvVG1M783af0iyAnpE5lOCWSoVeTJOqi8oiGSLNKYP4= sha1:i/MqvRMIYBDJHDSxBFE9dOulp8I= sha256:YFwDDEI31UHMSZJ85RNtGMdEPuaI480dlg1D0do82yg= 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 5C3C0125E3A; Wed, 25 Nov 2026 04:28:54 +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 wMKy52MdsGch; Wed, 25 Nov 2026 04:28:50 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-370941-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 304A4125E38; Wed, 25 Nov 2026 04:28:39 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id E6C7A36B1B; Wed, 25 Nov 2026 01:28:36 +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=1795570113; b=s/ePmOlQ+l1PBRWyuq6S1hkAsy6+HV1NLeXvzgjrSbw/3web8qQb/H2X0kGAxDbLVl/A N7nw5hTJGzdtdMgM0RaWiZ9FQ/98KV0EdTxce6TQ+T3sY+zP+FcjFrxJ2eXqghOdPbnoQ EyCRPvCYhorXHAH7da20wXtcFTStRGfbBMWXOK6Ki+N9ZxA3LJvedsL9w43NGxvceL7mk OPvK1eFoDNUnvFqAzO/++3DmKHVMlWFQobB1w7fbXoI7nagT0sTSnn6UCzr8+1elPau/n nM9DErunJk89vs9Xa+UndUVvC6F91LXuKrUBLfRcNDZwxd1QlzoiONx7e8PF15rLt8Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795570113; 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=YvHf32I3CxsjZN9KDS8kUqYRtxaIn+dFhytpRDYuc4A=; b=diNb7MHnliYxm7ykne27TRzYkW0RSH4W12FCputXa5Fj+EtqZZ7IaLo66AvP8cO61CQJ wKY5jsZWRwKLhXXbAnKsglckARh9k3OymBEtgyl5D42yNJ76m88/bpuHrRvUU6BIe1VBP QjJrxPhMWsppOyJC+B1ReDRfUJBQnNpS9HeEXUDmFeuBlG7SNEZSMVX8Po4rEI+coesJa Qk49+/Uf8FEts6Cg5efEMnIpvTaoIz6C1sNoq5FYtmsjOzST8xfmI7nptlUmmzBZcY2gO vYY1UwtZRp6YfR0yAeK82BpVkhP0ZTvW6DqIoNznEhQxGWil8hm09ftSrrlXYMyUeMg== 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=iKZI7uve; 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 71B15606A332; Wed, 25 Nov 2026 01:28:33 +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=iKZI7uve 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=1795570112; b=q5Na8hfE0/zjoWaP0/k24U9/Tg4NTK9xHaMg/xfv28J7foBqVC7EoG+9hMENWqxay+YI dDSzvy/eCU+0m6xk5L7Wmwc9speaRv8IPq4QAq/VLp8urXM6wLg6uVsa7oQzyZNwSNWYv qHpohYKbMs1oZN7q9Xg/KVm5/Mkb+0Dock2lPhvJxLC/DF4rvZLzhJu5JCbxOlgRXOPvT 9XFuPikQPGZTXwY0zxTN6QPXv9gBFEn3k3UnU63rUEpHmF5czX85WGI+IDxODzk8DG2S4 m+0os+Gp1yknXgDFhKe+op3B4+mmOokFzW+K4oFW87T+ieZKxh7dMWs2erb+aOrFOtg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795570112; 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=YvHf32I3CxsjZN9KDS8kUqYRtxaIn+dFhytpRDYuc4A=; b=vbo86Ij8cyEvW6ugxq+gqIg7H2fzNxNNB7v5YEsemqeoCJSx6jKNvBKjM4JUOIuVSobb lUEKvg0BOe5lUxz1aTiCVzUpAcb7xUVcXgznLotUimEShR8iH2HoBf1FsNl+lDhIlPlqK YQh/o0cJwKRD/SagaMr7Jhl+IvX4AKWMRvZUiIjIISkUmQaSkLQzdPxAbX/6gomomZEoc lxCnlY6k/OpcBzoKW/DQ2+F5vBW4YvQu/iGI+bFbDdipqnY/GDJDiSUiIQduerb1l/8dG f9qruv8QBJCW0OmQW3Ed0+BJfwLql7XntB8rq2THFmcuOUB/+PaxZIRAOOEAltMrZjA== 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=iKZI7uve; 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 8E6C3606A31E; Wed, 25 Nov 2026 01:28:32 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BBC81F000C6; Wed, 25 Nov 2026 01:28:30 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795570112; bh=YvHf32I3CxsjZN9KDS8kUqYRtxaIn+dFhytpRDYuc4A=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=iKZI7uveY4lg1vxjNYhLQ49O7l2U5wZWAKHgGnO3R4mw1eJGGCoK7TYaVnJI53u4s CnDZ1hj2vZCpK0ZSYG/BS1UPXR0zEmR5YZQskn+VQJmwroIgzJbD85HdpBjmAiq5r3 SQOMVznDBkjhLq2NECs9yd0iqYIvNhAnKWX7ERuTKB2qVh0+GcbfFcePoiqnycJ1fp y1sMbzWOxO7iIjiyB4sIhsxj32CM7JEh70IzUZ3JVK3wHs3AJkQquw24/FOnUwgTIp 5A4/d3hzg5+Pgf28tvYEeIqj5ICUxK22iapbs3x9TUsyuzn5yfIrQ9fojJ2ZI+anJ2 PtuJ+THQn1jlQ== X-Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, hkallweit1@gmail.com, linux@armlinux.org.uk, shaojijie@huawei.com, horms@kernel.org, runyu.xiao@seu.edu.cn, mmyangfl@gmail.com, hvr@gnu.org, danny.kukawka@bisect.de, mugunthanvnm@ti.com, sebastian.hesselbarth@gmail.com, linux-kernel@vger.kernel.org, manuel.lauss@gmail.com X-In-Reply-To: <20261121004809.1690280-8-f.fainelli@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