Article View: linux.kernel.netdev
Article #12635Re: [PATCH net] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped
From: Yuehong Wu
Date: Sun, 08 Nov 2026 04:06
Date: Sun, 08 Nov 2026 04:06
36 lines
10257 bytes
10257 bytes
Hi Sashiko, Thanks, the finding is correct: adin1110_net_open() writes IMASK1 with an absolute value that includes ADIN2111_RX_RDY_IRQ whenever the chip is an ADIN2111, so opening either port re-enables the RX-ready interrupt of a peer port that is still down and undoes the mask from adin1110_net_stop(). v4 keeps a stopped peer port masked: the peer's bit is only added to the value written to IMASK1 when netif_running() is true for that port. The write stays absolute, so the bit is still enabled while the peer is running, and netif_running() is __LINK_STATE_START, with ndo_open() and ndo_stop() serialised by RTNL. priv->irq_mask keeps its previous value and meaning (the STATUS1 write-one-to-clear mask), so the clearing behaviour is unchanged. IMASK1 is written in exactly two places, both under priv->lock. Single-port ADIN1110 writes exactly the same values as before. On the FIFO question: I do not think it needs to be drained on stop. While the port is down its RX-ready bit is masked, so it cannot raise an interrupt, and whatever is left in its FIFO is drained by adin1110_read_frames() when the port is opened again. Draining in the stop path would mean reading the port FIFO from a second context while the peer may be running. The patch only changes the mask programming; the pre-existing probe-time mask state, the TX/SPI interrupt policy and the operstate gating in adin1110_port_rx_ready() are untouched. Testing: no ADIN1110 or ADIN2111 hardware; compile-tested with gcc, W=1, CONFIG_ADIN1110=m and =y, full kernel builds. Thanks, Yuehong pw-bot: cr
Technical Details
Message-ID:
<20261108-adin1110-sashiko-reply-1-yuehongwu@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358587-linux-kernel-netdev=dewy.ruReferences:
<20261103-adin1110-net-stop-1-yuehongwu@cmss.chinamobile.com> <179406205322.994134.9029665354316624384@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358587-linux-kernel-netdev=dewy.ru From: wuyuehong@cmss.chinamobile.com (Yuehong Wu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: ethernet: adi: adin1110: mask the RX IRQ of the port being stopped Date: Sun, 08 Nov 2026 12:06:00 +0800 Organization: Usenet Network Message-ID: <20261108-adin1110-sashiko-reply-1-yuehongwu@cmss.chinamobile.com> References: <20261103-adin1110-net-stop-1-yuehongwu@cmss.chinamobile.com> <179406205322.994134.9029665354316624384@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="58722"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:N6KTW2dJnD8u+23I8kAzOZSicQw= sha256:9MMW0WuY4M1OWw3tQNC3Qdi+MLZZ73EaKuPcoLXmcBI= sha1:9cbkCE7dRlmTLpi6CS+8SAlx+Ek= sha256:7sz/qD92O+SEPOZozqxYOln67BK9MG1BmIcz+RKt4rQ= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 1D96011350F; Sun, 8 Nov 2026 07:08:25 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.75 X-Spam-Status: No, score=-2.75 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=cmss.chinamobile.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xS78iZdlXm3M; Sun, 8 Nov 2026 07:08:21 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-358587-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 2FF8811350B; Sun, 8 Nov 2026 07:08:10 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 5B1513E81B; Sun, 8 Nov 2026 04:08:06 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794110885; b=UsPNR0HoR+Tfh91AdFnNTLR56+ZRtFS5ySc5DQ3dkJ4SPCc9dvgaOkcagInFO8Oczfq7 i1Iy5Y5r6xaBObYxHoFAxV9hyaD3fuOaRQBMESbm0CO6j9nKz5Hlt7Gb44xXdI0Tg2+DX Ox1AOe5yZiYTnDdl+4aC3owh1TZjhGaGOItjVdaPOY39sJasG3lNh1Fkd86U8uG76MX68 dPw8cNWTdk+NPNb6nVmddMZWv8kvHrgmejZJZzEbFC6qq3JN65BibkqMmxSWHwA8Dj0tt nw2PKWdY52KYC0Xt7w9RU2IEPlq1O3WumPdM1aBJ0Hh+nirHTIQwpLnoKqmXV4mSWhw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794110885; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo: X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG: Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=i0mn4kyjpsJOLwR8BfB57/p6FpIMYD7Mq3h01vA4rUo=; b=Tm/v2ejtfS7ofsMRNMFlyOgheNooAdB7bVF2+nQYKmc3yfjbSV8UwF1uyTbPKFY9AR1v rMDRIjsAvDLm2q4xxfqtODzT8zCedeZDLsTOrblULXsfrMRBBU9KgS9tgA7AHhZtTQuc2 Jml4lmpBPDiHUr/GQERd2JUYuXwtAbKeRSldMoUMZoA86lLhAnBWmPbZD/gPtGl7oKV/c mf1oYXEwVNRdLpwQO7gAMX1Yki5jA/0zi+h66WYRh84en3cHXzwwiOMddnYETvlmdeINO BMuXXVLrIZuOSQbst/0UHBvaDeVIXMFcLZEjfAcxWfIEGj+7cRjWGJ9fO9R41vkUjhA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=X53lRrhL; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F144A606A33C; Sun, 8 Nov 2026 04:08:04 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=X53lRrhL X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794110884; b=WyDnIEoJY0J+DAFWA0WwcTLSx8904Ru0f6GrVyZmupRNXqeCpuyI5wEAlKQ0IN9h07KH KaLa7yJrMnd7VYOczKpe75ww3aPZfINltJXq6nzgCFDtrKeqMW2FL6Mw3J4Ucv/G0j+PV g4U8jzcmGt9bGwsKo2l48srC88EDzbnjU3MfyYRcvs6eavOg0WZytRdCHQ/JiHd03H5YX 8HAF0ysk17/1I4OLAgz8Z8R6j0xeVefSjVPL9hi6XojXbhWsdU32DqFV4pvETXM1XTa5n LZOdaZK0qNnrlkbM1w64k5aGsA2eVT8CF96B6/uNJC5Y5FYSBw54NFEhjAxJURIGRKw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794110884; h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received: X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From: To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=i0mn4kyjpsJOLwR8BfB57/p6FpIMYD7Mq3h01vA4rUo=; b=wxvvZm42G6UIZrW2KB8JvBKE42UiU0GYctYV67Y7+OZLVBu6csNkRF0+MwkPOy8W/0cY /uJHAlo/lIriyosBukURPhZb+Mn5F9S055y/b1d/pDUsrZcJMDb3cLbbI/GfD/QuiLL+l ns2MbYN71l5xW7XO2lTDzSrCbJyWuGvaQbqLPyKElrboIHZqt+JvCtWrztmdLE939sx5+ 8V7toAHkvLfSpHqh70WTrrp3t+8cev9lXnKvPxWFM6VloUJUIlKCDyXvcH4yfHt4sJz54 GNGitTlUHAN+5Y2ut/+xK8iIqcndxKSE90Krg/R/sMn2tV5UGuzB7yqSccbYZJ5CIUw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=X53lRrhL; arc=none smtp.remote-ip=111.22.67.139 X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F12D606A31A; Sun, 8 Nov 2026 04:08:01 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9F12D606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmss.chinamobile.com; s=default; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=X53lRrhLm8PW4os7GM2v8Pl9rXG+sLQqqFZJ3Sn6DqbEzM04s56siLNVfwI84jhyyxQRn6XLG3VBE ujyJ3HyeufOuZXixZ5Nhl2QhGbgYhdrs9Er8wuukxcsp82RQuNmPtaCnSwx1ax9GDp3BdR9u5OTiDV rsNWWJhYGkZqa/rg= X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app05-12005 (RichMail) with SMTP id 2ee56aeff59d368-b77d7; Sun, 08 Nov 2026 12:08:00 +0800 (CST) X-RM-TRANSID: 2ee56aeff59d368-b77d7 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from cmss.chinamobile.com (unknown[10.55.1.72]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee36aeff59ec88-5c3c2; Sun, 08 Nov 2026 12:08:00 +0800 (CST) X-RM-TRANSID: 2ee36aeff59ec88-5c3c2 X-Cc: netdev-bot+sashiko@kernel.org, "Alexandru Tachici" <alexandru.tachici@analog.com>, linux-kernel@vger.kernel.org, Jakub Kicinski <kuba@kernel.org> X-In-Reply-To: <179406205322.994134.9029665354316624384@kernel.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list