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 0448945BE5; Mon, 28 Oct 2024 03:09:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F42A4066C; Mon, 28 Oct 2024 03:09:18 +0100 (CET) Received: from smtpbg154.qq.com (smtpbg154.qq.com [15.184.224.54]) by mails.dpdk.org (Postfix) with ESMTP id D0E32406B4; Mon, 28 Oct 2024 03:09:10 +0100 (CET) X-QQ-mid: bizesmtpsz8t1730081338tizcfdb X-QQ-Originating-IP: QBrMfbmcqWxFiaDYmDhwr2mg9pkWB8BwSvki6jGIzwU= Received: from wxdbg.localdomain.com ( [36.24.66.21]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 28 Oct 2024 10:08:57 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 10065984695752085265 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Subject: [PATCH v2 12/13] net/ngbe: fix interrupt lost in legacy or MSI mode Date: Mon, 28 Oct 2024 10:31:46 +0800 Message-Id: <20241028023147.60157-13-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20241028023147.60157-1-jiawenwu@trustnetic.com> References: <20241023064836.2017879-1-jiawenwu@trustnetic.com> <20241028023147.60157-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpsz:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-QQ-XMAILINFO: NSahpW5IwUZO5+rPoqC7jUDyuEben5CYRUk9ewLQK5CO/FfMwUGm3YMw PmGjCuN7AldDCzJZJAWJhNSUHMWkOVCX914Mqzbbr9/WCOK6eDtJcJvJyAWbiRIy3JVJgnW DJ+JSgWj8p+nrbXDBoKM/ft0aFUJlJ95pUnUmi+7ng5szSgcgDacguyXmp3GVy6H2I6TiNX DVuKZ5NiJ+LXUOCrpoIx3HY3h7t40AfM6ot82hy3IxDqTbUz8Iu5s8maXTR2TAZ6WTW8h+h x8vfOPkguPknige3ZTDOpC618TAQG+sNDPSd2C83P2ct6Ew0Sa7LZbguajQfyisMHaDBXb1 Bito7+gLN76Fq7PYvfrebLe6d3C1wI3uzCBhy4xUeww8diiqfMV77RwPuK2LpSjkbjMeGHY 86wGGWrOs7wcURqwpj0f5RFNelEfdcrVN1wkvzLmAekW+shgwcEDEhIdnwrk4drWi+fFQqz E1SJkJ0ykudwNY9QrfMJxm7qMwPRZLlCziXWcM+9UaeCa/YNgDPHqgnxc7O38+5As/pe6wQ V+P5svdN9PABPAW+r06fW+/3xYCMmrS+JPIkqI54j/iRLHyDM4lB8zZ+9otF+uIgR+eeuRr oRow7NRvT8T8uG8X0+ZEzrK9IZ1k9C1MfP4BCvSQ1sPhn8hsvzAfvZiEVshWxdDP5j/8YlZ v47rL8LS2YZ3dbJaIB8++SVx1FPz4KqpPMiSNaWWmEaOMzh3QRcK96Bdd5J7XbnisNN6pXa nYw+/3ETywGW4S/CnR1U5dkHRNF5JqJdMq17Hk8XqvpW3F3jucL7aG6g7h+YQ9CL1zuSpRd Pg25cZXKsbpbKt8cVuQgiwVTTIWr4uDxCdjCwVL2mQ30fb+gzlxNu1BZMdYrcxBD5NnFUuV g/z/fv7A6+39p6+mboqkpRG5PldXOXzLO7y8r+QmEoYXMg+/OJYTnvkF/N/1NL1p6CdggUK ZK1K4gqdxUIa0si1XnPi1p8iyWwBildoX5fIX3IHNSMYAn3v6Csow/Yu+ X-QQ-XMRINFO: Mp0Kj//9VHAxr69bL5MkOOs= X-QQ-RECHKSPAM: 0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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 3ea7ed43ff..e7dc1c0f94 100644 --- a/drivers/net/ngbe/ngbe_ethdev.c +++ b/drivers/net/ngbe/ngbe_ethdev.c @@ -2186,6 +2186,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