Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5456383pxu; Tue, 22 Dec 2020 18:35:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGaFQDSK/m/lLdggjEIPo2AOpFWE4YgLZSQSAYjnFf1Jdft+HhH8T1dASrYfi9+9Z+8kJZ X-Received: by 2002:aa7:db56:: with SMTP id n22mr23289314edt.4.1608690949251; Tue, 22 Dec 2020 18:35:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608690949; cv=none; d=google.com; s=arc-20160816; b=Giava99T1fwOBQACJiWssY9GMY3DGk/5dnjjrkPGtZ1Wvm3RF5nGdJCazrElv3Jm62 cVyO5s7qpp3NX8TCV7fxeCxGeb45VVHlnCqVsCQ+cXJVdHpEeqPTlXW1338+FJTumUbb LaFcMFaIGFomAvbVP7a3Oq/ms2l3mju9jhRn2GDVRG2sQ9n27XovO89BEX6/gNKx23ke IfViikJi8nLDDQoSPhb6ljMRJZOau+7yaACpsO9926Tbhh7MKCe/uQYu1XQ2QncJAc5n sxzYfbIMC3uDTlMRhgPdepb9haWuTVtValb4QLLR9k8hqFeup+onoadGf8fZPFO7/ia2 o0BQ== 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=k3hlZ+gffWZdqY6WY3W9z+6S4yXerQXxG192VKsBFeM=; b=EIJHV63wEpX8W6bJr+ww9WNxkr78GB3jM/+ccVIkc/YQff2zasKvxoyjyzvHPbz3i7 60ptzjAz8LEocI6hHEDee0o/joM4YIjV3FfVQ/s+IQg0C9Ckpj7n3zDPdG/iU++Bs4Oc Zch3Yp7+9tRcKGuapX+Ts74zg4U7pH/SNllY0P5t12XaSBP/7yAVE6wCmZm07yBSFsZI MPcpborc7sYwAMganuTx7Evgo3Ixg+xDFLSX8OGB3fJu5LIOw/63aQZhXP/IZ0+YgehM ZHsRucvIcUHqCNQzoZUfBFpOdY4qK40802WYna0cfkNxr5BCmdAJJ8AKLvkkhVtrLta9 tF+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G9ETVnSR; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb10si13139062edb.192.2020.12.22.18.35.27; Tue, 22 Dec 2020 18:35:49 -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=@kernel.org header.s=k20201202 header.b=G9ETVnSR; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730743AbgLWCfU (ORCPT + 99 others); Tue, 22 Dec 2020 21:35:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:54958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728649AbgLWCYm (ORCPT ); Tue, 22 Dec 2020 21:24:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1333622285; Wed, 23 Dec 2020 02:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690241; bh=pYqKZDBD/Z+Xi+SGmb6fikkE+l3hFSPgaMm2LW/Q7a0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G9ETVnSR1ZTk/0wbgjMgbaFulkbi8qrTx8J8XAv4ZQIMRWakGvDoLd5SMhJaGOQr7 4O7fH8rceuRXP4hUwVZKCcztdfYwda8UVOltZbzWxYbPuSoyDzp2Ag9Yb4bBUBYo+K QV/zvRyPwIstq+UGb6DxaIma3xqdrZ6dsHeubCLHvrJSKc3erYPjoEOvyN6ycSt/FR 86CZ5+HJiucx6GpisATetacdtbMViSknPmN3i3/JuTHaW72Uva3OkcvfxPulmC1oRl N58tJEPjhzhGTAAHA1+2aoRNbbM9xhJj9HWAk2LYiLnVndgmuwbuD+NWn16JI6DXlr zw0xT91/gsPBw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , Luca Coelho , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 55/66] iwlwifi: trans: consider firmware dead after errors Date: Tue, 22 Dec 2020 21:22:41 -0500 Message-Id: <20201223022253.2793452-55-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit 152fdc0f698896708f9d7889a4ba4da6944b74f7 ] If we get an error, no longer consider the firmware to be in IWL_TRANS_FW_ALIVE state. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.a9d01e79c1c7.Ib2deb076b392fb516a7230bac91d7ab8a9586d86@changeid Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index ecd5c1df811ca..7de7dac3260ce 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -1181,8 +1181,10 @@ static inline void iwl_trans_fw_error(struct iwl_trans *trans) return; /* prevent double restarts due to the same erroneous FW */ - if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status)) + if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status)) { iwl_op_mode_nic_error(trans->op_mode); + trans->state = IWL_TRANS_NO_FW; + } } /***************************************************** -- 2.27.0