r8169: use spinlock to protect access to registers Config2 and Config5
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 6 Mar 2023 21:24:00 +0000 (22:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Mar 2023 09:30:41 +0000 (09:30 +0000)
commit6bc6c4e6893ee79a9862c61d1635e7da6d5a3333
treedc1b508439a705310f9f8621e6d02b5107dadff6
parent91c8643578a21e435c412ffbe902bb4b4773e262
r8169: use spinlock to protect access to registers Config2 and Config5

For disabling ASPM during NAPI poll we'll have to access both registers
in atomic context. Use a spinlock to protect access.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c