Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4179725pxb; Mon, 8 Feb 2021 09:45:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+I2RAkAaHuVpGvCgUACe6djFOwj1i5E/drdjL1+q4riyF4b8bmeH1ec3yodq2HWcq1tZI X-Received: by 2002:a05:6402:6c7:: with SMTP id n7mr18448843edy.289.1612806306589; Mon, 08 Feb 2021 09:45:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612806306; cv=none; d=google.com; s=arc-20160816; b=cjLkgODcBKKKI7naUTLcUQqRH3FqDVJ5ih5yBoRp6V8IPn71YxCRLlmsVFX9AAqVNd qRaQ93YiQoxoSaZzDU3ZyP3ZcpqS6nf6oHf0Irc2KeZguLR3nzw8GNGfCRm6/miZgIOd ExRRcw6Tmv7LC83KvAFjNIf8Cm20KcsOAwCa+VB0DBDwGd5coJUXV3NpUmSkIz+be1Cy y0ybu4y7YI7my5EM6iqOQ57Pws31juXJfCX1/4wZEfQBtWbYBRK12VPz6OJ0h3HviyDO +X8ygwQD2XtCiKfNSbIy3SOHN4Pf8sywo1vd/Or2JxWv4necQVKMfU9T2qLwFLx+rmzR WcYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IkPURNr13Dap9nfT3QvjT/cCmRGM1KIsoycAuwzF8fM=; b=T1XgKZAwxigQjfQI4pGNyjp7wyVPytafzkj3HFq+a02iFT7Scvx75Tkt05sRpfpcNo XHNIuZsdfAhPxZqWE3XRMFN2FpIyvczieOJMLBo1eXJ3nhJYSROdvzNhBktdwGodM5lB Se2ZSBcc5or9LgKHasz/2J/bMJB5hCBVxyPswu7h075h5quwIVRzx0gP0PbO+/neaNXV jSfG8bbbrubO5AyYyYfsod4UF+eRFaUUgN0KmGKQAyPF+7zWziIjA8pdRBUiyLg8qZXp /AQP/xpHJMXcyyFWI6scpX+8O6aP1zPtbYLi420TpDd4XfKDTftGqZ85U/QRbNwfNiTQ P00g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pk8dnY16; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rl24si10390712ejb.582.2021.02.08.09.44.41; Mon, 08 Feb 2021 09:45:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pk8dnY16; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233517AbhBHRlO (ORCPT + 99 others); Mon, 8 Feb 2021 12:41:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:58920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232439AbhBHPSV (ORCPT ); Mon, 8 Feb 2021 10:18:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7DA2E64EBD; Mon, 8 Feb 2021 15:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797138; bh=Rs2PfzWRnHFXSQd3qh3MTr43Mp/QqRruHckN2F0wIgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pk8dnY16pCKrnYz8pYwrF06eQSBSaZmsXhd+NTZrDsjvz6BYIxvlLdNzOI8GIX73m 2p9xuxwU4zV5oRPXUFHwd/VwOCJYSFoDF+iq4fvzh2ZDYqGWySgs1qD6iHDoBopZFz 6qp4j7psoF1KXSvzr3OcyCvAMeR/LpvtNSbk+Dos= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Coelho , Kalle Valo Subject: [PATCH 5.4 56/65] iwlwifi: mvm: dont send RFH_QUEUE_CONFIG_CMD with no queues Date: Mon, 8 Feb 2021 16:01:28 +0100 Message-Id: <20210208145812.389394956@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145810.230485165@linuxfoundation.org> References: <20210208145810.230485165@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luca Coelho commit 64f55156f7adedb1ac5bb9cdbcbc9ac05ff5a724 upstream. If we have only a single RX queue, such as when MSI-X is not available, we should not send the RFH_QUEUEU_CONFIG_CMD, because our only queue is the same as the command queue and will be configured as part of the context info. Our code was actually trying to send the command with 0 queues, which caused UMAC assert 0x1D04. Fix that by not sending the command when we have a single queue. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.c35eeb3299f8.I08f79a6ebe150a7d180b7005b24504bfdba6d8b5@changeid Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -134,7 +134,14 @@ static int iwl_configure_rxq(struct iwl_ .dataflags[0] = IWL_HCMD_DFL_NOCOPY, }; - /* Do not configure default queue, it is configured via context info */ + /* + * The default queue is configured via context info, so if we + * have a single queue, there's nothing to do here. + */ + if (mvm->trans->num_rx_queues == 1) + return 0; + + /* skip the default queue */ num_queues = mvm->trans->num_rx_queues - 1; size = struct_size(cmd, data, num_queues);