Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp649354pxb; Tue, 2 Feb 2021 14:20:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0V/yysQn1oP4HODpSP43U2fZqp/IQkR7+NBuDR2yVZI4qSyIQE5R2tJrWY0vITDHRRjfk X-Received: by 2002:a05:6402:4ce:: with SMTP id n14mr206189edw.309.1612304408708; Tue, 02 Feb 2021 14:20:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612304408; cv=none; d=google.com; s=arc-20160816; b=si8Kj09HRYt+LpLmSuvNS+XYZGuBYSHSvEqRhRsWzi+W55M7zghtDfYf9Ktp8Hn8/s biVSVapXwu2UisN7ZP3djGG9UtaicgkdYvrAaeURcqDFYWC6C/apGpDbTyHv3H2LixNA Qe4Z2T7RmNgg/Bo2WkHdBpbI7VfTGxkR7FLKfTjzfgYqfDsyz3WGLOU73kvJ8TFdHlnM J5ZESQcbM+ckaNw5oD7KyGB7DaZ5WNINr+PTjcG6DsUHSGg5w6fLcUSvAjx/p/sOaj9h AyXBBXWUy9IuVUxE/4vh8RYy9cqxbADRmTyE8p/mF6d3RpkXXpMv4i0BzEd61X0A7c1V KJ9g== 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=JAyZyQtfPiZips3+bVNer0Bba50uvEqHcGAA5tBI2Kg=; b=IlUJPDQzDx5UvKfhALL6wdIbtEXBxlEficNbYbCZmWGhYIQ9laeuIEMG7SV2oJDPlk wdsln4MWGC69+l9VfrbGlZg6/7r/JmSF18bQjjp6UguGAopRRqNJ9Ms7pVgHaLCbvfF4 8jY1LEtNYmdGDpxXn8gjUc8JVRJObw/zxn0CmvCrMsmIySuGZNJ+1CGzfw3PT2OqTMj5 xUicCHFnFIGo3S6ljFBM7VOjvf389XVKS859AOJdzC4AKpTaBtMlt0pmhqdl+57nHFAc chVVNRz/dPzdPVymvMekgma8lbxLHZodU6O/YXT+DkYY83KOszPCp3QVoO+65hWu4mk3 PK+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UyYi2aRT; 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 e21si101098ejt.485.2021.02.02.14.19.39; Tue, 02 Feb 2021 14:20:08 -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=UyYi2aRT; 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 S233502AbhBBN6Z (ORCPT + 99 others); Tue, 2 Feb 2021 08:58:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:41122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232949AbhBBNv5 (ORCPT ); Tue, 2 Feb 2021 08:51:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7D77D64FBF; Tue, 2 Feb 2021 13:43:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273426; bh=65Oxn+TK77kWp5d9IRfWlbAgeM8/C+8gIiye31YIMkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UyYi2aRTKF+DwBgz2ipZSg8eZhfavbEd6bzEozYw0Xs2ctsZEVAOSnYMbXS045Kwu H+nOYdGUBi0Jxa1rLjrowKA1xnjt0snn1Fc1JLdlV8+Nq/N9FsoS4xg/Gze/Y4PT6K 06i7eem8dAIftSzW64N282DGqGZqTHJ5CaWlgueU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Luca Coelho , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 102/142] iwlwifi: pnvm: dont try to load after failures Date: Tue, 2 Feb 2021 14:37:45 +0100 Message-Id: <20210202133001.917363071@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@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: Johannes Berg [ Upstream commit 82a08d0cd7b503be426fb856a0fb73c9c976aae1 ] If loading the PNVM file failed on the first try during the interface up, the file is unlikely to show up later, and we already don't try to reload it if it changes, so just don't try loading it again and again. This also fixes some issues where we may try to load it at resume time, which may not be possible yet. Signed-off-by: Johannes Berg Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.5ac6828a0bbe.I7d308358b21d3c0c84b1086999dbc7267f86e219@changeid Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/fw/pnvm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c index ebd1a09a2fb8a..895a907acdf0f 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c @@ -232,7 +232,7 @@ int iwl_pnvm_load(struct iwl_trans *trans, if (!trans->sku_id[0] && !trans->sku_id[1] && !trans->sku_id[2]) return 0; - /* load from disk only if we haven't done it before */ + /* load from disk only if we haven't done it (or tried) before */ if (!trans->pnvm_loaded) { const struct firmware *pnvm; char pnvm_name[64]; @@ -253,6 +253,12 @@ int iwl_pnvm_load(struct iwl_trans *trans, if (ret) { IWL_DEBUG_FW(trans, "PNVM file %s not found %d\n", pnvm_name, ret); + /* + * Pretend we've loaded it - at least we've tried and + * couldn't load it at all, so there's no point in + * trying again over and over. + */ + trans->pnvm_loaded = true; } else { iwl_pnvm_parse(trans, pnvm->data, pnvm->size); -- 2.27.0