<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/net/ethernet/smsc/smc91x.c, branch docs-mw</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-mw</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-mw'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2025-12-23T14:28:34+00:00</updated>
<entry>
<title>smc91x: fix broken irq-context in PREEMPT_RT</title>
<updated>2025-12-23T14:28:34+00:00</updated>
<author>
<name>Yeoreum Yun</name>
<email>yeoreum.yun@arm.com</email>
</author>
<published>2025-12-17T08:51:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6402078bd9d1ed46e79465e1faaa42e3458f8a33'/>
<id>urn:sha1:6402078bd9d1ed46e79465e1faaa42e3458f8a33</id>
<content type='text'>
When smc91x.c is built with PREEMPT_RT, the following splat occurs
in FVP_RevC:

[   13.055000] smc91x LNRO0003:00 eth0: link up, 10Mbps, half-duplex, lpa 0x0000
[   13.062137] BUG: workqueue leaked atomic, lock or RCU: kworker/2:1[106]
[   13.062137]      preempt=0x00000000 lock=0-&gt;0 RCU=0-&gt;1 workfn=mld_ifc_work
[   13.062266] C
** replaying previous printk message **
[   13.062266] CPU: 2 UID: 0 PID: 106 Comm: kworker/2:1 Not tainted 6.18.0-dirty #179 PREEMPT_{RT,(full)}
[   13.062353] Hardware name:  , BIOS
[   13.062382] Workqueue: mld mld_ifc_work
[   13.062469] Call trace:
[   13.062494]  show_stack+0x24/0x40 (C)
[   13.062602]  __dump_stack+0x28/0x48
[   13.062710]  dump_stack_lvl+0x7c/0xb0
[   13.062818]  dump_stack+0x18/0x34
[   13.062926]  process_scheduled_works+0x294/0x450
[   13.063043]  worker_thread+0x260/0x3d8
[   13.063124]  kthread+0x1c4/0x228
[   13.063235]  ret_from_fork+0x10/0x20

This happens because smc_special_trylock() disables IRQs even on PREEMPT_RT,
but smc_special_unlock() does not restore IRQs on PREEMPT_RT.
The reason is that smc_special_unlock() calls spin_unlock_irqrestore(),
and rcu_read_unlock_bh() in __dev_queue_xmit() cannot invoke
rcu_read_unlock() through __local_bh_enable_ip() when current-&gt;softirq_disable_cnt becomes zero.

To address this issue, replace smc_special_trylock() with spin_trylock_irqsave().

Fixes: 342a93247e08 ("locking/spinlock: Provide RT variant header: &lt;linux/spinlock_rt.h&gt;")
Signed-off-by: Yeoreum Yun &lt;yeoreum.yun@arm.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20251217085115.1730036-1-yeoreum.yun@arm.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: ethernet: Switch back to struct platform_driver::remove()</title>
<updated>2024-10-04T23:39:56+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-10-03T10:01:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e96321fad3ad087f2fd0a93e44bb3ac878f5900f'/>
<id>urn:sha1:e96321fad3ad087f2fd0a93e44bb3ac878f5900f</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/net/ethernet to use
.remove(), with the eventual goal to drop struct
platform_driver::remove_new(). As .remove() and .remove_new() have the
same prototypes, conversion is done by just changing the structure
member name in the driver initializer.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://patch.msgid.link/18f7c585a1a8a8ac8b03a2fca7de19bd5c52ac2b.1727949050.git.u.kleine-koenig@baylibre.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: smc91x: Make use of irq_get_trigger_type()</title>
<updated>2024-09-07T01:21:43+00:00</updated>
<author>
<name>Vasileios Amoiridis</name>
<email>vassilisamir@gmail.com</email>
</author>
<published>2024-09-04T15:10:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f4bbf496f5fd66603f75a32a27c6075e0868c76b'/>
<id>urn:sha1:f4bbf496f5fd66603f75a32a27c6075e0868c76b</id>
<content type='text'>
Convert irqd_get_trigger_type(irq_get_irq_data(irq)) cases to the more
simple irq_get_trigger_type(irq).

