Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2777773pxa; Tue, 25 Aug 2020 03:03:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4GULBlAYw78zIo6IDOG8Vq773/m0Op2AmMb+jLlGvZUqnJ2dYTS+3jsA8iHWBcYizMDOn X-Received: by 2002:a17:906:a84f:: with SMTP id dx15mr9438340ejb.377.1598349796506; Tue, 25 Aug 2020 03:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598349796; cv=none; d=google.com; s=arc-20160816; b=EFLbBXWgGec0aLctLdhPQjMSzvLImJ8RPMvRqEqF3QX8IWQfMKOiB1pIA59bk98ppX dBriIZcBKrW+Nt6qN3ipsCd2vUPGNSkDojkfV32Gn1tXL9Ic57Rq8gxB7XLub1lnZvbW VuwHVSvbG0M9X9YPjKYjg9u2tkR/rSsaNAuWlSyjfZUcaFhzf1BX5MAoQWuxkXWMujDH ClLfTn/pGS2HrdqfVJGWXA2Y0n5hAu6Di/q9Vjbo+NEpXXyHNTBt5wELNKKix++cZpqS dGYOYS7PTmO6/Fc+4QGm+BS2LtUTqIJpmXZMoH2RYRoTCbkezaXZ98gWO/DAIkXatVTt X4Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=gAmumPVKDAbz1OPi9k0aQ0e27mwE/qsDzt35hOJVSOk=; b=iExRp8WTDtk4gIwWDWX+4G0ZObOPVP/0bLrt3tsVems3hkgZUkWq/Er4/sO9IBM8rv fgBX9/52i9QG7U9XLlvcDORjz0Ofz3BDqIlkGNnIly2VQ8daH4zy0f73hk6uWmq0C3lz 6HpVHKOwYgTuNhkFhGLWJw4RH258wnuZUNr3P6v8RGf97dsW1AGu9FU+gVa9L0bwRP3u s9ZdMXtQVm9LLnqFyMqxEqSda7PbRk1kjYHKbq26/tGT6Ek7+0UmHH37CaU0Wcx+zk1q tJFgg3B94EIvt9PU3DVIBOUzTe/NC7vczcOUuYMFgUOpQ2Nz08YrJSMuSVQcxY0ye3Lv pERw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=gnHDbeVg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si8143898edt.197.2020.08.25.03.02.36; Tue, 25 Aug 2020 03:03:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=gnHDbeVg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729534AbgHYJ7P (ORCPT + 99 others); Tue, 25 Aug 2020 05:59:15 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:28300 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbgHYJ7O (ORCPT ); Tue, 25 Aug 2020 05:59:14 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1598349553; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=gAmumPVKDAbz1OPi9k0aQ0e27mwE/qsDzt35hOJVSOk=; b=gnHDbeVgYxOSvdxn1OLV3mW00J7Wh+V6qKgnGj1BJWMTAy3fF9zJ/LSFE+DnrNBn2ERY96DF Y3eJlDgiUJD+Z0ayPcG6koHnj5bPV8j0+TAOINMIZ+T97gQWbXzld4zNwz8D5pqOVKV5ccOQ Kaa1tB+DRp4OFCBOmlefLYduIEo= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 5f44e0d53525716afd3b2e79 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 25 Aug 2020 09:58:45 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E90A9C433CB; Tue, 25 Aug 2020 09:58:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: wgong) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8F97EC433C6; Tue, 25 Aug 2020 09:58:44 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 25 Aug 2020 17:58:44 +0800 From: Wen Gong To: Krishna Chaitanya Cc: ath10k , linux-wireless 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> <663fbb682fd8df555b2964d7d86b8eca@codeaurora.org> Message-ID: <02d7cee8e356ad7326f8631ba2f97a2c@codeaurora.org> X-Sender: wgong@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2020-08-25 16:24, Krishna Chaitanya wrote: > On Tue, Aug 25, 2020 at 9:11 AM Wen Gong wrote: >> >> 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? >> ... > Yes, this is perfect. One minor comment you can just do the > check initially and return. > > if (ar->napi_enabled) > return Yes, I will change that. But who can test for SNOC and PCIe, I have tested with SDIO, it is OK. Govind, could you help to test SNOC? If no people test PCIe, I can also test it.