Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp509971ybl; Mon, 2 Dec 2019 14:12:36 -0800 (PST) X-Google-Smtp-Source: APXvYqyOMqNwo/Pt/RVmNTx7SPH2ag2T/dWZgbyysLbxvbWE/IMEs0VeQxMJ5ncrM7XScmwXlgRh X-Received: by 2002:a50:9b0b:: with SMTP id o11mr1708788edi.78.1575324755783; Mon, 02 Dec 2019 14:12:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575324755; cv=none; d=google.com; s=arc-20160816; b=P+BjtPtthPmHDUH7K8P8yQbRKTdefbEAJ1gN315Q4Ma/quMd8q8gFx63xIGfjgTbIm jCXUvfpkVEIf84iV7uT0uozycXSAzV4WcEm3vsqx5JgeNjCFJqQQFKYGwPBJO3OHffFa SFwOSXA9g4cpTcmfz4YvROkzrddY46yeASg1lPs4RthGWTolRcd1HKYkz6da9dswTsTP W5siOKTO0b6wHhUoHrq8fqusOO3m/16ExblDYSCntyr5Hl/Uo1KZCpzhHRTUi354RVXf stYBRSCYWIyPFnixzx3lVsEdwZqXQE2+W+Kg0ccKYW3G7MNTBzqqDofb1XTPzjy8Ix/K Y2DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Z4vopIV4lOBMiryk+mT2ylIQ8v1PtPi/+fQqo+Ka+EM=; b=XXOI8dVjq7riN1u7XDp2tZ+mJyqdIJ58V4+OxhyfE8yj16kfqKTy6aMMn+Xo5nwkuo 6O9waurci08ltOiKs5+j+nq0FX1vkxBSd6IjHvYIpw1kK+JwpV3DDWpZtGEHYkAilreJ 3nRPw44IHLyhzdGq20h7Hksmf7hdhh8pes1MWhtQHsxsWejutFO1KhPiIsBMzzw17knj wvA4FX+e2VHVbMb3RXleW09sFnY9mAV9DG28OlV+VCFnHnNovNDjlTo3AVzXhHxS06Zj ZlAbWwp4E6STBhsY1X5R54GpaIGugEtm6rkdGQJ2n1wspxQlBDb2Rq/fHxJ5ADuw1Vrl INsA== 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 gx15si710168ejb.111.2019.12.02.14.12.02; Mon, 02 Dec 2019 14:12:35 -0800 (PST) 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 S1725899AbfLBWJ0 (ORCPT + 99 others); Mon, 2 Dec 2019 17:09:26 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:39234 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725834AbfLBWJ0 (ORCPT ); Mon, 2 Dec 2019 17:09:26 -0500 Received: from localhost (DEPARTMENT-OF-ALCHEMY.MIT.EDU [18.9.64.20]) (authenticated bits=0) (User authenticated as andersk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id xB2M9Kfn014211; Mon, 2 Dec 2019 17:09:20 -0500 Date: Mon, 2 Dec 2019 17:09:20 -0500 (EST) From: Anders Kaseorg To: Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless cc: Kalle Valo , linux-wireless@vger.kernel.org Subject: [PATCH v1.2] Revert "iwlwifi: assign directly to iwl_trans->cfg in QuZ detection" In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21.999 (DEB 260 2018-02-26) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This reverts commit 968dcfb4905245dc64d65312c0d17692fa087b99. Both that commit and commit 809805a820c6445f7a701ded24fdc6bbc841d1e4 attempted to fix the same bug (dead assignments to the local variable cfg), but they did so in incompatible ways. When they were both merged, independently of each other, the combination actually caused the bug to reappear, leading to a firmware crash on boot for some cards. https://bugzilla.kernel.org/show_bug.cgi?id=205719 Signed-off-by: Anders Kaseorg --- [Nope it was more than just format=flowed damage. This one should be better for real.] drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 040cec17d3ad..b0b7eca1754e 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1109,22 +1109,22 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) cfg = &iwl9560_2ac_160_cfg_qu_c0_jf_b0; } /* same thing for QuZ... */ if (iwl_trans->hw_rev == CSR_HW_REV_TYPE_QUZ) { - if (iwl_trans->cfg == &iwl_ax101_cfg_qu_hr) - iwl_trans->cfg = &iwl_ax101_cfg_quz_hr; - else if (iwl_trans->cfg == &iwl_ax201_cfg_qu_hr) - iwl_trans->cfg = &iwl_ax201_cfg_quz_hr; - else if (iwl_trans->cfg == &iwl9461_2ac_cfg_qu_b0_jf_b0) - iwl_trans->cfg = &iwl9461_2ac_cfg_quz_a0_jf_b0_soc; - else if (iwl_trans->cfg == &iwl9462_2ac_cfg_qu_b0_jf_b0) - iwl_trans->cfg = &iwl9462_2ac_cfg_quz_a0_jf_b0_soc; - else if (iwl_trans->cfg == &iwl9560_2ac_cfg_qu_b0_jf_b0) - iwl_trans->cfg = &iwl9560_2ac_cfg_quz_a0_jf_b0_soc; - else if (iwl_trans->cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0) - iwl_trans->cfg = &iwl9560_2ac_160_cfg_quz_a0_jf_b0_soc; + if (cfg == &iwl_ax101_cfg_qu_hr) + cfg = &iwl_ax101_cfg_quz_hr; + else if (cfg == &iwl_ax201_cfg_qu_hr) + cfg = &iwl_ax201_cfg_quz_hr; + else if (cfg == &iwl9461_2ac_cfg_qu_b0_jf_b0) + cfg = &iwl9461_2ac_cfg_quz_a0_jf_b0_soc; + else if (cfg == &iwl9462_2ac_cfg_qu_b0_jf_b0) + cfg = &iwl9462_2ac_cfg_quz_a0_jf_b0_soc; + else if (cfg == &iwl9560_2ac_cfg_qu_b0_jf_b0) + cfg = &iwl9560_2ac_cfg_quz_a0_jf_b0_soc; + else if (cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0) + cfg = &iwl9560_2ac_160_cfg_quz_a0_jf_b0_soc; } #endif /* now set the real cfg we decided to use */ iwl_trans->cfg = cfg; -- 2.24.0