From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6D7445C2A for ; Mon, 4 Nov 2024 03:07:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C1D940BA6; Mon, 4 Nov 2024 03:07:21 +0100 (CET) Received: from smtpbg151.qq.com (smtpbg151.qq.com [18.169.211.239]) by mails.dpdk.org (Postfix) with ESMTP id F0E4B40BA0; Mon, 4 Nov 2024 03:07:16 +0100 (CET) X-QQ-mid: bizesmtp91t1730686035t673ed1e X-QQ-Originating-IP: wO7iKaH+Jwbg4Ti8gaKsFN4Y9qNlnvTIqoOoSU3vDXE= Received: from wxdbg.localdomain.com ( [60.186.23.108]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 04 Nov 2024 10:07:14 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6123460964142754284 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Subject: [PATCH v3 12/13] net/ngbe: fix interrupt lost in legacy or MSI mode Date: Mon, 4 Nov 2024 10:30:06 +0800 Message-Id: <20241104023007.782475-13-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20241104023007.782475-1-jiawenwu@trustnetic.com> References: <20241028023147.60157-1-jiawenwu@trustnetic.com> <20241104023007.782475-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-QQ-XMAILINFO: OGzNw3ivHO9Cxx2zsUcXC/gPctwaghGz3jQzLPG8Ar0A+I4M96HHFwIx 6dxkpKKv7Ku942XZNbcsqrlsaCV/uHnoYUugtsbOfiOpKIYDZkNvOaz7ETBrCfStiUbOnXF 8RzcIzItDbDUR6k2adUkbqFS/NpttvmWS9ahNvet/NFEjqTFXHwVXgYskpPmOOv2COrX8f5 9L/RQmVLcvR5BepvqNBBcF1qZKoEsOh7u7hdZ/dyTaytDEbeVxmokPLLA2+PHG32YzW1gBz xv1qG6kNt2dw3tI1KB6NTXjrLKiy1X6I6yU+9AJGTAhuXapAssa0NX903V5OuOyZZUYoRRJ J5M/PPSEx7nzDm+5wTWmuiXuOjhh+caoYxerICBsmKN/jdmRMyyzl6EV3AyYP/861Zb8zaw dr3EmLtIiuhu/Hlh5wsJBYr9vMwT+CHXKSRrqZ5Coprv7AMRrEuzdbI5fPNNKlIygPWhoMi TiMnOnIbYtSEWTy4lLYJujhxaQMJRAWSZygfue8K9fNvrrvXUHjicqFmlBvuv++GuQhTQwU pYEl+cY3IWP1DgGlDy5OwJz+U1W+gKkNX3/l4B4XP3bzYlDR5nlquX5plR9JKG0kKrieEHU aLCzCc1AAfvDtQNUeESldMQ5lirSXzwLr7StSc7Hgbrxw8AHURdnrvn8/b7cbnWaj9hdBZh IyZWG3OWUrYaWO32n1homYyzNu1Y9LctZIokXvnCW1Js7eh3fBjUYwYAO5VVIio9CRnylRC TbhEu9VVbM2VNSq17EOf0C2xeRo1iqPChRHKHf4KkKk0NBedkIqJfi/KnRsPcRzX7p7/zfW sHPu7sPoR3AGJXIqbvtdL2Yam2MfZ3GTu0PrvIEMaMkJcpSj5ho6qrXHbUnavvUwR/cmshI SsUV2kZu2xNKR6TcOxbzo/zeHkwt3UzYl5Y9tHgvMNmtqDa+yUmqcvJ/dR8rPeWZR4bWc+s +34wK/S9WZRYdZ4hJqSg415mDR7vF5Ab4PaVKa5r+11CdZGWva/FjQtZshluH83TNolRq4E oE3JOTVQ== X-QQ-XMRINFO: M/715EihBoGSf6IYSX1iLFg= X-QQ-RECHKSPAM: 0 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org When interrupt is legacy or MSI mode, shared interrupt may cause the interrupt cannot be re-enabled. So fix to read the shared interrupt. Fixes: b9246b8fa280 ("net/ngbe: support link update") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/ngbe/ngbe_ethdev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c index c372fd928c..325a9d1eaf 100644 --- a/drivers/net/ngbe/ngbe_ethdev.c +++ b/drivers/net/ngbe/ngbe_ethdev.c @@ -2193,6 +2193,19 @@ ngbe_dev_interrupt_get_status(struct rte_eth_dev *dev) struct ngbe_hw *hw = ngbe_dev_hw(dev); struct ngbe_interrupt *intr = ngbe_dev_intr(dev); + eicr = ((u32 *)hw->isb_mem)[NGBE_ISB_VEC0]; + if (!eicr) { + /* + * shared interrupt alert! + * make sure interrupts are enabled because the read will + * have disabled interrupts. + */ + if (!hw->adapter_stopped) + ngbe_enable_intr(dev); + return 0; + } + ((u32 *)hw->isb_mem)[NGBE_ISB_VEC0] = 0; + /* read-on-clear nic registers here */ eicr = ((u32 *)hw->isb_mem)[NGBE_ISB_MISC]; PMD_DRV_LOG(DEBUG, "eicr %x", eicr); -- 2.27.0