Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2242028pxm; Fri, 4 Mar 2022 12:09:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzq0S7U89pi0IV2Rvf8N5cyLlEgJ32ajUqh27pyBbTV4lfs1pby8Sz15hvE/t9Bm4SHsDLg X-Received: by 2002:a05:6a00:9a9:b0:4ca:c2f1:c685 with SMTP id u41-20020a056a0009a900b004cac2f1c685mr218331pfg.12.1646424555250; Fri, 04 Mar 2022 12:09:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646424555; cv=none; d=google.com; s=arc-20160816; b=zFg9PAHAr2KqGF/I+gBf/T4Reo2Xl1NNLkg4Ckm1Lqd7Or7ImvC3T+K+c+ShJYVgRz C/00oMY+/ZP9L4OED5oHbLWWkvANHwjgTxQsW/ov70bhPiGtBC0nBhgka8IDr3rB9pSL iDpQUg1kUT/51/YJu81w+X5xvvV10L6phKvgkK+A6btJbhvs+0IR2IcnzDIbWjy6EMVk NcoG7AE+5JFmIfOrOq2GX/E0udTjY7m+3NB0zDEuHKyFop1ta4pSK64p+pnY7dU5h0HA e3bkCCwR1fGKalH8xdOH9SiPE7QdmP9OIPFBqY9chQgWU5c5vxEq23NFWaKUAKYV1//u yd9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=Vj9+WcOS+V2YQ9SL1IL/gGqP6cNHr68WpphEgEtgu8g=; b=m00EPNB4xi22qmA+BHGQVnrvgPcc31D/9FCoKGZ85b4xotEDsivQCyXLRcK6BsZISD CtHV9r9YAaLbpMj70iMyA20voW1PlGH/i5MhHvd6V6ZetfZGDBAB0pvK05SS/Aj8mnqK p5LHoHlKTs/9x7ORDDGwE2PS3eQiEnXRtNAkkk09AKA0EdflivF1IbQbO4gSXnWT8R36 Xoz99QFJ3N1tIU6XoWaJ5QjVLhf6DzBsTAOHB6flgSIXNgyHA7gmFAbWkAalCpdz9ZkH p8QN/o85ErB3buTuxLAElOlhMDqkqCRgceCRsoVJje10WEqdsKR+g0DtYJ/uhtdjJnEb covg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f5-20020a17090a654500b001bd14e01f5asi431708pjs.72.2022.03.04.12.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:09:15 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7CD12D4469; Fri, 4 Mar 2022 11:27:35 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239318AbiCDLWa (ORCPT + 72 others); Fri, 4 Mar 2022 06:22:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239289AbiCDLW2 (ORCPT ); Fri, 4 Mar 2022 06:22:28 -0500 Received: from farmhouse.coelho.fi (paleale.coelho.fi [176.9.41.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 841111B0BE1 for ; Fri, 4 Mar 2022 03:21:41 -0800 (PST) Received: from 91-156-4-241.elisa-laajakaista.fi ([91.156.4.241] helo=kveik.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nQ60A-000QSW-QI; Fri, 04 Mar 2022 13:21:40 +0200 From: Luca Coelho To: kvalo@kernel.org Cc: luca@coelho.fi, linux-wireless@vger.kernel.org Date: Fri, 4 Mar 2022 13:21:21 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304112129.219513-1-luca@coelho.fi> References: <20220304112129.219513-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Subject: [PATCH 05/13] iwlwifi: yoyo: disable IMR DRAM region if IMR is disabled Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Mukesh Sisodiya Disable IMR region if it is enabled in the TLVs, but disabled at runtime by the FW. Signed-off-by: Mukesh Sisodiya Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index a178b83ee8a2..f4de8250696f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -124,6 +124,7 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait, u32 lmac_error_event_table, umac_error_table; u32 version = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP, UCODE_ALIVE_NTFY, 0); + u32 i; if (version == 6) { struct iwl_alive_ntf_v6 *palive; @@ -146,6 +147,28 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait, mvm->trans->dbg.imr_data.imr_enable, mvm->trans->dbg.imr_data.imr_size, le64_to_cpu(mvm->trans->dbg.imr_data.imr_base_addr)); + + if (!mvm->trans->dbg.imr_data.imr_enable) { + for (i = 0; i < ARRAY_SIZE(mvm->trans->dbg.active_regions); i++) { + struct iwl_ucode_tlv *reg_tlv; + struct iwl_fw_ini_region_tlv *reg; + + reg_tlv = mvm->trans->dbg.active_regions[i]; + if (!reg_tlv) + continue; + + reg = (void *)reg_tlv->data; + /* + * We have only one DRAM IMR region, so we + * can break as soon as we find the first + * one. + */ + if (reg->type == IWL_FW_INI_REGION_DRAM_IMR) { + mvm->trans->dbg.unsupported_region_msk |= BIT(i); + break; + } + } + } } if (version >= 5) { -- 2.35.1