From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25AAD3A168F; Mon, 13 Apr 2026 12:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776085071; cv=none; b=QcNqp+6lDON5kTZnSARRfSk72bfi2yV/P7AkU+9o3Z9L0VE17SHW25A7jPird+ZP2dtRNWlDO5QyTg/HneuMNgdqP98MIk3rylaNYWml5xeXg1AFJZZs91pUQF83jwo2M1LH+SSxmaYA80NGgQoij+y/EK1dBQ27fL74+gSuMLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776085071; c=relaxed/simple; bh=D0uC3RC5O6zNthbjcHpQNe+gRBU+aQxNET16X2ew49U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZwMBmPXE/HQ4UEDzvkSWIHFV5bCDVZL+4T+5fMIw6Cqn4PtOptrz4Qoa52hDJ/5IcTnzNhxMxbCcM8NSnQy9FJHhU0khmhrpJgG7LvSf9qrgIgxBz/nhYgIq0QltCO2mV2h+CEVE3Y4o+QZLbJJibl5py8MkMhCNqQJV5gxM23c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JBg8Qy6y; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bRK3igYk; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JBg8Qy6y"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bRK3igYk" Date: Mon, 13 Apr 2026 14:57:44 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1776085066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nUTB7MWkI9XWZ7FUtzXqjzpIN4EwcG3IV7eTCDJB410=; b=JBg8Qy6yrF6Hk/uj3ZFJC4iNEDKwE+5sPIVYvxq4xYHtV4PwqmWLPSnP1vF5yZByRJ7H8G XWWd8+aa1MNhllB4zjEPJegEF32SIY3JgKIRCYw8ls4CM8fHIC+lDdA/rIRoVAfWBK3KEZ SwNOAzrOmnTqhuM/96pwIZ014UB7KL9Znc0K8fL1uO4HjoZOKHPgjU5MRwHkVeE8w0cVrt FL7ByitX8MbyLMex8taFh+6/hwOHe9ukntAk5QqUljAD/MmyjFurbhiERJPQ53FW8o3WWd 46y1ffrdPW6dioeN1BeyFzf7PyKtfQrQ/jqwWOc2LOfgP1h401+VNaNnYmdlBw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1776085066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nUTB7MWkI9XWZ7FUtzXqjzpIN4EwcG3IV7eTCDJB410=; b=bRK3igYkjtb1pneyNhfBQJFjrkJvjFXnIz2MeDpI0IFJSpQbbsHu8IAWzOZ2rEWbZR5IN2 vLYoaVUZwin7JGCQ== From: Sebastian Andrzej Siewior To: Jakub Kicinski , Marek Vasut Cc: netdev@vger.kernel.org, stable@vger.kernel.org, "David S. Miller" , Andrew Lunn , Eric Dumazet , Nicolai Buchwitz , Paolo Abeni , Ronald Wahl , Yicong Hui , linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: [net,PATCH v2] net: ks8851: Reinstate disabling of BHs around IRQ handler Message-ID: <20260413125744.TVKkZcEK@linutronix.de> References: <20260408162535.98108-1-marex@nabladev.com> <20260412090141.21bf1534@kernel.org> <2558832d-c821-436d-898d-b708c5e0a228@nabladev.com> <20260412105125.48f0c58f@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20260412105125.48f0c58f@kernel.org> On 2026-04-12 10:51:25 [-0700], Jakub Kicinski wrote: > > Does the backtrace make the problem clearer, with the annotation above ? >=20 > Sebastian, do you have any recommendation here? tl;dr is that the driver = does =E2=80=A6 What about this: --- a/drivers/net/ethernet/micrel/ks8851_par.c +++ b/drivers/net/ethernet/micrel/ks8851_par.c @@ -63,7 +63,7 @@ static void ks8851_lock_par(struct ks8851_net *ks, unsign= ed long *flags) { struct ks8851_net_par *ksp =3D to_ks8851_par(ks); =20 - spin_lock_irqsave(&ksp->lock, *flags); + spin_lock_bh(&ksp->lock); } =20 /** @@ -77,7 +77,7 @@ static void ks8851_unlock_par(struct ks8851_net *ks, unsi= gned long *flags) { struct ks8851_net_par *ksp =3D to_ks8851_par(ks); =20 - spin_unlock_irqrestore(&ksp->lock, *flags); + spin_unlock_bh(&ksp->lock); } =20 /** I don't see why it needs to disable interrupts. This seems to be used by the _par driver and the _common part. The comments refer to DMA but I see only FIFO access. And while at it, I would recommend to diff --git a/drivers/net/ethernet/micrel/ks8851_common.c b/drivers/net/ethe= rnet/micrel/ks8851_common.c index 8048770958d60..f1c662887646c 100644 --- a/drivers/net/ethernet/micrel/ks8851_common.c +++ b/drivers/net/ethernet/micrel/ks8851_common.c @@ -378,9 +378,12 @@ static irqreturn_t ks8851_irq(int irq, void *_ks) if (status & IRQ_LCI) mii_check_link(&ks->mii); =20 - if (status & IRQ_RXI) + if (status & IRQ_RXI) { + local_bh_disable(); while ((skb =3D __skb_dequeue(&rxq))) netif_rx(skb); + local_bh_enable(); + } =20 return IRQ_HANDLED; } Because otherwise it will kick-off backlog NAPI after every packet if multiple packets are available. Sebastian