linux/drivers/net/ethernet/realtek
Sebastian Andrzej Siewior d6c36cbc5e r8169: Use a raw_spinlock_t for the register locks.
The driver's interrupt service routine is requested with the
IRQF_NO_THREAD if MSI is available. This means that the routine is
invoked in hardirq context even on PREEMPT_RT. The routine itself is
relatively short and schedules a worker, performs register access and
schedules NAPI. On PREEMPT_RT, scheduling NAPI from hardirq results in
waking ksoftirqd for further processing so using NAPI threads with this
driver is highly recommended since it NULL routes the threaded-IRQ
efforts.

Adding rtl_hw_aspm_clkreq_enable() to the ISR is problematic on
PREEMPT_RT because the function uses spinlock_t locks which become
sleeping locks on PREEMPT_RT. The locks are only used to protect
register access and don't nest into other functions or locks. They are
also not used for unbounded period of time. Therefore it looks okay to
convert them to raw_spinlock_t.

Convert the three locks which are used from the interrupt service
routine to raw_spinlock_t.

Fixes: e1ed3e4d91 ("r8169: disable ASPM during NAPI poll")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/20230522134121.uxjax0F5@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-05-23 20:38:12 -07:00
..
8139cp.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
8139too.c net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
atp.c ethernet: replace netdev->dev_addr 16bit writes 2021-10-14 09:22:27 -07:00
atp.h net: wan: atp: remove unused eeprom_delay() 2022-04-26 17:09:23 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
r8169_firmware.c
r8169_firmware.h
r8169_main.c r8169: Use a raw_spinlock_t for the register locks. 2023-05-23 20:38:12 -07:00
r8169_phy_config.c r8169: fix RTL8168H and RTL8107E rx crc error 2023-03-25 11:22:04 +00:00
r8169.h r8169: merge support for chip versions 10, 13, 16 2022-09-08 13:12:32 +02:00