Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2541292imu; Thu, 29 Nov 2018 06:37:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/WWBdx8B6/cF98x2aboQRIXM2n14Dpv79EAm/aITTz74NrbN2FVzE0v5MY+rigzWfVXiYir X-Received: by 2002:a17:902:b494:: with SMTP id y20mr1759214plr.178.1543502251659; Thu, 29 Nov 2018 06:37:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543502251; cv=none; d=google.com; s=arc-20160816; b=bIHa05JrBV22G/1dUDnwlCFUyQbcOjh0ALbvfa9NFG0RpQTzndsmL3c+fuGrZnE97J k4EHXNqaDW7FkY98FQhQBDRqCNLlwwyJr5hcraeiLmqf0qs2GYZOZHna7rKd7XjCOjTj KPM/Bkyra9alqozylmieJ0DzmxdwNQ8n0fM5Nvg6OeFbnptQe+gg4UddhEIpu04oecuy DRscY8cBxR9Hhiu1q7yHtIj6HINc0zLnalLs6T+XOo95BNZT1DrOsDLRYfcu/58mmBYS Y1So05TeTKLhrRoLaSHWG3tQaUqY3f+WqkhCpqccIYO+13ODSC383CDeziBJjegAGdki qyZA== 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=3SKQgHrQ77vrz1FIwLblI4EDPk8hVv9KvEDHY489/ig=; b=PKxGy5HiOtbg2fuW4QIszS9DfE2PBioq/w3xl+P59yDzqDrxOawS8QwFHhIQj/ltpi +yUFKnnsA2lGXpW/3L01a6svGcPIDQj9bqJj44rfKPHSakKs4BjuvMji+S7PWhJED65/ aK2eCxQzWNpiy+ki020LbPKH+tgFHE+NqfW2co2/61cM1sTkqKCO0GSBNKd9CSk28Ek8 q14C3xBFwwT6BvvjhdWQd7jZ6cO/y4ABe1xQQi4vzeRzK2265xp8ZgKr/ZYIrg6GpZFf MG/1u2GsBhjvkI7hpDHmLPaALTC78F/ssr4LMmHC4jyafjFUhLJv2BMRZLIch7wP8lVK /Www== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IEaZpKIG; 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 s73si2214717pfs.54.2018.11.29.06.37.16; Thu, 29 Nov 2018 06:37:31 -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=IEaZpKIG; 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 S2389269AbeK3BhZ (ORCPT + 99 others); Thu, 29 Nov 2018 20:37:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:40324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732374AbeK3BhY (ORCPT ); Thu, 29 Nov 2018 20:37: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 9E59E2145D; Thu, 29 Nov 2018 14:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501911; bh=rDzuBNAgZT3rRqObWkdpnQG9z+B768EmU6mGGfonxg4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IEaZpKIGPBceFlZf8MVW6tEsjqIkrkn3YuEyMRVEzZEeP2wYB1etVm981AIbxrdz/ n0crnLFOb7A/Vv8WnpVbmID3U1FDqPGjMbmJwYs7pQpmxVjlDhiDO7NH635fjz5qqo UWV30r4dzgkxJ8/PDloZfBfwVOA0kleCPfpsNcE8= 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.19 058/110] can: hi311x: Use level-triggered interrupt Date: Thu, 29 Nov 2018 15:12:29 +0100 Message-Id: <20181129135923.609407717@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129135921.231283053@linuxfoundation.org> References: <20181129135921.231283053@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.19-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 @@ -17,7 +17,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);