Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9936773ybi; Wed, 24 Jul 2019 12:38:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIpuOsa7GvEP0u+UGcubtGvNANPgUCsyHwHKK6slHzn7XzDBx1aKJ5JeG4C47oM/rG/KWH X-Received: by 2002:a17:902:e40f:: with SMTP id ci15mr87615293plb.103.1563997139285; Wed, 24 Jul 2019 12:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563997139; cv=none; d=google.com; s=arc-20160816; b=RhusLMx9HsXjfrcSTTn/DgsrVaZ9q+qZ+RsBk0oyBmFfYBaAic6tGARA/DlQoOGawG YKEsz6RpUiZaaRye9qHjbC4c5RRVMQFyUuHoLUS5iXfEq6ReeVTAH/xfmPRyxENtIokn WxQ2lsbQElLjqIwHCAqfYNnSm19GDkqgrH+WbM+D6TYzdaBootge7topEeGC47e8gwjH t5BNb4VWem4BMdIYoaITKe77OszxZddejIPaHh77hbIdz2+nAuEeWf5npbCG8wBUx3dZ sYNkzMHYwqqOTyNzcqTXDkAWoBViTS5M1MgfYlPDgNj4yb6JoI7aSwbhWX1wIMIMUB+B ziHA== 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=6K6ImWts+32CBwLle1g4obiGedCCSukUt3zp+sqjV+U=; b=A4xNJNbf9DYfYVfpuWHALgZGi6zznNQKFrTkYDbFyzaCdMJBdL3qK7Re+YzQfwIKvi 9HL0jxmGezRMAbKOsjafdOdLcXwCpRcx3LMvo606YlU+a7fe5sMAm2HL42WOQeVncBoV /bNLLKDaylG3jOaFDpIvFbU/Z42J0Vb1S+BAqNJ4yclrZvIzGWTg6nHYDIpuxD8ZnnJ/ nbix8WLSbSEzC2mMpBGEcMA9t74fuX/AbsUCPf+XAgbnL0vIxSh5dA+gcZoSVJktImiR AzY+3+adYQSHFHE8EuDrfu79fKv8zwcHWAE34M6krytQW7wDrkMbGmv4j47ECfu02rDO JvMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="EANvVDM/"; 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 j1si17795032pfa.91.2019.07.24.12.38.44; Wed, 24 Jul 2019 12:38:59 -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="EANvVDM/"; 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 S2389469AbfGXTha (ORCPT + 99 others); Wed, 24 Jul 2019 15:37:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:37602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389050AbfGXTh0 (ORCPT ); Wed, 24 Jul 2019 15:37:26 -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 4FF6E214AF; Wed, 24 Jul 2019 19:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997045; bh=VxdikZ9i7vR1FMjtOTnb3t5AZ9fGaTGau7hEAMZ9wwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EANvVDM/QzGoI3L8xobex4JdtwZmeqRP3UlNuTf5tkzyC515HqqW2+03701HIK9aX UZ2G9hFBdeqNGox5/v/KKqsau7t1tfZ/tSR1ZdjZHFDSRxeAdp0SvZhwGprG3GlblU m9d0By/lcboGvoBzNmRZuVRpLFCyiuaNY9QkHT48= 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 296/413] iwlwifi: pcie: fix ALIVE interrupt handling for gen2 devices w/o MSI-X Date: Wed, 24 Jul 2019 21:19:47 +0200 Message-Id: <20190724191757.264601238@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 ec46ae30245ecb41d73f8254613db07c653fb498 upstream. We added code to restock the buffer upon ALIVE interrupt when MSI-X is disabled. This was added as part of the context info code. This code was added only if the ISR debug level is set which is very unlikely to be related. Move this code to run even when the ISR debug level is not set. Note that gen2 devices work with MSI-X in most cases so that this path is seldom used. 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 | 34 ++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c @@ -1827,25 +1827,23 @@ irqreturn_t iwl_pcie_irq_handler(int irq goto out; } - if (iwl_have_debug_level(IWL_DL_ISR)) { - /* NIC fires this, but we don't use it, redundant with WAKEUP */ - if (inta & CSR_INT_BIT_SCD) { - IWL_DEBUG_ISR(trans, - "Scheduler finished to transmit the frame/frames.\n"); - isr_stats->sch++; - } + /* NIC fires this, but we don't use it, redundant with WAKEUP */ + if (inta & CSR_INT_BIT_SCD) { + IWL_DEBUG_ISR(trans, + "Scheduler finished to transmit the frame/frames.\n"); + isr_stats->sch++; + } - /* Alive notification via Rx interrupt will do the real work */ - if (inta & CSR_INT_BIT_ALIVE) { - IWL_DEBUG_ISR(trans, "Alive interrupt\n"); - isr_stats->alive++; - if (trans->cfg->gen2) { - /* - * We can restock, since firmware configured - * the RFH - */ - iwl_pcie_rxmq_restock(trans, trans_pcie->rxq); - } + /* Alive notification via Rx interrupt will do the real work */ + if (inta & CSR_INT_BIT_ALIVE) { + IWL_DEBUG_ISR(trans, "Alive interrupt\n"); + isr_stats->alive++; + if (trans->cfg->gen2) { + /* + * We can restock, since firmware configured + * the RFH + */ + iwl_pcie_rxmq_restock(trans, trans_pcie->rxq); } }