Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3426229pxf; Mon, 29 Mar 2021 01:45:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY6nl+gAmgRL/pUHDH+XofWCuYGZ/jbOSyXEZ/mGObvZ2VhGmKETJDLgxvo1z58CDUHaew X-Received: by 2002:aa7:da0f:: with SMTP id r15mr27216755eds.111.1617007511062; Mon, 29 Mar 2021 01:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617007511; cv=none; d=google.com; s=arc-20160816; b=BbL9josPtwJ7xlgve5miVCfsBLZlcW5AK7cRO9l9rixZ2sLBnpOAUDGaqTnrcpq7tD 6WlLRtGbo6isDCIy6aVJj/k0aJS+07wkS7JiAfOtn+G7jM+P3jvsMLIC4wyjtRp/Ntfc 35b6kFI2ojXSTOScN0NW61vachw6Vz0sXrPWGIkoMyZIVqoXwdcj7bz1g82uv7Ef+cZV Nv8GCN9HFwE6Gl9O9U7hONX2BGYPkl7u785RrJJ8sODYyifVVG7AW0M0X3a3Ab+dYefc dR7+/gbwe9IUMjEH7jzTP/V4YhcvlbLfP7zA7tBmvI3pfdVkURKlyr+jEXUmA88FPjYJ fNGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6g7n6SdcCvpXmfv5Dq1Z6L5hKpBzptAbBjxxFgPofpM=; b=f/29DL5KxXSMKsxfFcZ3L/QqMR4gpYg3Cvxfvq7PUqDovNSgXAwd1ZzY+absis6yv8 eopUUI5Oo+bK1nXIqghyxVsJx1OrrEm6cj97Qu6oMDyzEeHhXucZmvmOZadypVH+e2wR obObdbg9eWHG4xzk1kGZem+WDbhykkW+4jMaWp3HUR/wrHcalatBjs+z8j0uZc56Nx8N COKo88FAvfKPT7wMvgKsSuifT5VOwmaj7R4rVftahiu07b7BNIUQbFuxr3KRCNz8vGSg 3e6OTB9x8p6dwNvvF3eiZTBHJifw3OoOk+7gq5KBgAx1FRoqIM/iaN+PRiLF5Mmw7Yei 2ihg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p53mPjMU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gv29si12093459ejc.61.2021.03.29.01.44.48; Mon, 29 Mar 2021 01:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p53mPjMU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234975AbhC2Ilj (ORCPT + 99 others); Mon, 29 Mar 2021 04:41:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:39250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233867AbhC2IWe (ORCPT ); Mon, 29 Mar 2021 04:22:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DC6E961477; Mon, 29 Mar 2021 08:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006142; bh=40apNtwK/ByI1t+hK7o7y4DD75s4fZeBKofqvxd5EFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p53mPjMUxhH7BOnU5nKYFDtP98V3uF1O0KcsVauprz3+y2xe3Y1OCu5v0i733TqqQ GwdOCdKM/ZZeB95e97850qhbAFvfCUOXzYId5AbU2puWH8ZGHU+I09aWf6xfQQFotX g8aI5APwtYLvxafPv/ce5+IEIBJ2osLTXlWvoRA8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Kleine-Budde , Torin Cooper-Bennun , Sasha Levin Subject: [PATCH 5.10 132/221] can: m_can: m_can_rx_peripheral(): fix RX being blocked by errors Date: Mon, 29 Mar 2021 09:57:43 +0200 Message-Id: <20210329075633.597200987@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Torin Cooper-Bennun [ Upstream commit e98d9ee64ee2cc9b1d1a8e26610ec4d0392ebe50 ] For M_CAN peripherals, m_can_rx_handler() was called with quota = 1, which caused any error handling to block RX from taking place until the next time the IRQ handler is called. This had been observed to cause RX to be blocked indefinitely in some cases. This is fixed by calling m_can_rx_handler with a sensibly high quota. Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Link: https://lore.kernel.org/r/20210303144350.4093750-1-torin@maxiluxsystems.com Suggested-by: Marc Kleine-Budde Signed-off-by: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/m_can/m_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 6952d5b396e8..6f0bf5db885c 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -882,7 +882,7 @@ static int m_can_rx_peripheral(struct net_device *dev) { struct m_can_classdev *cdev = netdev_priv(dev); - m_can_rx_handler(dev, 1); + m_can_rx_handler(dev, M_CAN_NAPI_WEIGHT); m_can_enable_all_interrupts(cdev); -- 2.30.1