Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2484218rdb; Wed, 4 Oct 2023 02:38:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF99r/f+cmVIgCZjCUNIyUBDUoWsSDG2Zx16PdGIfLReYknIxwgl2hslnabNFIk1Sqq5kwL X-Received: by 2002:a05:6a00:24d5:b0:68c:6a77:4845 with SMTP id d21-20020a056a0024d500b0068c6a774845mr2218425pfv.12.1696412280372; Wed, 04 Oct 2023 02:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696412280; cv=none; d=google.com; s=arc-20160816; b=B21sZREHTobQ6guwCZu5ls2uT9oZjpBXdASCsjQNEmVAcCoLUQrjOgRZK6u11rDlEI OhQmJLYnY5VxuEZpegiAIXZT3CnKGkZ1S0e1bUZS/1mHxSq8FZ/ByvSw0bXZW5ThkPf6 1BcBWp88cHN3GDu1iOgVkKV9PkH8sd0m+8v9T7Jre4ovBD7ErwVS6fzbePeqiGKFDhnE WJOFspa7GW5RfXNngT6Y9weUmGr8yswmtH2MNHG0Tca4qZ5rf8D6bZo/kMniohS+L3Qj Uu9Ck4zx54nNd+L+rLLS/7oD7a/V3Zfs0KZUORMkEY61d8ezxbbUO5G7+uQHWeeCXgu5 +LLg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6OYTsY4cqmQoU0yXuS85wN4JYm04YUY+Jx3cB1fF5rc=; fh=Y2IfAqdjkYQAx7XZcGq/8JceY1atOOwfX771vvMvH7o=; b=tDfUZr/tkyuFZHPIctMX5xKHwAjzb22dG6ojhsZqw3FZwyP6VfrN57mB+khGTguG32 glWgR8caXxSm9jOpddUAYJD7CfF+XxZMXKVWcu1YmyVa2Rddt8ENzJXzkEyu83hrpYnY YDtUCoKI9U4QoN3ETY0dESqIhrdugs1foFc+YWfyKTO6n9Kmb+nlbaMl5w6/jS67C4QS QxKx1eiHl4kzg/CRocGt3p/TWF0rx6HsCrYa/WpholJwAprKxHtJnPTOPfyGaqK+8M4r wXf4nW0QFSYwxZcAjvJcN20Dy9337wJdOsoEOme+RDMD4Klkl3FqBvnUG10eaVpqqCDw YJww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PDn8snEe; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id z18-20020a056a001d9200b0068e3baee27esi3354395pfw.266.2023.10.04.02.38.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 02:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PDn8snEe; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 04BC2824633C; Wed, 4 Oct 2023 02:37:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242047AbjJDJhM (ORCPT + 53 others); Wed, 4 Oct 2023 05:37:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242046AbjJDJhH (ORCPT ); Wed, 4 Oct 2023 05:37:07 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CD1CE6 for ; Wed, 4 Oct 2023 02:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696412224; x=1727948224; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WFoP7IO7laD8OTBw8G180uv3S61BHByTz5OwF2se6sU=; b=PDn8snEeE0hbuuBE79L2379EW55/avwH7jiEnUPAJ/2dNl+j/uEmVsIm YK+zDHQv/I+U5BiSi5uKGAWEyOk6auCFLkMQR/snMg0N+BKoVM+jjRzZa ARqwZNs7T1eRnIKoAOxYs8ShIRPhHgEICzT7yZnrxAm4WZ1REgKU2cZ3i 6yTk0NBHlJZGNIi4b61f1i5IgOQTfIEU98nNNvBPC9+WDUJyIIEoPsMIZ /BDguLg6J3bT2foCVzQuq5k5CgvG59Wh5ByfVQ7X4mh2I2MXg4pJvLyu/ aOFzc6a/w4LVZ6/yN/f3oSlXXEOjEPQBo8hc1LpwOYeWfzdpfQB8aAkfK g==; X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="449611776" X-IronPort-AV: E=Sophos;i="6.03,199,1694761200"; d="scan'208";a="449611776" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2023 02:36:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="1082415166" X-IronPort-AV: E=Sophos;i="6.03,199,1694761200"; d="scan'208";a="1082415166" Received: from oferweis-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.222.21]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2023 02:36:57 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 06/15] wifi: iwlwifi: mvm: fix SB CFG check Date: Wed, 4 Oct 2023 12:36:25 +0300 Message-Id: <20231004123422.ab21c7d5e219.I4f9906ebc7ecf38fd276510a276280a9261c8f7f@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20231004093634.131303-1-gregory.greenman@intel.com> References: <20231004093634.131303-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 04 Oct 2023 02:37:54 -0700 (PDT) From: Johannes Berg We shouldn't check the 0x10 bit here, since the register holds different values (not just bit masks.). Check for the exact value where this is needed only. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h index 7bd4ce149e04..c1a94b01ce14 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h @@ -382,7 +382,7 @@ enum { #define PREG_PRPH_WPROT_22000 0xA04D00 #define SB_MODIFY_CFG_FLAG 0xA03088 -#define SB_CFG_RESIDES_IN_OTP_MASK 0x10 +#define SB_CFG_RESIDES_IN_ROM 0x80 #define SB_CPU_1_STATUS 0xA01E30 #define SB_CPU_2_STATUS 0xA01E34 #define UMAG_SB_CPU_1_STATUS 0xA038C0 diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 5c719636c9bd..d56c62b9c205 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -596,7 +596,7 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm) if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210) { sb_cfg = iwl_read_umac_prph(mvm->trans, SB_MODIFY_CFG_FLAG); /* if needed, we'll reset this on our way out later */ - mvm->pldr_sync = !(sb_cfg & SB_CFG_RESIDES_IN_OTP_MASK); + mvm->pldr_sync = sb_cfg == SB_CFG_RESIDES_IN_ROM; if (mvm->pldr_sync && iwl_mei_pldr_req()) return -EBUSY; } -- 2.38.1