Signed-off-by: Vasileios Amoiridis &lt;vassilisamir@gmail.com&gt;
Reviewed-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Link: https://patch.msgid.link/20240904151018.71967-4-vassilisamir@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: smc91x: Remove commented out code</title>
<updated>2024-05-30T01:42:22+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@toblux.com</email>
</author>
<published>2024-05-28T16:00:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c53a46b16ce2605181688ea6af5f6c8d7fb3c9c1'/>
<id>urn:sha1:c53a46b16ce2605181688ea6af5f6c8d7fb3c9c1</id>
<content type='text'>
Remove commented out code

Signed-off-by: Thorsten Blum &lt;thorsten.blum@toblux.com&gt;
Link: https://lore.kernel.org/r/20240528160036.404946-2-thorsten.blum@toblux.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: fill in MODULE_DESCRIPTION()s for SMSC drivers</title>
<updated>2024-01-29T12:12:51+00:00</updated>
<author>
<name>Breno Leitao</name>
<email>leitao@debian.org</email>
</author>
<published>2024-01-25T19:34:13+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9ba4295b2eab99fa0a1768432b5e54e214d47310'/>
<id>urn:sha1:9ba4295b2eab99fa0a1768432b5e54e214d47310</id>
<content type='text'>
W=1 builds now warn if module is built without a MODULE_DESCRIPTION().
Add descriptions to the SMSC 91x/911x/9420 Ethernet drivers.

Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: smsc: Convert to platform remove callback returning void</title>
<updated>2023-09-20T08:06:40+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-18T20:42:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e8e2c863f941e8f34fee2a11fd9d152a35d3ccdd'/>
<id>urn:sha1:e8e2c863f941e8f34fee2a11fd9d152a35d3ccdd</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

Trivially convert these drivers from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: smc91x: Replace of_gpio.h with what indeed is used</title>
<updated>2023-03-19T10:40:04+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-16T12:04:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c0e906a953f03c56d8029b0207195ee202fd646d'/>
<id>urn:sha1:c0e906a953f03c56d8029b0207195ee202fd646d</id>
<content type='text'>
of_gpio.h in this driver is solely used as a proxy to other headers.
This is incorrect usage of the of_gpio.h. Replace it .h with what
indeed is used in the code.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: move from strlcpy with unused retval to strscpy</title>
<updated>2022-08-31T21:11:26+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2022-08-30T20:14:54+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f029c781dd6d8e2f13593c927c66db7e8826ed28'/>
<id>urn:sha1:f029c781dd6d8e2f13593c927c66db7e8826ed28</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt; # For drivers/net/ethernet/mellanox/mlxsw
Acked-by: Geoff Levand &lt;geoff@infradead.org&gt; # For ps3_gelic_net and spider_net_ethtool
Acked-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt; # For drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
Acked-by: Marcin Wojtas &lt;mw@semihalf.com&gt; # For drivers/net/ethernet/marvell/mvpp2
Reviewed-by: Leon Romanovsky &lt;leonro@nvidia.com&gt; # For drivers/net/ethernet/mellanox/mlx{4|5}
Reviewed-by: Shay Agroskin &lt;shayagr@amazon.com&gt; # For drivers/net/ethernet/amazon/ena
Acked-by: Krzysztof Hałasa &lt;khalasa@piap.pl&gt; # For IXP4xx Ethernet
Link: https://lore.kernel.org/r/20220830201457.7984-3-wsa+renesas@sang-engineering.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ethernet: smc91x: use eth_hw_addr_set()</title>
<updated>2021-10-19T11:41:48+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-10-18T14:29:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=02bfb6beb695dbf5fb8119f4700516be09da70aa'/>
<id>urn:sha1:02bfb6beb695dbf5fb8119f4700516be09da70aa</id>
<content type='text'>
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev-&gt;dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.

Read the address into an array on the stack, then call
eth_hw_addr_set().

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: smsc: remove leading spaces before tabs</title>
<updated>2021-05-19T19:17:31+00:00</updated>
<author>
<name>Hui Tang</name>
<email>tanghui20@huawei.com</email>
</author>
<published>2021-05-19T05:30:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=996d7ab8badf153b59db5a85da0d65623eb58a2d'/>
<id>urn:sha1:996d7ab8badf153b59db5a85da0d65623eb58a2d</id>
<content type='text'>
There are a few leading spaces before tabs and remove it by running the
following commard:

	$ find . -name '*.c' | xargs sed -r -i 's/^[ ]+\t/\t/'
	$ find . -name '*.h' | xargs sed -r -i 's/^[ ]+\t/\t/'

Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Hui Tang &lt;tanghui20@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
