Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp4078811pxp; Wed, 23 Mar 2022 10:52:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGHfeORzagAGEr81QmiOvjEml2H9tfd8j3P6ynCrQ3SqCkC5HS9+j5xDolk6U8azPFrH+H X-Received: by 2002:a05:6a00:2392:b0:4fa:dcd2:5bc1 with SMTP id f18-20020a056a00239200b004fadcd25bc1mr938307pfc.8.1648057969157; Wed, 23 Mar 2022 10:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648057969; cv=none; d=google.com; s=arc-20160816; b=G7bvVACIqilyw9VfmdyU0iERe/3EdcBnaMt2LC7O4OX8+NWB9vsd6wRzQzfr2rQjN+ d46tuPrqKPiD+3YlMEOnQz51Uy57NYjM6nGXpG3DQn65k5gx9dDeaStjQdaenDfu1KBa L3Rx5U8SUmUUil42XWFBPpCu7/buVrY5SkDDaes8zwNUMw2+9B6lhlOAkYZ7dgpMkvgZ YdybGe+P8qNh9zHhZgszRel2k/jSY0WLD4aO9M352FmMTtinKZv1zCAPj6DyU1VfGNsb xYEp5KLGgt3Cvd+QydABMBhxYZ4Mkp014wnoppMSuSyhUBfSvdfrjlLtm0dbQETi8hMH TmFw== 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=osHDRBUJH/lBSbkKEZFbZa5lop/J+iXfhZL9wK69ZE8=; b=dVY8P5mMl5171Pa0ii+ZuFN/Eyz0qAfL9kDVaBBJUUf0/LGCkZPD3GJydjtOi8ZIT8 MLroXI6myNgCqwdRrFmtmBLhWLSuSF+SrQXZ2Hn5dS9Yeu5Vps/ll3kyjwp9KjWyiiXR 8UyCvbjYyZiYMMQm6vG15utQDUbdria4MkVUVChI4kGkGhX6JJs61FYwmy7/fjf+hgxH KPZVWMPtSpV2FAurmSFSLWca8cPTc+ReRMDm1qlGZk+p2zhB2x7TyNT+olVOmm8q+8SW f05/WTAkCWm+ROK9J89xEX7ql56kzpzAVg+QnpvUvsHgbwrFFtYoe0ghM9eVyECtnKaq hjSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="d3MI4/bK"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a630609000000b003821cf2feafsi17582046pgg.421.2022.03.23.10.52.38; Wed, 23 Mar 2022 10:52:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="d3MI4/bK"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 S234034AbiCWJEO (ORCPT + 70 others); Wed, 23 Mar 2022 05:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbiCWJEM (ORCPT ); Wed, 23 Mar 2022 05:04:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EF1072E15 for ; Wed, 23 Mar 2022 02:02:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D0EE6617A6 for ; Wed, 23 Mar 2022 09:02:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46F3EC340E8; Wed, 23 Mar 2022 09:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648026162; bh=rXCsEhloZ5QU8QIlegzd8ZSAKSU+r9o5PMatE9byQgE=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=d3MI4/bKv/8wf6mEnWv7br0QvTT9IoRpAea/V4Il3L123gcgOrZK0i79yCXYOAob/ d5IUQJmrrCDkyo3qBfm66vLx/G3nTyW09KmPVbPr7mU+ZnK2qmrfhcnP7M7ThVRP4B CrJMLwhdbVOecmO0JBlB1fhuojI3RSjadm+Gv4joQj0vf6pMPL74T5PlG7cVoXY9UX nhEJvN6dJ0qh/mmKbFGcM46JRRUAf6Rpiyt2WQiv4WRIO/NdiK1KVFGS8S48uuTw3l 2r44z9UgoxhHtfWglDdrcAs1dOzsb8/slSkRgpWUmYM4F8ijTiWsGKp0ae+plnHAuP 95wpUJ1Zo6ohw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v8 1/4] ath11k: add support for device recovery for QCA6390/WCN6855 From: Kalle Valo In-Reply-To: <20220228064606.8981-2-quic_wgong@quicinc.com> References: <20220228064606.8981-2-quic_wgong@quicinc.com> To: Wen Gong Cc: , , User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <164802615605.545.4592174487303801360.kvalo@kernel.org> Date: Wed, 23 Mar 2022 09:02:41 +0000 (UTC) X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Wen Gong wrote: > Currently ath11k has device recovery logic, it is introduced by this > patch "ath11k: Add support for subsystem recovery" which is upstream > by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad. > > The patch is for AHB devices such as IPQ8074, it has remote proc module > which is used to download the firmware and boots the processor which > firmware is running on. If firmware crashed, remote proc module will > detect it and download and boot firmware again. Below command will > trigger a firmware crash, and then user can test feature of device > recovery. > > Test command: > echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash > echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash > > Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc > module, it use mhi module to communicate between firmware and ath11k. > So ath11k does not support device recovery for QCA6390 currently. > > This patch is to add the extra logic which is different for QCA6390. > When firmware crashed, MHI_CB_EE_RDDM event will be indicate by > firmware and then ath11k_mhi_op_status_cb which is the callback of > mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k > will start to do recovery process, ath11k_core_reset() calls > ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k > will start to download and boot firmware. There are some logic to > avoid deadloop recovery and two simultaneous recovery operations. > And because it has muti-radios for the soc, so it add some logic > in ath11k_mac_op_reconfig_complete() to make sure all radios has > reconfig complete and then complete the device recovery. > > Also it add workqueue_aux, because ab->workqueue is used when receive > ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue, > &ab->restart_work)), and ath11k_core_reset will wait for max > ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if > ath11k_core_reset also queued in ab->workqueue, then it will delay > restart_work of previous recovery and lead previous recovery fail. > > ath11k recovery success for QCA6390/WCN6855 after apply this patch. > > Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2 > > Signed-off-by: Wen Gong > Signed-off-by: Kalle Valo 4 patches applied to ath-next branch of ath.git, thanks. 13da397f884d ath11k: add support for device recovery for QCA6390/WCN6855 38194f3a605e ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base 78e3e6094220 ath11k: Add hw-restart option to simulate_fw_crash 0d7a8a6204ea ath11k: fix the warning of dev_wake in mhi_pm_disable_transition() -- https://patchwork.kernel.org/project/linux-wireless/patch/20220228064606.8981-2-quic_wgong@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches