From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCB8D1DA2F8; Tue, 3 Sep 2024 20:44:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725396273; cv=none; b=GnjtduYAXWTA071rIizd02W6IuHCu3MAItNmxPiMnaaiEdUgFGajXGpv8cKhyni4Z7nTFariEb0k/0L3J1/V5YwTbAmG+YLAxhqWrpoKtt6ggE9JJI96z3aMupPlkqO0XRmSisyHoqhPQPDNqEkRqgxqpJFRRnw5zaZ1HQ/HUZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725396273; c=relaxed/simple; bh=2W1hREwtL+G5EHCVbEf8rmyoBqr+dQSzXK7qGaMF1HM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oo1jGerWVuvpFMJnEQpP9zyC+I2s8lAVgH+R5dSJSa0737nFQwhL+B6AVc4V4GDGM38PAKCI4a9EwfSoFYcUGzZsQUXxZFUkRU5+ruhKNv/DtMA1xKYaO3cJ8rOd1xRiNPSk/VLL1UtPCWGh6psah/AF/NeTpvMCYbRHX4jKhpY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pb9oN8wp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pb9oN8wp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D87EC4CEC4; Tue, 3 Sep 2024 20:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725396272; bh=2W1hREwtL+G5EHCVbEf8rmyoBqr+dQSzXK7qGaMF1HM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pb9oN8wpUlL+SlIcQntQAhqB+HGe6UcJ8i96g3zJLp09OyViaYLCULHrWUxfwCIAS tq0bn72buNSZjqErm2opT+wlrl5/yZXqgy2stN/cxj9DyaY0Rfi+VrKZd7c9uL75BT hjKI7UcWidW8sNqnxtKbCpGWg1EREhrdhmhIlUEIzhDwzQbXGfeHOAAcugthz/A82l x9BGEfPicn20IdU5kdU0wN1DIVa6eIMcuYqa/BdB7NBnV67MOwjkf/JglHzzlMnwOP eygJ4fciC+qy9asO9ZyWYxxy0rHVvmboivcJ0GSpameYEHpUgQxF4Zdj4bbIvb6ssJ EIiv21q0fPrmg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Emmanuel Grumbach , Miri Korenblit , Johannes Berg , Sasha Levin , kvalo@kernel.org, gregory.greenman@intel.com, shaul.triebitz@intel.com, benjamin.berg@intel.com, ilan.peer@intel.com, pagadala.yesu.anjaneyulu@intel.com, shahar.s.matityahu@intel.com, linux-wireless@vger.kernel.org Subject: [PATCH AUTOSEL 6.6 17/20] wifi: iwlwifi: mvm: pause TCM when the firmware is stopped Date: Tue, 3 Sep 2024 15:23:49 -0400 Message-ID: <20240903192425.1107562-17-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903192425.1107562-1-sashal@kernel.org> References: <20240903192425.1107562-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.48 Content-Transfer-Encoding: 8bit From: Emmanuel Grumbach [ Upstream commit 0668ebc8c2282ca1e7eb96092a347baefffb5fe7 ] Not doing so will make us send a host command to the transport while the firmware is not alive, which will trigger a WARNING. bad state = 0 WARNING: CPU: 2 PID: 17434 at drivers/net/wireless/intel/iwlwifi/iwl-trans.c:115 iwl_trans_send_cmd+0x1cb/0x1e0 [iwlwifi] RIP: 0010:iwl_trans_send_cmd+0x1cb/0x1e0 [iwlwifi] Call Trace: iwl_mvm_send_cmd+0x40/0xc0 [iwlmvm] iwl_mvm_config_scan+0x198/0x260 [iwlmvm] iwl_mvm_recalc_tcm+0x730/0x11d0 [iwlmvm] iwl_mvm_tcm_work+0x1d/0x30 [iwlmvm] process_one_work+0x29e/0x640 worker_thread+0x2df/0x690 ? rescuer_thread+0x540/0x540 kthread+0x192/0x1e0 ? set_kthread_struct+0x90/0x90 ret_from_fork+0x22/0x30 Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20240825191257.5abe71ca1b6b.I97a968cb8be1f24f94652d9b110ecbf6af73f89e@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 5336a4afde4d2..f105005f49fc7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -1424,6 +1424,8 @@ void iwl_mvm_stop_device(struct iwl_mvm *mvm) clear_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status); + iwl_mvm_pause_tcm(mvm, false); + iwl_fw_dbg_stop_sync(&mvm->fwrt); iwl_trans_stop_device(mvm->trans); iwl_free_fw_paging(&mvm->fwrt); -- 2.43.0