[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c3f2bc47-b7d3-4054-ae09-3265470c2306@iscas.ac.cn>
Date: Fri, 19 Sep 2025 16:53:40 +0800
From: Vivian Wang <wangruikang@...as.ac.cn>
To: Marek Szyprowski <m.szyprowski@...sung.com>,
Andrew Lunn <andrew+netdev@...n.ch>, Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Yixun Lan <dlan@...too.org>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Philipp Zabel <p.zabel@...gutronix.de>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
<palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alex@...ti.fr>
Cc: Vivian Wang <uwu@...m.page>, Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Junhui Liu <junhui.liu@...moral.tech>, Simon Horman <horms@...nel.org>,
Maxime Chevallier <maxime.chevallier@...tlin.com>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-riscv@...ts.infradead.org,
spacemit@...ts.linux.dev, linux-kernel@...r.kernel.org,
Conor Dooley <conor.dooley@...rochip.com>,
Troy Mitchell <troy.mitchell@...ux.spacemit.com>,
Hendrik Hamerlinck <hendrik.hamerlinck@...mernet.be>,
Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next v12 0/5] Add Ethernet MAC support for SpacemiT K1
Hi Marek,
Thanks for the testing.
On 9/19/25 16:27, Marek Szyprowski wrote:
> Hi All,
>
> On 14.09.2025 06:23, Vivian Wang wrote:
>> SpacemiT K1 has two gigabit Ethernet MACs with RGMII and RMII support.
>> Add devicetree bindings, driver, and DTS for it.
>>
>> Tested primarily on BananaPi BPI-F3. Basic TX/RX functionality also
>> tested on Milk-V Jupiter.
>>
>> I would like to note that even though some bit field names superficially
>> resemble that of DesignWare MAC, all other differences point to it in
>> fact being a custom design.
>>
>> Based on SpacemiT drivers [1]. These patches are also available at:
>>
>> https://github.com/dramforever/linux/tree/k1/ethernet/v12
>>
>> [1]: https://github.com/spacemit-com/linux-k1x
> This driver recently landed in linux-next as commit bfec6d7f2001 ("net:
> spacemit: Add K1 Ethernet MAC"). In my tests I found that it
> triggers lock dep warnings related to stats_lock acquisition. In the
> current code it is being acquired with spin_lock(). For tests I've
> changed that to spin_lock_irqsave() and the warnings went away, but I'm
> not sure that this is the proper fix. I've also checked the driver
> history and 'irqsave' locking was used in pre-v7 version, but it was
> removed later on Jakub's request and described a bit misleading as
> "Removed scoped_guard usage".
Oops, I had assumed that irqsave was unnecessary and missed that the
statistics functions are called with softirq enabled during
register_netdev. The ones called at probe time should be changed to
_irqsave or some other variant.
I'll take a look at the details myself and send a fix.
Thanks,
Vivian "dramforever" Wang
Powered by blists - more mailing lists