From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from m43-7.mailgun.net ([69.72.43.7]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAPpd-0006T2-W5 for ath10k@lists.infradead.org; Tue, 25 Aug 2020 03:41:12 +0000 MIME-Version: 1.0 Date: Tue, 25 Aug 2020 11:41:03 +0800 From: Wen Gong Subject: Re: [PATCH v2] ath10k: add flag to protect napi operation to avoid dead loop hang for SDIO In-Reply-To: References: <1598243612-4627-1-git-send-email-wgong@codeaurora.org> <2d6362ce85956d0f7df2e596b89a7028@codeaurora.org> Message-ID: <663fbb682fd8df555b2964d7d86b8eca@codeaurora.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Krishna Chaitanya Cc: linux-wireless , ath10k On 2020-08-24 19:15, Krishna Chaitanya wrote: > On Mon, Aug 24, 2020 at 4:15 PM Wen Gong wrote: >> >> On 2020-08-24 18:03, Krishna Chaitanya wrote: >> > On Mon, Aug 24, 2020 at 3:10 PM Wen Gong wrote: >> >> >> >> On 2020-08-24 16:35, Krishna Chaitanya wrote: >> >> > On Mon, Aug 24, 2020 at 10:03 AM Wen Gong wrote: >> >> >> >> >> >> It happened "Kernel panic - not syncing: hung_task: blocked tasks" >> >> >> when >> >> >> test simulate crash and ifconfig down/rmmod meanwhile. >> >> >> >> >> ... >> >> >> >> >> >> #ifdef CONFIG_PM >> >> > Even though your DUT is SDIO based we should be doing this in general >> >> > for all, no? >> >> > core_restart + hif_stop is common to all. >> >> this patch does not have core_restart. >> > I was referring to the combination which is causing the issue. >> > >> >> I dit not hit the issue for others bus(PCIe,SNOC...), so I can not >> >> change them with a >> >> assumption they also have this issue. >> > But that doesn't make sense, the combination is being hit for others >> > also. >> > (they should also endup calling napi_disable twice?) or they are using >> > some other check to avoid this (doesn't appear so from a quick look at >> > the >> > code). >> Because I only use SDIO, I did not use others BUS, so I did not hit >> the >> issue >> on other BUS. > I understand, my point was based on the description the issue looks > independent > of the BUS type, so, the fix should also be generic. I understand that > your testing > is only focused on SDIO, but we should have a generic fix and probably > use > communities help to get it tested rather than fixing SDIO only. I checked the ath10k, only sdio.c, snoc.c, pci.c have used napi. I think it can change to move the napi_synchronize/napi_disable/napi_enable from sido.c/snoc.c/pci.c to ath10k_core.ko as below: void ath10k_core_napi_enable(struct ath10k *ar) { if (!ar->napi_enabled) { napi_enable(&ar->napi); ar->napi_enabled = true; } } EXPORT_SYMBOL(ath10k_core_napi_enable); void ath10k_core_napi_disable_sync(struct ath10k *ar) { if (ar->napi_enabled) { napi_synchronize(&ar->napi); napi_disable(&ar->napi); ar->napi_enabled = false; } } EXPORT_SYMBOL(ath10k_core_napi_disable_sync); is it appropriate? ... _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k