Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1291013pxa; Thu, 20 Aug 2020 07:38:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyizq33KHIAPlCo73TxoM+BAeeErflPX5kjdbbBXe6OwLmCpn23QH8h15JaTyCtdjBTsl98 X-Received: by 2002:a05:6402:1151:: with SMTP id g17mr3247761edw.227.1597934338871; Thu, 20 Aug 2020 07:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597934338; cv=none; d=google.com; s=arc-20160816; b=or9OkWV4my0/yG+qi9/gKiqNZxcd1APEBDoP5ZVMHWSFdnhWQpsEjj606sm+qKD+mj 23mDK0dZXViwrOVUvIGEsQCw90eIukZMvLl0+I7mQujwcHrAdbCk9GnqwBYZKPYrdJUh YIrfVr6a93UreLVVuJUBHc/9tP3eFZAIH6U29VuFMYPua7Fo6/QFWfLQHYIzyFWFUEBo Cf0xZiI89CzdWog/BAngzIxXHBNt+R8awsTnkY28yOhtyiuGaXpmM4pO9l49EtNqkAtT E67gbVHPXxoJe4vqikAQ7Fy7571Vu6knrvci3cUNqTlYvQIXvlCJq4yM6Q/NLu9xgUJ7 dKPw== 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=6nZH+MOtU7JM7B/Js9Nzq8u18EdhiJWbmrNEHfbOCro=; b=DbHqhMnAjPoasy2lHWLGi06Zd/Ngowoe2TJJkF2BJTSk0XfEpKJRG1ylkFK3cjPp0u l20TqDezQq/ei/CbIDWLfNByUSjYvm9k6uhCP0d+j/IhV9XtnkpUkQke/nkX7HNnXlmF 6CFj6G7Vm6rtJaSI5adpFoyoa4Vg2RTQtLbc+XXOmjwHjeKz7OxW0KJGn2fMFq96ObQm 3ewas5EOnVjAY7cVc2z56zHspuSPRqFhmdEY52Q3yK2gPDxlqbUhN7HcTXYCaFM9Zl91 hJSvOnie07VG4QgUWqnnXSPHla971DrndAsE/DUEytyx5cm29MoK6iO73XzLAFHuzv8+ o89w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=J6E3jems; 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 jp21si1345902ejb.136.2020.08.20.07.38.21; Thu, 20 Aug 2020 07:38:58 -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=J6E3jems; 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 S1727866AbgHTOiB (ORCPT + 99 others); Thu, 20 Aug 2020 10:38:01 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:33626 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727107AbgHTOiA (ORCPT ); Thu, 20 Aug 2020 10:38:00 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597934280; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=6nZH+MOtU7JM7B/Js9Nzq8u18EdhiJWbmrNEHfbOCro=; b=J6E3jemsgRF1EXDxChqxYcABVd7cw1IWOnJy8YHkHoV44VgDH2BGOdHusIZffcIqYae6B/RN QeDIvZAypNROC0I3hsT0JT0oBAyCWc37HJ8RgZEaU6m/aSxyP8hwKIZXdXwpyqTBZx1/JXi7 VbS+6CUZSO5TYtAr9qEwmw78Dzc= X-Mailgun-Sending-Ip: 104.130.122.29 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-n05.prod.us-east-1.postgun.com with SMTP id 5f3e8ac07eb4541d93df86ae (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 20 Aug 2020 14:37:52 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 0A2B6C43387; Thu, 20 Aug 2020 14:37:51 +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=unavailable 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 87D55C433CA; Thu, 20 Aug 2020 14:37:50 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 20 Aug 2020 22:37:50 +0800 From: Wen Gong To: Krishna Chaitanya Cc: Kalle Valo , linux-wireless , ath10k Subject: Re: [RFC] ath10k: change to do napi_enable and napi_disable when insmod and rmmod for sdio In-Reply-To: References: <20200214035555.24762-1-wgong@codeaurora.org> <878se9iup3.fsf@codeaurora.org> Message-ID: 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-20 18:52, Krishna Chaitanya wrote: > On Thu, Aug 20, 2020 at 3:45 PM Wen Gong wrote: >> >> On 2020-08-20 17:19, Krishna Chaitanya wrote: ... >> >> I'm not really convinced that this is the right fix, but I'm no NAPI >> >> expert. Can anyone else help? >> > Calling napi_disable() twice can lead to hangs, but moving NAPI from >> > start/stop to >> > the probe isn't the right approach as the datapath is tied to >> > start/stop. >> > >> > Maybe check the state of NAPI before disable? >> > >> > if (test_bit(NAPI_STATE_SCHED, &ar->napi.napi.state)) >> > napi_disable(&ar->napi) >> > or maintain napi_state like this >> > https://patchwork.kernel.org/patch/10249365/ >> it is better to use above link's patch. >> napi.state is controlled by napi API, it is better ath10k not know it. > Sure, but IMHO just canceling the async rx work should solve the issue. Oh no, canceling the async rx work will not solve this issue, rx worker ath10k_rx_indication_async_work call napi_schedule, after napi_complete, the NAPI_STATE_SCHED will clear. The issue of this patch is because 2 thread called to hif_stop and NAPI_STATE_SCHED not clear. ...