Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp234142ybb; Fri, 3 Apr 2020 01:31:41 -0700 (PDT) X-Google-Smtp-Source: APiQypL7yqq348Yx4o6MfWzwFyU9dgl+Q9nXOXAnpDaziog+o2TbAFXk5X7mfvO0ZTl21+rUmVnF X-Received: by 2002:a4a:aece:: with SMTP id v14mr5731299oon.48.1585902701517; Fri, 03 Apr 2020 01:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585902701; cv=none; d=google.com; s=arc-20160816; b=zs6UuQH6sKWMczvtZfuEWSU0grxUq8RPjiHyLCBRBtZ3dyCp6P9JoAIfuSgvCPFJq4 /Kvepa2nAS89/Gp3fhyKWYdvp6JFDhRf4oXUmxPFcFvcx+xrmCHMA+BVnluYbHZUwgtC eTeiFI3PX7j2mcb7KI4R61sEncsfKEqLEWF5I5ovIoYiias0zRhq/mvqzHo1XpdVbI+0 GT2cCRbd2aHX+yIwM7VmHscqxbtweI7kvRFbeW/NFueE6uqlUHPG/X81siLK/PP7Ofy1 QGleYF0KcqXJ6tEatieRGr3kdiMBXvZaDodjYaE7Gaky25hJv2lUs2kW19vzOjIxPdH2 5wOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=jgMl7e69csiar1qOdx0Nj28ulPvQ3s/HFDu7ftTMjqo=; b=xCDFOFUuJHp/BT4SrddymbGXLDk0vlQeqd+01knP++EJLuNij5Q731U+A4oV1uDbFn jPzUP9RgBldW8dJk78kNgX8+riyNVqD4SbVYjklrI2dw7nx+zxNNBRfF/g4zJBNIbeJn B2sw6GgRu7NRF+00swzKYA6tGMFfJdQO9CRjGpQN7uBzvWrjBwZEyFSEAc+tV+GHpd7c 7i+ZlpWcnx9RftLPzw8JvkhZZFtlPoI63bWu+LnMRoqernRwhwAdGGhArN6WKUvlgsFk xACWa8qXr8JGsLoJ/kOlDGiC4N5BE5/95p/rh+zxTDEhxCuL/QHEH2docXp1xu7QdRNA 9xlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 m126si3523068oig.177.2020.04.03.01.31.30; Fri, 03 Apr 2020 01:31:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390550AbgDCIaK (ORCPT + 99 others); Fri, 3 Apr 2020 04:30:10 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:45468 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390545AbgDCIaJ (ORCPT ); Fri, 3 Apr 2020 04:30:09 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jKHiK-0008yu-0I; Fri, 03 Apr 2020 11:30:08 +0300 From: Luca Coelho To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org Date: Fri, 3 Apr 2020 11:29:53 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200403082955.1126339-1-luca@coelho.fi> References: <20200403082955.1126339-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.4 Subject: [PATCH v5.7 6/8] iwlwifi: msix: limit max RX queues for 9000 family Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Mordechay Goodstein There is an issue in the HW DMA engine in the 9000 family of devices when more than 6 RX queues are used. The issue is that the FW may hang when IWL_MVM_RXQ_NSSN_SYNC notifications are sent. Fix this by limiting the number of RX queues to 6 in the 9000 family of devices. Cc: stable@vger.kernel.org Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index bba527b339b5..ff5f6b67334a 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -316,6 +316,7 @@ static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r) #define IWL_MGMT_TID 15 #define IWL_FRAME_LIMIT 64 #define IWL_MAX_RX_HW_QUEUES 16 +#define IWL_9000_MAX_RX_HW_QUEUES 6 /** * enum iwl_wowlan_status - WoWLAN image/device status diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index e4cbd8daa7c6..e291c60024c2 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -1625,11 +1625,15 @@ iwl_pcie_set_interrupt_capa(struct pci_dev *pdev, struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); int max_irqs, num_irqs, i, ret; u16 pci_cmd; + u32 max_rx_queues = IWL_MAX_RX_HW_QUEUES; if (!cfg_trans->mq_rx_supported) goto enable_msi; - max_irqs = min_t(u32, num_online_cpus() + 2, IWL_MAX_RX_HW_QUEUES); + if (cfg_trans->device_family <= IWL_DEVICE_FAMILY_9000) + max_rx_queues = IWL_9000_MAX_RX_HW_QUEUES; + + max_irqs = min_t(u32, num_online_cpus() + 2, max_rx_queues); for (i = 0; i < max_irqs; i++) trans_pcie->msix_entries[i].entry = i; -- 2.25.1