Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2528068imu; Thu, 29 Nov 2018 06:26:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/XwPEN8Vm7JB8+YU9TZqaVB7NWg6dzslTqrPZUMCcLG1gqLqwvRLXI/5ZL59/Kuknkq4DDG X-Received: by 2002:a17:902:6946:: with SMTP id k6mr1699251plt.101.1543501607582; Thu, 29 Nov 2018 06:26:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543501607; cv=none; d=google.com; s=arc-20160816; b=iYAAo+cL0Dw8gXgziCCBK1EArwNRsLviGtk4DQJAU1UvnaxOhq7WfDytHTyv1DSTp/ jB/j36AImMo7IC7N991Bvrm6PlPruju+14l+QWsrrRsUN9yp45pDoTb3XQKzSpqRGmO0 4RHP9HvIxUaBwfODmZ2Pdm1vBitFuBP+R6g5tkvp6QpwL5AjJscZeDEfZlVPd0+l4eKP 3LOywjGnWPnyke0icuNi65dYDUcD7CMwgFDoWUj9viise+HlHkGN4K5e7UcOVLjN/qFv G4y+oruV9+SUovNRxZYWGVzlfGf2aONT+KmqcrfuKHoXeQAKsOYrEaIF7R1v0PY1q3So Hdtw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SHYUqcrfgvj7iD1K91gIKNYpgAJ2N1rD8NyA7o+8dmk=; b=RLbr7dDYLWzKTC1feeIDqZnS2n4N+9qwR3XG6CPRKEYqKptf79ca/ZUvnfhAuBYZXL TS/wCmAQsjAP8zfALR0TtIldhrugVU33ykQR/HSvmbv/isrCSqTsrhY64uuAI6YU0VTf iDIuAL2ztuQIDo9WM2Jx0U2jO3EIFohPftZ4mnsxoV5wJ3RHt5xaGkFXdWKa63Tq46Rb HIp5IBLdZPCPZrgta8/MF/X2FTyoTaqbhhjPAzdkaaRaj9byeghz/NO6ciMrz9ZllSum Mo0vEm2p2R6hjdi2MCx8+yyf0q3CnxYK51IhjVnolYMCwphViwArmaWjWMawhJ+1WuHm 5Vng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2rkKx1AQ; 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 m14si2127281pgd.326.2018.11.29.06.26.32; Thu, 29 Nov 2018 06:26:47 -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; dkim=pass header.i=@kernel.org header.s=default header.b=2rkKx1AQ; 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 S1733127AbeK3BbZ (ORCPT + 99 others); Thu, 29 Nov 2018 20:31:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:58922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731628AbeK3BbY (ORCPT ); Thu, 29 Nov 2018 20:31:24 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D7B9821104; Thu, 29 Nov 2018 14:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501552; bh=2NHCgXn3uuob5Nk4LxAMBG+IPBVMfagxotmbEHwy6zs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2rkKx1AQfnkaWYCK7gcATCFZwCcwZKFWsEdpyVJw87m9TP1e2mKUv/yeOa74EKpHB sQryaG1gM2OWEXl1QBBRERKQkkSpzeyxRxelkIPp+mT2mTemoBeiYbdhunFGh5+c+7 XEVrupjsmORJf47niszHVGQFL/SpV58o6jCEZgpc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mathias Duckeck , Akshay Bhat , Casey Fitzpatrick , Lukas Wunner , Marc Kleine-Budde Subject: [PATCH 4.14 043/100] can: hi311x: Use level-triggered interrupt Date: Thu, 29 Nov 2018 15:12:13 +0100 Message-Id: <20181129140102.572986349@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lukas Wunner commit f164d0204b1156a7e0d8d1622c1a8d25752befec upstream. If the hi3110 shares the SPI bus with another traffic-intensive device and packets are received in high volume (by a separate machine sending with "cangen -g 0 -i -x"), reception stops after a few minutes and the counter in /proc/interrupts stops incrementing. Bus state is "active". Bringing the interface down and back up reconvenes the reception. The issue is not observed when the hi3110 is the sole device on the SPI bus. Using a level-triggered interrupt makes the issue go away and lets the hi3110 successfully receive 2 GByte over the course of 5 days while a ks8851 Ethernet chip on the same SPI bus handles 6 GByte of traffic. Unfortunately the hi3110 datasheet is mum on the trigger type. The pin description on page 3 only specifies the polarity (active high): http://www.holtic.com/documents/371-hi-3110_v-rev-kpdf.do Cc: Mathias Duckeck Cc: Akshay Bhat Cc: Casey Fitzpatrick Signed-off-by: Lukas Wunner Cc: linux-stable Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- Documentation/devicetree/bindings/net/can/holt_hi311x.txt | 2 +- drivers/net/can/spi/hi311x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/Documentation/devicetree/bindings/net/can/holt_hi311x.txt +++ b/Documentation/devicetree/bindings/net/can/holt_hi311x.txt @@ -18,7 +18,7 @@ Example: reg = <1>; clocks = <&clk32m>; interrupt-parent = <&gpio4>; - interrupts = <13 IRQ_TYPE_EDGE_RISING>; + interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; vdd-supply = <®5v0>; xceiver-supply = <®5v0>; }; --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -760,7 +760,7 @@ static int hi3110_open(struct net_device { struct hi3110_priv *priv = netdev_priv(net); struct spi_device *spi = priv->spi; - unsigned long flags = IRQF_ONESHOT | IRQF_TRIGGER_RISING; + unsigned long flags = IRQF_ONESHOT | IRQF_TRIGGER_HIGH; int ret; ret = open_candev(net);