Received: by 10.223.164.202 with SMTP id h10csp205430wrb; Mon, 13 Nov 2017 05:14:59 -0800 (PST) X-Google-Smtp-Source: AGs4zMb2byPnZQ2UPvzEc4N+poE/461BuUgsRueKCi5509QbVuRM93uxwBc/tNIC6pZi4yOjrBk+ X-Received: by 10.101.80.70 with SMTP id k6mr8699466pgo.149.1510578899001; Mon, 13 Nov 2017 05:14:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510578898; cv=none; d=google.com; s=arc-20160816; b=DRRs8p8349wKz/hs4cZmLfFMlID5CoPPNjPO6DzuF7aurOdeYGkbADo2BbjlMYtnm5 K+nEqMjfDCJRvWbSYt5+IRGaKOTdCtBRdCnvY/z5pzPE0uwEZ3mMy0G8fwKfEto8uSeu QUySkBXumtK0lOpt2XUGTYlD8SUVHelWVx2I59L53ZS/vkNbi7s8OHvhTIO8EHzWHA35 jmkfxbPsHdv92x0mWwtTcfrTexzvvphMLKmY2FvKzd8GXbovERDs/Nxy+p+bMtoSDOxV K8XmKeB3MgM63zUKSumDqwYkXAtkBXqQB6Py5yNzncXMAdKDg/3T5gQXzeUVUhgUeUvS FJUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=tCPYpcgkwswThxSrafB4OJusFg9QQ6DCs1wDXOdyyac=; b=BeT34b7+cvydToWjsd43OC7s3g9pfmDA4x6BqRfQ7SIBzOjCdnAlp5rL6FeL9tTPMe 6DWZKHkN9YijpfXSSzbhZlmJjqmLizT/9vz1oQX/G/bsgQG1LP/Fav7NP0P8OE5UMuNV UhKDo8ZN+s25eQN87ol4Dudess+WU0cdg+tXVvzjS6/Seduzutt9aM3tM9gfHp+4/osX lcoP0EtmHp4P65sovmUvYODVRwekItNFX5xyhmJHX3WGwzRjpK8kZOr7WaC2wNtRL+cz 9Yk+zgorZqWJbE5QwgPpX1COxWMBGTD7MbtsPITslKoqVokf8uvwfuGkrN05d9obL+Kz eK9w== 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 v9si14309952plg.194.2017.11.13.05.14.45; Mon, 13 Nov 2017 05:14:58 -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 S1754745AbdKMNDM (ORCPT + 95 others); Mon, 13 Nov 2017 08:03:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51368 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755000AbdKMNDI (ORCPT ); Mon, 13 Nov 2017 08:03:08 -0500 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1C6A7AB5; Mon, 13 Nov 2017 13:03:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Vasut , Markus Marb , Marc Kleine-Budde Subject: [PATCH 4.9 83/87] can: ifi: Fix transmitter delay calculation Date: Mon, 13 Nov 2017 13:56:40 +0100 Message-Id: <20171113125622.737386438@linuxfoundation.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113125615.304035578@linuxfoundation.org> References: <20171113125615.304035578@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marek Vasut commit 4f7116757b4bd99e4ef2636c7d957a6d63035d11 upstream. The CANFD transmitter delay calculation formula was updated in the latest software drop from IFI and improves the behavior of the IFI CANFD core during bitrate switching. Use the new formula to improve stability of the CANFD operation. Signed-off-by: Marek Vasut Cc: Markus Marb Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/ifi_canfd/ifi_canfd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/net/can/ifi_canfd/ifi_canfd.c +++ b/drivers/net/can/ifi_canfd/ifi_canfd.c @@ -670,9 +670,9 @@ static void ifi_canfd_set_bittiming(stru priv->base + IFI_CANFD_FTIME); /* Configure transmitter delay */ - tdc = (dbt->brp * (dbt->phase_seg1 + 1)) & IFI_CANFD_TDELAY_MASK; - writel(IFI_CANFD_TDELAY_EN | IFI_CANFD_TDELAY_ABS | tdc, - priv->base + IFI_CANFD_TDELAY); + tdc = dbt->brp * (dbt->prop_seg + dbt->phase_seg1); + tdc &= IFI_CANFD_TDELAY_MASK; + writel(IFI_CANFD_TDELAY_EN | tdc, priv->base + IFI_CANFD_TDELAY); } static void ifi_canfd_set_filter(struct net_device *ndev, const u32 id, From 1583956186816462516@xxx Mon Nov 13 13:05:33 +0000 2017 X-GM-THRID: 1583956186816462516 X-Gmail-Labels: Inbox,Category Promotions,HistoricalUnread