Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1343257rdb; Wed, 20 Sep 2023 06:47:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxbH3wShte4OtpEi1klEBaC+PCf7iqoy6kn0ZZscVf948Ndd17bOYjpzaCYHfdzcyrIpXi X-Received: by 2002:a05:6830:18db:b0:6c0:a98f:56e0 with SMTP id v27-20020a05683018db00b006c0a98f56e0mr2122749ote.38.1695217621991; Wed, 20 Sep 2023 06:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695217621; cv=none; d=google.com; s=arc-20160816; b=jjqaFATO6VhR2strP14MA98kZttQTb0hDtu5TL8P/rOHe6FLuu3yrFob3wiKTu3K/+ vbF7G27StnoiOWx/eO89iGdi5sQCvqVJ+bPgtnwbYCfYoxwk9hnnGH1FQ2rU0JexgMhb Nqmgkhleus/ne2mjWsBn96QS2h4QRP4shCR9lIVBJnIbTEEPkilSRe1VH39USU5mwOux 4uuwl5mKTvdpM+5mXLvqAvsdqqedKA8vPYRpFOxyj3ppDwOGa0icSpTOlPlXNMptHwZM uAWssGa4JENPnX6qxsRvwUdu8OKv8DqaU2NylQuJ55Hf5a3Uawyxwg1rjSMXWX/VMLJl 6xBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=S7RfZs5zSdY2DeZH+uQzHUC2uPAiIOUX8T5kzhNPUCM=; fh=pFUMRLcs2CxJLfynOFPNNsxKPxj2wYRvMQW6PkoiSbA=; b=xH4SDyd+LIlrnLrs+mRbApt7s7MBkFi2EiHHP9Qw/tcZtLqrIwmcz4LIYiR9sMWuR/ /cmKA5I/RP6cdQLS0vXm7PWGcMIfHaqWNbFtobFZJhtYdQKK6IVljl23HeN6XtTN+sRW g8MMeGv8n4gMx8KaXwxL7pWesPP2DI2g+e2w/AhokjI1FZCpdCEkWdJICnKPk2hG4Y7Z DaH3Gs/PaI0x4m15enVvgCmCBmjaE0mzOO2XhK18N5gCMpuneeSr2Ey2o8stWdJX3yDT 628bF5rqw+9DLCRRxBFp9XQblkAUvI1shZTun2FU90LYSvtKynFMJ1fkM0giuf4ewUnu 7kfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K50G4oOU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w190-20020a6382c7000000b005694b757228si3519683pgd.688.2023.09.20.06.47.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 06:47:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K50G4oOU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A500E80E9EAB; Wed, 20 Sep 2023 06:37:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234864AbjITNhp (ORCPT + 56 others); Wed, 20 Sep 2023 09:37:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234946AbjITNho (ORCPT ); Wed, 20 Sep 2023 09:37:44 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8381CD8 for ; Wed, 20 Sep 2023 06:37:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28081C433C8; Wed, 20 Sep 2023 13:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695217058; bh=veIfcWlWTsrY0AmMLrZOqSmINoFBrTlbDMbu88kTSq4=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=K50G4oOUnJw7XxXV7HiR0ddeIffMHY/xsM8j26rZRZUu/HEGiMw63MkkTwqPK0agU hRmINIMwtg5UbIhIVH06+oS32nUMCwRGzz8slsDr9czVFTOnqCofkRAZFzYxQ34ocR bUzq4PkYr3FRhkpOtuhufUrypFOxRnjwx/OkeCAl9n+NAX+idN2k52ALYZELzUs1Am hla+aMXvrq4qwd9MRU3yQf+QOPAWsQXtOb+mVWZjtlxI/hCvgce1vCr9pWWYQDsWuR 09WE3CvVHMoyXII+PH1fRcyrXIO1H7VqoOtBuPeXmJRsf6+vvCzug+N3PSaoGpMGx9 5fdG4zTWc/Ivg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: ath12k: change to initialize recovery variables earlier in ath12k_core_reset() From: Kalle Valo In-Reply-To: <20230830060850.18881-1-quic_wgong@quicinc.com> References: <20230830060850.18881-1-quic_wgong@quicinc.com> To: Wen Gong Cc: , , User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169521705525.1118199.1914505460908896362.kvalo@kernel.org> Date: Wed, 20 Sep 2023 13:37:36 +0000 (UTC) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 20 Sep 2023 06:37:48 -0700 (PDT) Wen Gong wrote: > Sometimes device recovery fail with this operation. > Run test command for many times: > echo assert > /sys/kernel/debug/ath12k/wcn7850\ hw2.0_0000\:03\:00.0/simulate_fw_crash > > While recovery start, ath12k_core_post_reconfigure_recovery() will > call ieee80211_restart_hw(), and the restart_work which queued by > ieee80211_restart_hw() is running in another thread, it will call > into ath12k_mac_op_start() and ath12k_mac_wait_reconfigure(), and > the variables ab->recovery_start_count and ab->recovery_start is used > in ath12k_mac_wait_reconfigure(), so ath12k need to initialize the > variables before queue the restart_work, otherwise ath12k_mac_wait_reconfigure() > maybe use the un-initialized variables. Change to initialize the 2 > variables earlier and then recovery process become correct. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 > > Signed-off-by: Wen Gong > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 41e7a399aea1 wifi: ath12k: change to initialize recovery variables earlier in ath12k_core_reset() -- https://patchwork.kernel.org/project/linux-wireless/patch/20230830060850.18881-1-quic_wgong@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches