Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1461390rdb; Mon, 2 Oct 2023 10:07:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqRDZPye1wCXauQlkFh/3dXBt2rbse44K/4fEh58D8nQBEKuysAQwgbFIBC7REvNWEAZ5v X-Received: by 2002:a05:6870:c58e:b0:1b7:3432:9ec4 with SMTP id ba14-20020a056870c58e00b001b734329ec4mr15531161oab.10.1696266440529; Mon, 02 Oct 2023 10:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696266440; cv=none; d=google.com; s=arc-20160816; b=pShEmxxr5Xu7iojLKcbF7uYHyn80InGFTV4FaUKhX3GqzhSumIWbpfRYAmrQC8cDft DNJSl0y/7s0W0o0LW+yR9La477HIhxKzWCKe5ljQNNIeVXCNc58Ar0rseFSltKnjlf4y MOfB56CzXuKYh4kk1zZmK6bOmWurlMIlz8uhDAQ7gNY+p3Uad1p5JGrNZdvlTRGaY9Uy AMK1uqGU13rehZsCVhD01FRpC9J33RDzLW+xmPU5LFsitVf1jhw5LXConnuE3Krbp+ZV HYF5/CPpvSDYTdCm+CjdWO7X1YJv4ZmbguG+o6B9sOwqwtm+TBK/MExKiDonvZaEJXot +Daw== 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=xWFdeS4Rq5+7q5lRxgOKZeM5yR+iiJ4Ikfw9VTdN4n4=; fh=onFNw7H93cSASsSx3Fx7d81Ge4tph2MW4Rt1wjJvKlY=; b=h2ipmXP/D4bEEN6zNL/SfCX6S8iWTG538RMQK7axb89MyGiFDhQLyAX9NyMzNT8WZ+ uBEei4JG3sqx5v2gwTDp7163frTDBpzQiYQwXLY1w70zGiiJX0dYqmsahhGQS3pgJ9BR hykK3MwSP7Sg87qG3vUGDfO+3ElwoVo2E7DV7c0cBz/X8aLzfnorBxemlTsb2iyMcKgQ oW+fpN7AO37OdiDNDA6SimvevMYr82iAiqGQIIQlsS+1BXrg6fl7pxd8ycBZCnuILMf8 qF8SEv1KMyoyRxVaGSlif1MMlbu/2UIxpMAK6PbnU3YpEzvmC721OOQ2jGOfoOpK/XYI 9a9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sARPa3QN; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 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. [23.128.96.32]) by mx.google.com with ESMTPS id 189-20020a6300c6000000b00582dcfe3b3csi20232990pga.491.2023.10.02.10.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 10:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sARPa3QN; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 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 6DE5180A3115; Mon, 2 Oct 2023 09:56:19 -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 S238606AbjJBQ4R (ORCPT + 53 others); Mon, 2 Oct 2023 12:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238563AbjJBQ4M (ORCPT ); Mon, 2 Oct 2023 12:56:12 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9935BCC3; Mon, 2 Oct 2023 09:55:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0D83C433C9; Mon, 2 Oct 2023 16:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696265756; bh=sPlHNmzUSdBxnJ8yitiqY23idbEgXus5Y1nrmAkWweQ=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=sARPa3QNqo2ddqMiMCByHiNP+YQvPz19V1/oiSd/ZW2tmwUsrFzKXIwm1/cu9mqZL NUiibzUjfgDoNeu7m5NOb/Fjk2Dt6Pb5tbdbR5KEpoLeW1s+Hnk0yU7jOz1OIb/6oS AwNccwIzlqbjaB/ET75fjRwmnFmbZjQTB9L+k0KunjRNCGy+nRK3BBCNObY7dqjQtP NTa9sPQkcoJRfBi/Tr2uK9k2qADCz4DBf3P+ttoUGUt/KK9ymYILx4w5p+MqdELYlw eFEdIXCSvegwaflyLsYSrS3/I+U17/QEGDtiEV5zL6DKmha6zPE2EfPmudjLng+1FK A6VOaEoUq/L1Q== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] ath10k: Don't touch the CE interrupt registers after power up From: Kalle Valo In-Reply-To: <20230630151842.1.If764ede23c4e09a43a842771c2ddf99608f25f8e@changeid> References: <20230630151842.1.If764ede23c4e09a43a842771c2ddf99608f25f8e@changeid> To: Douglas Anderson Cc: ath10k@lists.infradead.org, Abhishek Kumar , Youghandhar Chintala , Douglas Anderson , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169626575295.3936351.833023194847155734.kvalo@kernel.org> Date: Mon, 2 Oct 2023 16:55:54 +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]); Mon, 02 Oct 2023 09:56:19 -0700 (PDT) Douglas Anderson wrote: > As talked about in commit d66d24ac300c ("ath10k: Keep track of which > interrupts fired, don't poll them"), if we access the copy engine > register at a bad time then ath10k can go boom. However, it's not > necessarily easy to know when it's safe to access them. > > The ChromeOS test labs saw a crash that looked like this at > shutdown/reboot time (on a chromeos-5.15 kernel, but likely the > problem could also reproduce upstream): > > Internal error: synchronous external abort: 96000010 [#1] PREEMPT SMP > ... > CPU: 4 PID: 6168 Comm: reboot Not tainted 5.15.111-lockdep-19350-g1d624fe6758f #1 010b9b233ab055c27c6dc88efb0be2f4e9e86f51 > Hardware name: Google Kingoftown (DT) > ... > pc : ath10k_snoc_read32+0x50/0x74 [ath10k_snoc] > lr : ath10k_snoc_read32+0x24/0x74 [ath10k_snoc] > ... > Call trace: > ath10k_snoc_read32+0x50/0x74 [ath10k_snoc ...] > ath10k_ce_disable_interrupt+0x190/0x65c [ath10k_core ...] > ath10k_ce_disable_interrupts+0x8c/0x120 [ath10k_core ...] > ath10k_snoc_hif_stop+0x78/0x660 [ath10k_snoc ...] > ath10k_core_stop+0x13c/0x1ec [ath10k_core ...] > ath10k_halt+0x398/0x5b0 [ath10k_core ...] > ath10k_stop+0xfc/0x1a8 [ath10k_core ...] > drv_stop+0x148/0x6b4 [mac80211 ...] > ieee80211_stop_device+0x70/0x80 [mac80211 ...] > ieee80211_do_stop+0x10d8/0x15b0 [mac80211 ...] > ieee80211_stop+0x144/0x1a0 [mac80211 ...] > __dev_close_many+0x1e8/0x2c0 > dev_close_many+0x198/0x33c > dev_close+0x140/0x210 > cfg80211_shutdown_all_interfaces+0xc8/0x1e0 [cfg80211 ...] > ieee80211_remove_interfaces+0x118/0x5c4 [mac80211 ...] > ieee80211_unregister_hw+0x64/0x1f4 [mac80211 ...] > ath10k_mac_unregister+0x4c/0xf0 [ath10k_core ...] > ath10k_core_unregister+0x80/0xb0 [ath10k_core ...] > ath10k_snoc_free_resources+0xb8/0x1ec [ath10k_snoc ...] > ath10k_snoc_shutdown+0x98/0xd0 [ath10k_snoc ...] > platform_shutdown+0x7c/0xa0 > device_shutdown+0x3e0/0x58c > kernel_restart_prepare+0x68/0xa0 > kernel_restart+0x28/0x7c > > Though there's no known way to reproduce the problem, it makes sense > that it would be the same issue where we're trying to access copy > engine registers when it's not allowed. > > Let's fix this by changing how we "disable" the interrupts. Instead of > tweaking the copy engine registers we'll just use disable_irq() and > enable_irq(). Then we'll configure the interrupts once at power up > time. > > Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2.c10-00754-QCAHLSWMTPL-1 > > Signed-off-by: Douglas Anderson > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 170c75d43a77 wifi: ath10k: Don't touch the CE interrupt registers after power up -- https://patchwork.kernel.org/project/linux-wireless/patch/20230630151842.1.If764ede23c4e09a43a842771c2ddf99608f25f8e@changeid/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches