Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp525791imb; Fri, 1 Mar 2019 07:05:37 -0800 (PST) X-Google-Smtp-Source: APXvYqx/+70CzL3lwoZJmDDD2H3qpebo/YzCTJcROObcKFFmptpnHlbhJyPno1cNb22NjyQP6CSf X-Received: by 2002:a63:7c07:: with SMTP id x7mr5301756pgc.284.1551452737371; Fri, 01 Mar 2019 07:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551452737; cv=none; d=google.com; s=arc-20160816; b=mEzPubj7cIrEQizrFbPgDZbSx1uALkHJ8GYI99D2+KOq+xfjVUWW5kEfRvKER5B1ZC g4cpxp0UIa/25A1nObUbANHVdQSwXQ3o5xvXsv0ZS2XJBVln1cZ07Wq+pINQzSgfbiYA seauA+2t8lm5YNDaZ8/oaE2ClAhxCe/peSn47aLTem+ISo3cXPtzdty4e21nuZHqW4fB 8eyYLovbqe6MeM9okR5g287fX2lTKCST/vjVOnV3yKoQdvFW7YzeEZLtQ98ayI41zUv8 TZyCVhhAGeve1K3MlGz0KuWA5UvXQyMC3jws1hZCsL5RJAHBLcQXxKRi9NIZGd26AiU1 h2MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from; bh=TtDOYj0w5igZEWnpXC+t+MW9X659NWrahJi5peWWzOk=; b=f4IS4cFFgtECt8erdEXzDTWg3WvCc4WzgRO4Ffz5/L8W3aR5f+Zm2UPS0Hdxyay4X+ 0WKzxRl0pVaIGA0WH+z6JFiOCXBKFu4F2ylBUSW3PPZ+t7m1QhC5OhMTfihrbPEhQxi5 n8w0hFXdmxBc4fw5zDof06wWZqeqNZPni5KME5Gt2T6jZu9El4Rb8otzIZAa16z8IHa/ dNgdJscD7cTOYG2YHVWyeUNTbjtpxDk8YDBgyM8cMYR636C6QNgDpwUzDGyjN3eFR7lb NCkHF4uOzqor5qI2V2PVHASZf8+Yf6yG8lDYVCRLyMPAUlizuh2ZHgEH+RvynZIhbZCj Og6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18si20635273pfj.46.2019.03.01.07.05.18; Fri, 01 Mar 2019 07:05:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388539AbfCAPEP convert rfc822-to-8bit (ORCPT + 99 others); Fri, 1 Mar 2019 10:04:15 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:54752 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387861AbfCAPEL (ORCPT ); Fri, 1 Mar 2019 10:04:11 -0500 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 3267615632; Fri, 1 Mar 2019 15:04:09 +0000 (GMT) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Jeroen Hofstee Cc: linux-can@vger.kernel.org, Wolfgang Grandegger , Marc Kleine-Budde , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] can: ti_hecc: fix close when napi poll is active References: <1523132500-26070-1-git-send-email-jhofstee@victronenergy.com> Date: Fri, 01 Mar 2019 15:04:09 +0000 In-Reply-To: <1523132500-26070-1-git-send-email-jhofstee@victronenergy.com> (Jeroen Hofstee's message of "Sat, 7 Apr 2018 22:21:39 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jeroen Hofstee writes: > When closing this CAN interface while napi poll is active, for example with: > `ip link set can0 down` several interfaces freeze. This seemed to be caused > by napi_disable called from ti_hecc_close expecting the scheduled probe to > either return quota or call napi_complete. Since the poll functions has a > check for netif_running it returns 0 and doesn't call napi_complete and hence > violates the napi its expectation. > > So remove this check, so either napi_complete is called or quota is returned. > > Signed-off-by: Jeroen Hofstee > --- > drivers/net/can/ti_hecc.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c > index db6ea93..42813d3 100644 > --- a/drivers/net/can/ti_hecc.c > +++ b/drivers/net/can/ti_hecc.c > @@ -603,9 +603,6 @@ static int ti_hecc_rx_poll(struct napi_struct *napi, int quota) > u32 mbx_mask; > unsigned long pending_pkts, flags; > > - if (!netif_running(ndev)) > - return 0; > - > while ((pending_pkts = hecc_read(priv, HECC_CANRMP)) && > num_pkts < quota) { > mbx_mask = BIT(priv->rx_next); /* next rx mailbox to process */ > -- > 2.7.4 This seems to have been lost or forgotten. -- M?ns Rullg?rd