Re: [net,PATCH] net: ks8851: Reinstate disabling of BHs around IRQ handler

From: Marek Vasut

Date: Wed Apr 08 2026 - 17:21:44 EST


On 4/8/26 9:15 PM, Nicolai Buchwitz wrote:
On 8.4.2026 17:41, Marek Vasut wrote:
On 4/8/26 12:54 PM, Nicolai Buchwitz wrote:

Hello Nicolai,

thank you for testing on the SPI variant, that helped a lot.

In order to make this work I would propose something like this (which works in my SPI setup):

--- a/drivers/net/ethernet/micrel/ks8851_par.c
+++ b/drivers/net/ethernet/micrel/ks8851_par.c
@@ -60,12 +60,14 @@ static void ks8851_lock_par(struct ks8851_net *ks, unsigned long *flags)
  {
      struct ks8851_net_par *ksp = to_ks8851_par(ks);

+    local_bh_disable();
      spin_lock_irqsave(&ksp->lock, *flags);
  }

  static void ks8851_unlock_par(struct ks8851_net *ks, unsigned long *flags)
  {
      struct ks8851_net_par *ksp = to_ks8851_par(ks);

      spin_unlock_irqrestore(&ksp->lock, *flags);
+    local_bh_enable();
  }

Tested-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>  # KS8851 SPI, non-RT (regression + proposed fix)

Are you also able to test the KS8851 driver with PREEMPT_RT enabled and heavy iperf3 traffic on the SPI variant ? Does that trigger any issues ? I ran 'iperf3 -s' on the KS8851 end and 'iperf3 -c 192.168.1.300 -t 0 --bidir' on the host PC side.

Successfully tested with both PREEMPT_RT and non-RT kernels using the iperf3 command above - no issues observed. Both builds included the fix from my previous message.
If there is anything else worth testing on the KS8851 SPI variant, please let me know.
Thank you for that. Could you please add the TB to v2 too ?