Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
To: wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net,
	michal.simek@xilinx.com
Cc: netdev@vger.kernel.org,
	Srinivas Neeli <srinivas.neeli@xilinx.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org
Subject: [PATCH 5/5] can: xilinx_can: Fix the data phase btr1 calculation
Date: Mon, 12 Aug 2019 12:58:34 +0530	[thread overview]
Message-ID: <1565594914-18999-6-git-send-email-appana.durga.rao@xilinx.com> (raw)
In-Reply-To: <1565594914-18999-1-git-send-email-appana.durga.rao@xilinx.com>

From: Srinivas Neeli <srinivas.neeli@xilinx.com>

While calculating bitrate for the data phase, the driver is using phase
segment 1 of the arbitration phase instead of the data phase.

Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
Acked-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/net/can/xilinx_can.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index 4cb8c1c9..ab26691 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -425,7 +425,7 @@ static int xcan_set_bittiming(struct net_device *ndev)
 		btr0 = dbt->brp - 1;
 
 		/* Setting Time Segment 1 in BTR Register */
-		btr1 = dbt->prop_seg + bt->phase_seg1 - 1;
+		btr1 = dbt->prop_seg + dbt->phase_seg1 - 1;
 
 		/* Setting Time Segment 2 in BTR Register */
 		btr1 |= (dbt->phase_seg2 - 1) << priv->devtype.btr_ts2_shift;
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-08-12  7:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12  7:28 [PATCH 0/5] can: xilinx_can: Bug fixes Appana Durga Kedareswara rao
2019-08-12  7:28 ` [PATCH 1/5] can: xilinx_can: defer the probe if clock is not found Appana Durga Kedareswara rao
2019-08-12  9:03   ` Marc Kleine-Budde
2019-08-12  9:07     ` Appana Durga Kedareswara Rao
2019-08-12  7:28 ` [PATCH 2/5] can: xilinx_can: Fix FSR register handling in the rx path Appana Durga Kedareswara rao
2019-08-12  7:28 ` [PATCH 3/5] can: xilinx_can: Fix the data updation logic for CANFD FD frames Appana Durga Kedareswara rao
2019-08-12  7:28 ` [PATCH 4/5] can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0 Appana Durga Kedareswara rao
2019-08-12  7:28 ` Appana Durga Kedareswara rao [this message]
2019-08-12  9:05 ` [PATCH 0/5] can: xilinx_can: Bug fixes Marc Kleine-Budde
2019-08-12  9:09   ` Appana Durga Kedareswara Rao
2019-08-12  9:10   ` Marc Kleine-Budde
2019-08-12 10:18     ` Michal Simek
2019-08-12 10:47       ` Marc Kleine-Budde
2019-08-12 10:57         ` Michal Simek
2019-08-12 10:59           ` Marc Kleine-Budde
2019-08-12 11:05             ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1565594914-18999-6-git-send-email-appana.durga.rao@xilinx.com \
    --to=appana.durga.rao@xilinx.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=srinivas.neeli@xilinx.com \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox