From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6DCCC15E215 for ; Tue, 2 Apr 2024 22:01:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712095273; cv=none; b=iWdtjRbkO9Z4pCKFQIL616B7TU5AeXQ7VtZ5Oyob0Nt5k8GUO/vdIk7VX5ngTk9MD8gZzumyHKsITYQk2If0MHAFf4FH/hJsb138GJfaL57WNgN9vmP3FXlBDUulS1ZK7Xj+C93gJFLWLZQvDs/gQbdBpuNfdg3OLkru2pQplDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712095273; c=relaxed/simple; bh=TmIg7E+wAFjkw7fZGj5M5J5B42Wxo9MJZcZCKxBYT1I=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mjjp39vhxcjhKyvho4SDjK2VjhmsQK4CDNpq8cIucwH36OGj5/iNKpACxk8Tz3AkAeYszQjwZktUvtCBJhnDJxhsm5ayv0M+qChKoLW8v47K2w0Aftp7yr17yNkHTjhje1iILfu4RQEO4CIJ34lPBX2zg393W767XLvacf0dhBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PnpnaBdR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PnpnaBdR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5B47C433C7; Tue, 2 Apr 2024 22:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712095273; bh=TmIg7E+wAFjkw7fZGj5M5J5B42Wxo9MJZcZCKxBYT1I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PnpnaBdRaSx+LpkB7YW0NwOZ1tYJm9DbmtacKNrThmIRbXPh6G7j9N9hEQRpy3bY0 ht3AqapLnGkpkm3jbcmJ5uZbQO+O6JUCcHSWjBhYOn4zn8R5QaWFP9MYuz736FX1n0 1skQ+ONUOrxfXx6G3nv/zIz+pX1wMWbw9twAKGWHOyu1k7JEpBhTHPqMqNThJP+uoQ J3IEAtQMca6XjOVfIPjlamPc3UIvRF0fO4PyYXhdNX4DlVTQYG4FJGra1PgzO/Grwh LdkXO9QXvIPqqZPeQztftufjQ33/bim++F3y+7ggLk6eVnfoCM9hqH1vvjDYhOwV8Z ypEccF1CsVKwA== Date: Tue, 2 Apr 2024 15:01:11 -0700 From: Jakub Kicinski To: Marek Vasut Cc: netdev@vger.kernel.org, "David S. Miller" , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Andy Shevchenko , Dmitry Torokhov , Eric Dumazet , Mark Brown , Paolo Abeni , Ronald Wahl , Simon Horman Subject: Re: [PATCH 2/2] net: ks8851: Handle softirqs at the end of IRQ thread to fix hang Message-ID: <20240402150111.170dc2cc@kernel.org> In-Reply-To: <96ee283f-53cc-4317-8ac5-f08c4291a887@denx.de> References: <20240331142353.93792-1-marex@denx.de> <20240331142353.93792-2-marex@denx.de> <20240401210642.76f0d989@kernel.org> <96ee283f-53cc-4317-8ac5-f08c4291a887@denx.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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.