Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9938741ybi; Wed, 24 Jul 2019 12:41:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEFYMEq1XSWzbSe8heYFOinRzhlHhJyFUiJXl70J2Et8eVA1RO1gAypjcVtb4bY0dBvUZk X-Received: by 2002:a63:cb4f:: with SMTP id m15mr7286771pgi.100.1563997269251; Wed, 24 Jul 2019 12:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563997269; cv=none; d=google.com; s=arc-20160816; b=VfFo+oZ3jWixjgF1qZ8y/ZjOseK/izfU573j/x6oV1xLW7ylgwhD5erRuSqPfJQvAe k88p1kyeHX23BJhrYxbE/lFOHMZzSeDZxhaCno+pEwrAZE3HPN0+IwNso2Spx0U8jS31 ElRmVNeelAyFmqcPeFWlgOz3t8s2snisXLiV4e0uCUavc6QaXQUlm6JHkXgX6ajyuNID LYxKDQxBcuB6IeoEvHm1HNraNKCMGKRVboMMtqAl9NwtA0qsPhIx4heYQL5SAs3BdW67 8JuhkvpM2/JjVWAiPXGZV5mfLKOrWLk/+HVM5O3x7gOkWboEOjKH7u+nYj7GcUtyn3Xc ixsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QvlpmsrEO/qdh9PAjjPIAHEMbE6w/IjT0Y5Y/aSPsl8=; b=Rbk+cr52qw+nYJWDB8v4BYedWi1b9MpsdrsZ+c/6qMd5tOS0aXAxSYFsRg7MlD73m3 N1J6KmthMK+pahVbMDt/zRpSPFrTHe0OJ7QIGFm6qKzxG3tbXImvDHhV1BrBAmkRvi+Z NjjVVX09uIHETFx8HVS9V/2BCS/AGvi2k9qrkhMwPqj2wwdX4Cst39XrVNTG1Mtgb++j gt2A7L0gfFEQSAxrk5rmgPQ/8ptN2g7aLxdpYvlrFIPijC2dzz2rBdLSvtBuobuk37C7 r+oYUNwNW8ESkwfRmLARlHqCA03T7ddpPj68R3WJ+c9OhC2xM6m54WgmKxr3BvI78h1r HTUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hiw1JFjd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v71si15760675pgd.468.2019.07.24.12.40.54; Wed, 24 Jul 2019 12:41:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hiw1JFjd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389663AbfGXTjj (ORCPT + 99 others); Wed, 24 Jul 2019 15:39:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:40686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389961AbfGXTjg (ORCPT ); Wed, 24 Jul 2019 15:39:36 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 83176229F4; Wed, 24 Jul 2019 19:39:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997175; bh=3Cw7wmrxI0vPXcZeOl+alUhNYLWkew2XmGOFUWbkJdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hiw1JFjdhdJTIiIw9k/BB0CFswECh8obgENmK/A4uZtCqOs0gotdN5gXppC8aHwOH 42PEvZpn9cCh7w4uiZTH0Rn0mTbXsBzWXqUxDjRqEbMsNnm3jHCNcwuf8reHEgkulz ZdDO+59C9R/uOzEONgpHRsvcpN6U/H0bvMIGySX8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emmanuel Grumbach , Luca Coelho Subject: [PATCH 5.2 295/413] iwlwifi: pcie: dont service an interrupt that was masked Date: Wed, 24 Jul 2019 21:19:46 +0200 Message-Id: <20190724191757.215495817@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Emmanuel Grumbach commit 3b57a10ca14c619707398dc58fe5ece18c95b20b upstream. Sometimes the register status can include interrupts that were masked. We can, for example, get the RF-Kill bit set in the interrupt status register although this interrupt was masked. Then if we get the ALIVE interrupt (for example) that was not masked, we need to *not* service the RF-Kill interrupt. Fix this in the MSI-X interrupt handler. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c @@ -2108,10 +2108,18 @@ irqreturn_t iwl_pcie_irq_msix_handler(in return IRQ_NONE; } - if (iwl_have_debug_level(IWL_DL_ISR)) - IWL_DEBUG_ISR(trans, "ISR inta_fh 0x%08x, enabled 0x%08x\n", - inta_fh, + if (iwl_have_debug_level(IWL_DL_ISR)) { + IWL_DEBUG_ISR(trans, + "ISR inta_fh 0x%08x, enabled (sw) 0x%08x (hw) 0x%08x\n", + inta_fh, trans_pcie->fh_mask, iwl_read32(trans, CSR_MSIX_FH_INT_MASK_AD)); + if (inta_fh & ~trans_pcie->fh_mask) + IWL_DEBUG_ISR(trans, + "We got a masked interrupt (0x%08x)\n", + inta_fh & ~trans_pcie->fh_mask); + } + + inta_fh &= trans_pcie->fh_mask; if ((trans_pcie->shared_vec_mask & IWL_SHARED_IRQ_NON_RX) && inta_fh & MSIX_FH_INT_CAUSES_Q0) { @@ -2151,11 +2159,18 @@ irqreturn_t iwl_pcie_irq_msix_handler(in } /* After checking FH register check HW register */ - if (iwl_have_debug_level(IWL_DL_ISR)) + if (iwl_have_debug_level(IWL_DL_ISR)) { IWL_DEBUG_ISR(trans, - "ISR inta_hw 0x%08x, enabled 0x%08x\n", - inta_hw, + "ISR inta_hw 0x%08x, enabled (sw) 0x%08x (hw) 0x%08x\n", + inta_hw, trans_pcie->hw_mask, iwl_read32(trans, CSR_MSIX_HW_INT_MASK_AD)); + if (inta_hw & ~trans_pcie->hw_mask) + IWL_DEBUG_ISR(trans, + "We got a masked interrupt 0x%08x\n", + inta_hw & ~trans_pcie->hw_mask); + } + + inta_hw &= trans_pcie->hw_mask; /* Alive notification via Rx interrupt will do the real work */ if (inta_hw & MSIX_HW_INT_CAUSES_REG_ALIVE) {