From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795881003; b=RRugULyS+G3j+Dn54OrLZFUGWD5VXRoE/WuLQ8o/3zT4+jYbuyucT1gWYUIkkjN8zbE5 hhyUfGR9AgAVFsERk161ey9hzFsNYgw3lxxYRxY/C3YmhbiMQNbufD09+umOOx/qTGbCO 5JUVE4vWINZ6Gl8U4bIXUUpGkmuKtUvHDoIZLRByOkj97QH5hcz/neHTKOoygYLVQfM5S QRsZSzm7C7j6s9WYfuj0pB9npoBJVz1QjPo/sjczWeZ+dnvAOTjZApg9do/v2fadQtJ8+ 9kcJN8cgigNhQtRMq7QFlddpqm4bWuZxNV0OoTHGY9sQYSqh06J8nzuDojAPzSljLpw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795881003; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=7KYF38PdxPAp8lotUD2dNgQHdrEO+PKJa9vZHW3kVCU=; b=R1FC/Td8gkAk7+UiBJ9g1qkEReoUXZhxTatwnGgPoybQTmddiHB72/t3u8NwUiXU6I+5 yNjOIphUeHOZvgL48zpDVe4RirxqfXC4FYxskGznO+cS7IHShqYVH2P2fbjlSyLBuEN5J 7z2R73M0FL57kfCjftHoW+cyGndR3tGCibsr4Hrrrvimz3I3V2Q8IjHembRXyZsCTaXRu +snR7S+d0WusyT1a21X6HPGuRZUnvOsES45czbVvV3XB8j1RdFOif8tq8dOL14nY7BJ+s P/2bg4OgCVDpqX+Bfsw1wf5x3eGzeSKIsPMpJBrcvYyz2of04QjuTG6wNEBj4sGviaA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cPISlUVB; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8DD2606A321; Sat, 28 Nov 2026 15:50:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cPISlUVB Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CBED1F000C1; Sat, 28 Nov 2026 15:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795881003; bh=7KYF38PdxPAp8lotUD2dNgQHdrEO+PKJa9vZHW3kVCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cPISlUVBb0q4tP9u0fUQ05sqUOW3TG/nh5WHUJjzsVcOFBrLMY17H19Z3YKKsbI9K rq8BrfQK1yFMRHCQIHVlXfiQTHMu1Lbu+nONBNHttdTG3dDsweHrv6LqP/5wWKhuDJ +3II4Rfy0hn2wIj/OaVPjNuiPoT5d9hqxpsf7mORB1IXzlg0hvahlTK2pScYwYZOz5 sI+Ha1NwTcktrgj8JtBsaPh7Mzg5qvxvKprrmNWQ6qcoGKyMtmJXw3kPZ02SiFJWyV McrawmHBDuWlDBYn2mRMC8Gze7LIjoiRIqKEd47/TH2Xqvcie0x3rJMe3gesV/aTWN Hn+RMSJ2iNU8A== From: Imre Kaloz To: Thomas Bogendoerfer , netdev@vger.kernel.org Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-mips@vger.kernel.org, Sashiko , stable@vger.kernel.org Subject: [PATCH net-next v2 2/2] net: sgi: ioc3-eth: do not wait for the link timer in ioc3_init Date: Sat, 28 Nov 2026 16:49:53 +0100 Message-ID: <20261128154953.2664-3-kaloz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261128154953.2664-1-kaloz@kernel.org> References: <20261128154953.2664-1-kaloz@kernel.org> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ioc3_init() waits for the link timer with timer_delete_sync(), but it runs from ioc3_error() in hardirq context with ioc3_lock held, and from ioc3_timeout() under spin_lock_irq(). A callback interrupted on this CPU never finishes, and one on another CPU spins on ioc3_lock, which the waiter holds. Stop the timer in ioc3_open() instead and leave it running across resets, so the link poll no longer stops after the first error interrupt. Reproduced by injecting an IOC3 error interrupt from a kernel modification: without this change, timer_delete_sync() warns from hardirq context. Tested on an SGI Fuel with DEBUG_SHIRQ and SLUB_DEBUG_ON: link down/up, driver unbind/rebind and an injected error interrupt. Fixes: cfadbd298e8b ("[PATCH] Fix timer race") Reported-by: Sashiko Closes: https://lore.kernel.org/all/179504054981.3136.8539477779059154181@kernel.org/ Cc: stable@vger.kernel.org Signed-off-by: Imre Kaloz --- drivers/net/ethernet/sgi/ioc3-eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c index 5023d05e7e38..0bb2e71befc8 100644 --- a/drivers/net/ethernet/sgi/ioc3-eth.c +++ b/drivers/net/ethernet/sgi/ioc3-eth.c @@ -718,8 +718,6 @@ static void ioc3_init(struct net_device *dev) struct ioc3_private *ip = netdev_priv(dev); struct ioc3_ethregs *regs = ip->regs; - timer_delete_sync(&ip->ioc3_timer); /* Kill if running */ - writel(EMCR_RST, ®s->emcr); /* Reset */ readl(®s->emcr); /* Flush WB */ udelay(4); /* Give it time ... */ @@ -786,6 +784,7 @@ static int ioc3_open(struct net_device *dev) ip->ehar_h = 0; ip->ehar_l = 0; + timer_delete_sync(&ip->ioc3_timer); ioc3_init(dev); if (ioc3_alloc_rx_bufs(dev)) { netdev_err(dev, "%s: rx buffer allocation failed\n", __func__); @@ -1131,7 +1130,6 @@ static void ioc3_timeout(struct net_device *dev, unsigned int txqueue) } ioc3_start(ip); ioc3_mii_init(ip); - ioc3_mii_start(ip); spin_unlock_irq(&ip->ioc3_lock); -- 2.47.3