Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1146790ybi; Fri, 2 Aug 2019 10:03:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAtjMQWtz6J0uhl46w+LNpirRvN8ooRJUGTpcacEguJTlLPK9SFIMF8Nrzmzb5gT34XKS6 X-Received: by 2002:a17:90a:9bca:: with SMTP id b10mr5225529pjw.90.1564765434013; Fri, 02 Aug 2019 10:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564765434; cv=none; d=google.com; s=arc-20160816; b=EX5W/eb+2q+VvO8+Q7IlY5DXhFnvj5EmkUXAIhZo9i0qVYl8zW69awd25SG6wRfkk+ vWsoG0qu+eL/sQiPax1336KMDNScp71MYqcgsm8f5Cy20SYKu7o0oP7LAFlyN9Y38UTp Wqtw3swC8AjHALszkQKxCb6kc06ncvuaELi+8nwKgjQZDX+Lj7D77oV4wbHV7I2gadIs MjoN6sNczVSYDnb7tWTtWFCBfVIyrBNLhKQeMuE0QEx/3KFL6ZgvH1P3KnhafnHiqJy5 iIRo8N7SCSEF6uawX77UJEMyO8CgrxcOOEu1Vv0+Hfbu1l6tg92hSNdIQdVIHloVApJR sM4A== 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=6YWUA99S4+zkCOz+rl5VJL3qZrQ7/X0vBKMtZ9e62mo=; b=YZUYNalEk2r1BI0Fwjm/1Gt6P5g0+nINHQOqhL0M+0AfMtCs+0YGNY4uxGB62I5/Eo IgsEyphIop+TjRMYYhZeBj3stMi+ynm3ux1/LZ4SGsboN0N2fgLm/TlsPILrBimUQIq5 RijRSUcRKjTRPk/ZpIVsCwVpzFmGrcpeErnSSJsY80GocD9albKa4gFasB7tmEVPZTRV PqMmd0+4dCoCmUHTCbMZvilSKX3E2YfXTQmIAh6srDMPy1KaYRj2dkSTL3gwpBt1WWfv A/FNuWd5NAdxoB3T4cZiER8R7gvfnzxBrr5zpHpqGqDRYWH+CYgdWZuJ+mZ7c29aQ1At Bo0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CnRJ5jPh; 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 m12si37488600plt.413.2019.08.02.10.03.38; Fri, 02 Aug 2019 10:03:54 -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=CnRJ5jPh; 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 S2405269AbfHBJof (ORCPT + 99 others); Fri, 2 Aug 2019 05:44:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:47904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405252AbfHBJoa (ORCPT ); Fri, 2 Aug 2019 05:44:30 -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 C13C120880; Fri, 2 Aug 2019 09:44:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564739070; bh=Ydzo/M4pzNaguWdIFX4/lUmoCl34IQOmszNk0yMUbmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CnRJ5jPhQqqWlKrQrR5hjnWwCrOgq7j0bvzQyh+VaUwjuIgyPnbS/o800TEVO/Ala IJFfai0i2QDrNrlTtt3qILRsstS3VWyJNhe/xoPvpxqOunHrjU7H+gcX6ABZFzZl1D CM49EqtEreUeLcFa7fv6dCcqHgbmifaxNMNeV5jM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emmanuel Grumbach , Luca Coelho Subject: [PATCH 4.9 086/223] iwlwifi: pcie: dont service an interrupt that was masked Date: Fri, 2 Aug 2019 11:35:11 +0200 Message-Id: <20190802092244.613286921@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092238.692035242@linuxfoundation.org> References: <20190802092238.692035242@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 @@ -1901,10 +1901,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) { @@ -1943,11 +1951,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) {