Subject: Re: [PATCH 2/2] net: ks8851: Handle softirqs at the end of IRQ thread to fix hang

From: Jakub Kicinski <[email-masked]>
Date: Tue, 2 Apr 2024 15:01:11 -0700

On Tue, 2 Apr 2024 19:38:26 +0200 Marek Vasut wrote:
> >>   				ks->netdev->stats.rx_packets++;
> >>   				ks->netdev->stats.rx_bytes += rxlen;
> >> @@ -325,11 +325,15 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
> >>    */
> >>   static irqreturn_t ks8851_irq(int irq, void *_ks)
> >>   {
> >> +	bool need_bh_off = !(hardirq_count() | softirq_count());  
> > 
> > I don't think IRQ / RT developers look approvingly at uses of such
> > low level macros in drivers.  
> 
> I _think_ the need_bh_off will be always true as Ratheesh suggested, so 
> this can be dropped. I will test that before doing a V2.

Quite possibly, seems like a reasonable fix if we don't have to make it
conditional.