Received: by 10.223.185.116 with SMTP id b49csp6408359wrg; Wed, 28 Feb 2018 08:56:30 -0800 (PST) X-Google-Smtp-Source: AH8x227SmKcDKMFHXu6fVjBou92PTn+MV5xzTQYaa9x4Cb8UjqDqHALia/ONSvrnBCSzwz8ani3p X-Received: by 10.99.4.66 with SMTP id 63mr14672590pge.93.1519836990377; Wed, 28 Feb 2018 08:56:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519836990; cv=none; d=google.com; s=arc-20160816; b=Svt80duEkvtSSIx+eRb9FTe9AD7BZHtwIOCmL7OQvYkA1pXU+Yf3SRo79pSpsEqaY1 K+7EZmQUybu/6x4p2ZwC3ZhJzfgB2a903kTUuLdF4ofndqAylV686plMoRUx/qPVlNxB HM0lk04LZte3I5e+GJanS67207Ss4wokX82S/5ZClanXSCfU6woen1LC6udnTqYRJxiS Wx5pVee3KkJwMvcnaYb7liQNt2EIMqNyULxHwkL0ANupykf7SixjxBXB3EgTbXKzWnFI kbqkGpSAPIhG9B8rMcw9mWOQN49QFy/wo8VZwUpQXx4yxYYuIRC3imV35zfFzJl7Z/E0 VS8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=vEpy++aiSZd0m796K/82JCQUK5P5qd+dSNVrWNyyCwM=; b=BvDkA8zsew7FdBjbNKwkzJJFctJWK8mK7BaG9Me0olocJZ94tyP3uHIVMSb5GMoDm2 Pc5ndIJclqrAGdRaoozr3xLClfilcT1+FD1p4loOd0bSKOwjGYFwUgzLeOFtCQy4v4zW sO5Nz5NQWrUNkGBhOiQ+wh+jRcmgSH73jkOelPdcilXjP6eADWKyrRHzvaxyDYJLEhEY 8cxbKsuzsJBOstlKwnxZygs5vI7JAqZXzqcBbpPVGtfwwDufM9igJe2dZ0LCm4pKaZeu rDY4c2oXzPz6Xo3fHtTSaIRam9rkoADXNXLM/GSUa3oETMbnu1a3BegxoX/3rdxh+nGx +Vog== 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 62-v6si1532329ple.491.2018.02.28.08.56.15; Wed, 28 Feb 2018 08:56:30 -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 S934181AbeB1P5m (ORCPT + 99 others); Wed, 28 Feb 2018 10:57:42 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34518 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933979AbeB1P5j (ORCPT ); Wed, 28 Feb 2018 10:57:39 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yf-0006XQ-C2; Wed, 28 Feb 2018 15:22:17 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Ye-0008Pu-5l; Wed, 28 Feb 2018 15:22:16 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "=?UTF-8?q?Oliver=20St=C3=A4bler?=" , "Marc Kleine-Budde" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 044/254] can: ti_hecc: Fix napi poll return value for repoll In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Oliver Stäbler commit f6c23b174c3c96616514827407769cbcfc8005cf upstream. After commit d75b1ade567f ("net: less interrupt masking in NAPI") napi repoll is done only when work_done == budget. So we need to return budget if there are still packets to receive. Signed-off-by: Oliver Stäbler Signed-off-by: Marc Kleine-Budde Signed-off-by: Ben Hutchings --- drivers/net/can/ti_hecc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c @@ -652,6 +652,9 @@ static int ti_hecc_rx_poll(struct napi_s mbx_mask = hecc_read(priv, HECC_CANMIM); mbx_mask |= HECC_TX_MBOX_MASK; hecc_write(priv, HECC_CANMIM, mbx_mask); + } else { + /* repoll is done only if whole budget is used */ + num_pkts = quota; } return num_pkts;