Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3820434ybi; Mon, 29 Jul 2019 13:15:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvtlaqFynmzgwwVcht3V8R/Ytmd6Ao2VADuJO6st4LbNwRkWn7iGRfnvCtEqhFzNnqvay3 X-Received: by 2002:a63:f452:: with SMTP id p18mr80133203pgk.373.1564431353866; Mon, 29 Jul 2019 13:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564431353; cv=none; d=google.com; s=arc-20160816; b=ilzhAmI2Q+RqKnklTM7n29lD0CRJmVIk2UDzo4wW1Dq0LJZs9q1Fcz/fbUzBLTL39i wKbuGZH1tC0llstvCRjCjqfRJPa3RfQ6pQm2TbJXstgUsIKgb5Jia/PJ/Q2boQ80yNVz g/77p0dvZ6v7RuHv/Ur1zaUqgcqBIBPYwVpE7knGgIiyK7MrWnRjyDg4JfTJ0lENFPYA OibJYy8ARfv0s0F22zpG0w7Qdwo7iA7H4yhS0ok/76Y1vvxdb/XyvnAJWqkIIEzjuU9O j1nqr+HeGwF2O31/SCl/cxK8lY4g4cgyXC+wkO41R4fNAMCO3Q0pYIPc9JxSYc0i6cuf t1Dg== 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=CmMdoYzy9JUhFzmHIOQRsrAIqyB0fM9z9yUVoDKDis4=; b=Si3FPqBtCrNXTp0tDZxj1tA0NqJbcrcajGu6OhThVNwDV0kC8mgsy3C9es7YFkUGZM 22aAd+4GiVUIssED3X3/Y4x6v9lWGjrzt5ZOGX9N88+VH7msxc2tyzLUwEJ1sH9kTeWP +ljXPqIzTtmS7qDKFFFC7H35sYnhlXBCOiSJZJDmI5lN/Ayr9PQ9hZNphJSl49O6OzAY FFfscF7TIyiwU7Tv4SJO0WXSRtviRlKLnU2rlqUBjC79bK+sBOwUsP5bAu2H0R2Zoq/v u2zL9e2yDhsjJSaqflkxYM17dsXgd8WympQbrj8pNAV6PjH6BM8cHKk5WDMV78GC+oZN PAtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EYYqEQoC; 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 c23si26659070pfr.8.2019.07.29.13.15.39; Mon, 29 Jul 2019 13:15:53 -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=EYYqEQoC; 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 S2388422AbfG2TaY (ORCPT + 99 others); Mon, 29 Jul 2019 15:30:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:43124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388411AbfG2TaW (ORCPT ); Mon, 29 Jul 2019 15:30:22 -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 5268E2070B; Mon, 29 Jul 2019 19:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428621; bh=ezO2e8FB2y1vTPEbylxFU1S4TdWHKbUYDyvs7/+dJqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYYqEQoCE7/JJxuqMgoFTOiN1Z3OkIzA8JCAnR6h3fx3pWNmU7edCWIVLj1dAS4Mv X7x3QL6fLffPciORH2uQMQeqVtAwNsHF2yFRsFP87TFrHtpfGTlIQY6B7mjyNLStxS YF5o/3xvs8lU5JiDerH/0yVHBiLQ/C2QOQ8Uv5j4= 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.14 133/293] iwlwifi: pcie: dont service an interrupt that was masked Date: Mon, 29 Jul 2019 21:20:24 +0200 Message-Id: <20190729190834.734096972@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 @@ -1956,10 +1956,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) { @@ -1998,11 +2006,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) {