linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] can: xilinx_can: Bug fixes
@ 2019-08-12  7:28 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
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Appana Durga Kedareswara rao @ 2019-08-12  7:28 UTC (permalink / raw)
  To: wg, mkl, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel,
	Appana Durga Kedareswara rao

This patch series fixes below issues
--> Bugs in the driver w.r.to CANFD 2.0 IP support
--> Defer the probe if clock is not found

Appana Durga Kedareswara rao (3):
  can: xilinx_can: Fix FSR register handling in the rx path
  can: xilinx_can: Fix the data updation logic for CANFD FD frames
  can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0

Srinivas Neeli (1):
  can: xilinx_can: Fix the data phase btr1 calculation

Venkatesh Yadav Abbarapu (1):
  can: xilinx_can: defer the probe if clock is not found

 drivers/net/can/xilinx_can.c | 162 +++++++++++++++++++------------------------
 1 file changed, 72 insertions(+), 90 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/5] can: xilinx_can: defer the probe if clock is not found
  2019-08-12  7:28 [PATCH 0/5] can: xilinx_can: Bug fixes Appana Durga Kedareswara rao
@ 2019-08-12  7:28 ` Appana Durga Kedareswara rao
  2019-08-12  9:03   ` Marc Kleine-Budde
  2019-08-12  7:28 ` [PATCH 2/5] can: xilinx_can: Fix FSR register handling in the rx path Appana Durga Kedareswara rao
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: Appana Durga Kedareswara rao @ 2019-08-12  7:28 UTC (permalink / raw)
  To: wg, mkl, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel,
	Venkatesh Yadav Abbarapu

From: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>

It's not always the case that clock is already available when can
driver get probed at the first time, e.g. the clock is provided by
clock wizard which may be probed after can driver. So let's defer
the probe when devm_clk_get() call fails and give it chance to
try later.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/net/can/xilinx_can.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index bd95cfa..ac175ab 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -1791,7 +1791,8 @@ static int xcan_probe(struct platform_device *pdev)
 	/* Getting the CAN can_clk info */
 	priv->can_clk = devm_clk_get(&pdev->dev, "can_clk");
 	if (IS_ERR(priv->can_clk)) {
-		dev_err(&pdev->dev, "Device clock not found.\n");
+		if (PTR_ERR(priv->can_clk) != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "Device clock not found.\n");
 		ret = PTR_ERR(priv->can_clk);
 		goto err_free;
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/5] can: xilinx_can: Fix FSR register handling in the rx path
  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  7:28 ` 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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Appana Durga Kedareswara rao @ 2019-08-12  7:28 UTC (permalink / raw)
  To: wg, mkl, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel,
	Appana Durga Kedareswara rao

After commit c223da689324 ("can: xilinx_can: Add support for
CANFD FD frames") Driver is updating the FSR IRI index multiple
times(i.e in xcanfd_rx() and xcan_rx_fifo_get_next_frame()),
It should be updated once per rx packet this patch fixes this issue,
also this patch removes the unnecessary fsr register checks in
xcanfd_rx() API.

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <Shubhrajyoti.datta@xilinx.com>
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/net/can/xilinx_can.c | 139 ++++++++++++++++++++-----------------------
 1 file changed, 63 insertions(+), 76 deletions(-)

diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index ac175ab..2d3399e 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -819,91 +819,78 @@ static int xcanfd_rx(struct net_device *ndev, int frame_base)
 	u32 id_xcan, dlc, data[2] = {0, 0}, dwindex = 0, i, fsr, readindex;
 
 	fsr = priv->read_reg(priv, XCAN_FSR_OFFSET);
-	if (fsr & XCAN_FSR_FL_MASK) {
-		readindex = fsr & XCAN_FSR_RI_MASK;
-		id_xcan = priv->read_reg(priv,
-					 XCAN_FRAME_ID_OFFSET(frame_base));
-		dlc = priv->read_reg(priv, XCAN_FRAME_DLC_OFFSET(frame_base));
-		if (dlc & XCAN_DLCR_EDL_MASK)
-			skb = alloc_canfd_skb(ndev, &cf);
-		else
-			skb = alloc_can_skb(ndev, (struct can_frame **)&cf);
+	readindex = fsr & XCAN_FSR_RI_MASK;
+	id_xcan = priv->read_reg(priv, XCAN_FRAME_ID_OFFSET(frame_base));
+	dlc = priv->read_reg(priv, XCAN_FRAME_DLC_OFFSET(frame_base));
+	if (dlc & XCAN_DLCR_EDL_MASK)
+		skb = alloc_canfd_skb(ndev, &cf);
+	else
+		skb = alloc_can_skb(ndev, (struct can_frame **)&cf);
 
-		if (unlikely(!skb)) {
-			stats->rx_dropped++;
-			return 0;
-		}
+	if (unlikely(!skb)) {
+		stats->rx_dropped++;
+		return 0;
+	}
 
-		/* Change Xilinx CANFD data length format to socketCAN data
-		 * format
-		 */
-		if (dlc & XCAN_DLCR_EDL_MASK)
-			cf->len = can_dlc2len((dlc & XCAN_DLCR_DLC_MASK) >>
+	/* Change Xilinx CANFD data length format to socketCAN data
+	 * format
+	 */
+	if (dlc & XCAN_DLCR_EDL_MASK)
+		cf->len = can_dlc2len((dlc & XCAN_DLCR_DLC_MASK) >>
+				  XCAN_DLCR_DLC_SHIFT);
+	else
+		cf->len = get_can_dlc((dlc & XCAN_DLCR_DLC_MASK) >>
 					  XCAN_DLCR_DLC_SHIFT);
-		else
-			cf->len = get_can_dlc((dlc & XCAN_DLCR_DLC_MASK) >>
-						  XCAN_DLCR_DLC_SHIFT);
-
-		/* Change Xilinx CAN ID format to socketCAN ID format */
-		if (id_xcan & XCAN_IDR_IDE_MASK) {
-			/* The received frame is an Extended format frame */
-			cf->can_id = (id_xcan & XCAN_IDR_ID1_MASK) >> 3;
-			cf->can_id |= (id_xcan & XCAN_IDR_ID2_MASK) >>
-					XCAN_IDR_ID2_SHIFT;
-			cf->can_id |= CAN_EFF_FLAG;
-			if (id_xcan & XCAN_IDR_RTR_MASK)
-				cf->can_id |= CAN_RTR_FLAG;
-		} else {
-			/* The received frame is a standard format frame */
-			cf->can_id = (id_xcan & XCAN_IDR_ID1_MASK) >>
-					XCAN_IDR_ID1_SHIFT;
-			if (!(dlc & XCAN_DLCR_EDL_MASK) && (id_xcan &
-						XCAN_IDR_SRR_MASK))
-				cf->can_id |= CAN_RTR_FLAG;
-		}
 
-		/* Check the frame received is FD or not*/
-		if (dlc & XCAN_DLCR_EDL_MASK) {
-			for (i = 0; i < cf->len; i += 4) {
-				if (priv->devtype.flags & XCAN_FLAG_CANFD_2)
-					data[0] = priv->read_reg(priv,
+	/* Change Xilinx CAN ID format to socketCAN ID format */
+	if (id_xcan & XCAN_IDR_IDE_MASK) {
+		/* The received frame is an Extended format frame */
+		cf->can_id = (id_xcan & XCAN_IDR_ID1_MASK) >> 3;
+		cf->can_id |= (id_xcan & XCAN_IDR_ID2_MASK) >>
+				XCAN_IDR_ID2_SHIFT;
+		cf->can_id |= CAN_EFF_FLAG;
+		if (id_xcan & XCAN_IDR_RTR_MASK)
+			cf->can_id |= CAN_RTR_FLAG;
+	} else {
+		/* The received frame is a standard format frame */
+		cf->can_id = (id_xcan & XCAN_IDR_ID1_MASK) >>
+				XCAN_IDR_ID1_SHIFT;
+		if (!(dlc & XCAN_DLCR_EDL_MASK) && (id_xcan &
+					XCAN_IDR_SRR_MASK))
+			cf->can_id |= CAN_RTR_FLAG;
+	}
+
+	/* Check the frame received is FD or not*/
+	if (dlc & XCAN_DLCR_EDL_MASK) {
+		for (i = 0; i < cf->len; i += 4) {
+			if (priv->devtype.flags & XCAN_FLAG_CANFD_2)
+				data[0] = priv->read_reg(priv,
 					(XCAN_RXMSG_2_FRAME_OFFSET(readindex) +
 					(dwindex * XCANFD_DW_BYTES)));
-				else
-					data[0] = priv->read_reg(priv,
+			else
+				data[0] = priv->read_reg(priv,
 					(XCAN_RXMSG_FRAME_OFFSET(readindex) +
-						(dwindex * XCANFD_DW_BYTES)));
-				*(__be32 *)(cf->data + i) =
-						cpu_to_be32(data[0]);
-				dwindex++;
-			}
-		} else {
-			for (i = 0; i < cf->len; i += 4) {
-				if (priv->devtype.flags & XCAN_FLAG_CANFD_2)
-					data[0] = priv->read_reg(priv,
-						XCAN_RXMSG_2_FRAME_OFFSET(readindex) + i);
-				else
-					data[0] = priv->read_reg(priv,
-						XCAN_RXMSG_FRAME_OFFSET(readindex) + i);
-				*(__be32 *)(cf->data + i) =
-						cpu_to_be32(data[0]);
-			}
+					(dwindex * XCANFD_DW_BYTES)));
+			*(__be32 *)(cf->data + i) = cpu_to_be32(data[0]);
+			dwindex++;
+		}
+	} else {
+		for (i = 0; i < cf->len; i += 4) {
+			if (priv->devtype.flags & XCAN_FLAG_CANFD_2)
+				data[0] = priv->read_reg(priv,
+					XCAN_RXMSG_2_FRAME_OFFSET(readindex) +
+								  i);
+			else
+				data[0] = priv->read_reg(priv,
+					XCAN_RXMSG_FRAME_OFFSET(readindex) + i);
+			*(__be32 *)(cf->data + i) = cpu_to_be32(data[0]);
 		}
-		/* Update FSR Register so that next packet will save to
-		 * buffer
-		 */
-		fsr = priv->read_reg(priv, XCAN_FSR_OFFSET);
-		fsr |= XCAN_FSR_IRI_MASK;
-		priv->write_reg(priv, XCAN_FSR_OFFSET, fsr);
-		fsr = priv->read_reg(priv, XCAN_FSR_OFFSET);
-		stats->rx_bytes += cf->len;
-		stats->rx_packets++;
-		netif_receive_skb(skb);
-
-		return 1;
 	}
-	/* If FSR Register is not updated with fill level */
-	return 0;
+	stats->rx_bytes += cf->len;
+	stats->rx_packets++;
+	netif_receive_skb(skb);
+
+	return 1;
 }
 
 /**
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/5] can: xilinx_can: Fix the data updation logic for CANFD FD frames
  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  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 ` 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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Appana Durga Kedareswara rao @ 2019-08-12  7:28 UTC (permalink / raw)
  To: wg, mkl, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel,
	Appana Durga Kedareswara rao

commit c223da689324 ("can: xilinx_can: Add support for CANFD FD frames")
is writing data to a wrong offset for FD frames.

This patch fixes this issue.

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <Shubhrajyoti.datta@xilinx.com>
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/net/can/xilinx_can.c | 29 ++++++++---------------------
 1 file changed, 8 insertions(+), 21 deletions(-)

diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index 2d3399e..c9b951b 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -66,8 +66,7 @@ enum xcan_reg {
 #define XCAN_FRAME_DLC_OFFSET(frame_base)	((frame_base) + 0x04)
 #define XCAN_FRAME_DW1_OFFSET(frame_base)	((frame_base) + 0x08)
 #define XCAN_FRAME_DW2_OFFSET(frame_base)	((frame_base) + 0x0C)
-#define XCANFD_FRAME_DW_OFFSET(frame_base, n)	(((frame_base) + 0x08) + \
-						 ((n) * XCAN_CANFD_FRAME_SIZE))
+#define XCANFD_FRAME_DW_OFFSET(frame_base)	((frame_base) + 0x08)
 
 #define XCAN_CANFD_FRAME_SIZE		0x48
 #define XCAN_TXMSG_FRAME_OFFSET(n)	(XCAN_TXMSG_BASE_OFFSET + \
@@ -600,7 +599,7 @@ static void xcan_write_frame(struct xcan_priv *priv, struct sk_buff *skb,
 	if (priv->devtype.cantype == XAXI_CANFD ||
 	    priv->devtype.cantype == XAXI_CANFD_2_0) {
 		for (i = 0; i < cf->len; i += 4) {
-			ramoff = XCANFD_FRAME_DW_OFFSET(frame_offset, dwindex) +
+			ramoff = XCANFD_FRAME_DW_OFFSET(frame_offset) +
 					(dwindex * XCANFD_DW_BYTES);
 			priv->write_reg(priv, ramoff,
 					be32_to_cpup((__be32 *)(cf->data + i)));
@@ -816,10 +815,8 @@ static int xcanfd_rx(struct net_device *ndev, int frame_base)
 	struct net_device_stats *stats = &ndev->stats;
 	struct canfd_frame *cf;
 	struct sk_buff *skb;
-	u32 id_xcan, dlc, data[2] = {0, 0}, dwindex = 0, i, fsr, readindex;
+	u32 id_xcan, dlc, data[2] = {0, 0}, dwindex = 0, i, dw_offset;
 
-	fsr = priv->read_reg(priv, XCAN_FSR_OFFSET);
-	readindex = fsr & XCAN_FSR_RI_MASK;
 	id_xcan = priv->read_reg(priv, XCAN_FRAME_ID_OFFSET(frame_base));
 	dlc = priv->read_reg(priv, XCAN_FRAME_DLC_OFFSET(frame_base));
 	if (dlc & XCAN_DLCR_EDL_MASK)
@@ -863,26 +860,16 @@ static int xcanfd_rx(struct net_device *ndev, int frame_base)
 	/* Check the frame received is FD or not*/
 	if (dlc & XCAN_DLCR_EDL_MASK) {
 		for (i = 0; i < cf->len; i += 4) {
-			if (priv->devtype.flags & XCAN_FLAG_CANFD_2)
-				data[0] = priv->read_reg(priv,
-					(XCAN_RXMSG_2_FRAME_OFFSET(readindex) +
-					(dwindex * XCANFD_DW_BYTES)));
-			else
-				data[0] = priv->read_reg(priv,
-					(XCAN_RXMSG_FRAME_OFFSET(readindex) +
-					(dwindex * XCANFD_DW_BYTES)));
+			dw_offset = XCANFD_FRAME_DW_OFFSET(frame_base) +
+					(dwindex * XCANFD_DW_BYTES);
+			data[0] = priv->read_reg(priv, dw_offset);
 			*(__be32 *)(cf->data + i) = cpu_to_be32(data[0]);
 			dwindex++;
 		}
 	} else {
 		for (i = 0; i < cf->len; i += 4) {
-			if (priv->devtype.flags & XCAN_FLAG_CANFD_2)
-				data[0] = priv->read_reg(priv,
-					XCAN_RXMSG_2_FRAME_OFFSET(readindex) +
-								  i);
-			else
-				data[0] = priv->read_reg(priv,
-					XCAN_RXMSG_FRAME_OFFSET(readindex) + i);
+			dw_offset = XCANFD_FRAME_DW_OFFSET(frame_base);
+			data[0] = priv->read_reg(priv, dw_offset + i);
 			*(__be32 *)(cf->data + i) = cpu_to_be32(data[0]);
 		}
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/5] can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0
  2019-08-12  7:28 [PATCH 0/5] can: xilinx_can: Bug fixes Appana Durga Kedareswara rao
                   ` (2 preceding siblings ...)
  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 ` Appana Durga Kedareswara rao
  2019-08-12  7:28 ` [PATCH 5/5] can: xilinx_can: Fix the data phase btr1 calculation Appana Durga Kedareswara rao
  2019-08-12  9:05 ` [PATCH 0/5] can: xilinx_can: Bug fixes Marc Kleine-Budde
  5 siblings, 0 replies; 16+ messages in thread
From: Appana Durga Kedareswara rao @ 2019-08-12  7:28 UTC (permalink / raw)
  To: wg, mkl, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel,
	Appana Durga Kedareswara rao

For CANFD 2.0 IP configuration existing driver is using incorrect mask
values for FSR register FL and RI fields.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@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 | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index c9b951b..4cb8c1c9 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -123,8 +123,10 @@ enum xcan_reg {
 #define XCAN_IDR_RTR_MASK		0x00000001 /* Remote TX request */
 #define XCAN_DLCR_DLC_MASK		0xF0000000 /* Data length code */
 #define XCAN_FSR_FL_MASK		0x00003F00 /* RX Fill Level */
+#define XCAN_2_FSR_FL_MASK		0x00007F00 /* RX Fill Level */
 #define XCAN_FSR_IRI_MASK		0x00000080 /* RX Increment Read Index */
 #define XCAN_FSR_RI_MASK		0x0000001F /* RX Read Index */
+#define XCAN_2_FSR_RI_MASK		0x0000003F /* RX Read Index */
 #define XCAN_DLCR_EDL_MASK		0x08000000 /* EDL Mask in DLC */
 #define XCAN_DLCR_BRS_MASK		0x04000000 /* BRS Mask in DLC */
 
@@ -1138,7 +1140,7 @@ static int xcan_rx_fifo_get_next_frame(struct xcan_priv *priv)
 	int offset;
 
 	if (priv->devtype.flags & XCAN_FLAG_RX_FIFO_MULTI) {
-		u32 fsr;
+		u32 fsr, mask;
 
 		/* clear RXOK before the is-empty check so that any newly
 		 * received frame will reassert it without a race
@@ -1148,12 +1150,17 @@ static int xcan_rx_fifo_get_next_frame(struct xcan_priv *priv)
 		fsr = priv->read_reg(priv, XCAN_FSR_OFFSET);
 
 		/* check if RX FIFO is empty */
-		if (!(fsr & XCAN_FSR_FL_MASK))
+		if (priv->devtype.flags & XCAN_FLAG_CANFD_2)
+			mask = XCAN_2_FSR_FL_MASK;
+		else
+			mask = XCAN_FSR_FL_MASK;
+
+		if (!(fsr & mask))
 			return -ENOENT;
 
 		if (priv->devtype.flags & XCAN_FLAG_CANFD_2)
 			offset =
-			  XCAN_RXMSG_2_FRAME_OFFSET(fsr & XCAN_FSR_RI_MASK);
+			  XCAN_RXMSG_2_FRAME_OFFSET(fsr & XCAN_2_FSR_RI_MASK);
 		else
 			offset =
 			  XCAN_RXMSG_FRAME_OFFSET(fsr & XCAN_FSR_RI_MASK);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/5] can: xilinx_can: Fix the data phase btr1 calculation
  2019-08-12  7:28 [PATCH 0/5] can: xilinx_can: Bug fixes Appana Durga Kedareswara rao
                   ` (3 preceding siblings ...)
  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
  2019-08-12  9:05 ` [PATCH 0/5] can: xilinx_can: Bug fixes Marc Kleine-Budde
  5 siblings, 0 replies; 16+ messages in thread
From: Appana Durga Kedareswara rao @ 2019-08-12  7:28 UTC (permalink / raw)
  To: wg, mkl, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel, Srinivas Neeli

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


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/5] can: xilinx_can: defer the probe if clock is not found
  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
  0 siblings, 1 reply; 16+ messages in thread
From: Marc Kleine-Budde @ 2019-08-12  9:03 UTC (permalink / raw)
  To: Appana Durga Kedareswara rao, wg, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel,
	Venkatesh Yadav Abbarapu


[-- Attachment #1.1: Type: text/plain, Size: 1774 bytes --]

On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
> From: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
> 
> It's not always the case that clock is already available when can
> driver get probed at the first time, e.g. the clock is provided by
> clock wizard which may be probed after can driver. So let's defer
> the probe when devm_clk_get() call fails and give it chance to
> try later.

Technically the patch changes the error message to not being printed in
case of EPROBE_DEFER. This patch doesn't change any behaviour apart from
that. Please adjust the patch description accordingly.

Marc

> 
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>  drivers/net/can/xilinx_can.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
> index bd95cfa..ac175ab 100644
> --- a/drivers/net/can/xilinx_can.c
> +++ b/drivers/net/can/xilinx_can.c
> @@ -1791,7 +1791,8 @@ static int xcan_probe(struct platform_device *pdev)
>  	/* Getting the CAN can_clk info */
>  	priv->can_clk = devm_clk_get(&pdev->dev, "can_clk");
>  	if (IS_ERR(priv->can_clk)) {
> -		dev_err(&pdev->dev, "Device clock not found.\n");
> +		if (PTR_ERR(priv->can_clk) != -EPROBE_DEFER)
> +			dev_err(&pdev->dev, "Device clock not found.\n");
>  		ret = PTR_ERR(priv->can_clk);
>  		goto err_free;
>  	}
> 


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/5] can: xilinx_can: Bug fixes
  2019-08-12  7:28 [PATCH 0/5] can: xilinx_can: Bug fixes Appana Durga Kedareswara rao
                   ` (4 preceding siblings ...)
  2019-08-12  7:28 ` [PATCH 5/5] can: xilinx_can: Fix the data phase btr1 calculation Appana Durga Kedareswara rao
@ 2019-08-12  9:05 ` Marc Kleine-Budde
  2019-08-12  9:09   ` Appana Durga Kedareswara Rao
  2019-08-12  9:10   ` Marc Kleine-Budde
  5 siblings, 2 replies; 16+ messages in thread
From: Marc Kleine-Budde @ 2019-08-12  9:05 UTC (permalink / raw)
  To: Appana Durga Kedareswara rao, wg, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1069 bytes --]

On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
> This patch series fixes below issues
> --> Bugs in the driver w.r.to CANFD 2.0 IP support
> --> Defer the probe if clock is not found
> 
> Appana Durga Kedareswara rao (3):
>   can: xilinx_can: Fix FSR register handling in the rx path
>   can: xilinx_can: Fix the data updation logic for CANFD FD frames
>   can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0
> 
> Srinivas Neeli (1):
>   can: xilinx_can: Fix the data phase btr1 calculation
> 
> Venkatesh Yadav Abbarapu (1):
>   can: xilinx_can: defer the probe if clock is not found

Please add your S-o-b to patches 4+5.

As these all are bugfixes please add a reference to the commit it fixes:

    Fixes: commitish ("description")

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH 1/5] can: xilinx_can: defer the probe if clock is not found
  2019-08-12  9:03   ` Marc Kleine-Budde
@ 2019-08-12  9:07     ` Appana Durga Kedareswara Rao
  0 siblings, 0 replies; 16+ messages in thread
From: Appana Durga Kedareswara Rao @ 2019-08-12  9:07 UTC (permalink / raw)
  To: Marc Kleine-Budde, wg, davem, Michal Simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel,
	Venkatesh Yadav Abbarapu

Hi Marc,

Thanks for the review...

<Snip> 
> On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
> > From: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
> >
> > It's not always the case that clock is already available when can
> > driver get probed at the first time, e.g. the clock is provided by
> > clock wizard which may be probed after can driver. So let's defer the
> > probe when devm_clk_get() call fails and give it chance to try later.
> 
> Technically the patch changes the error message to not being printed in case
> of EPROBE_DEFER. This patch doesn't change any behaviour apart from that.
> Please adjust the patch description accordingly.

Sure will fix in v2... 

Regards,
Kedar.

> 
> Marc
> 
> >
> > Signed-off-by: Venkatesh Yadav Abbarapu
> > <venkatesh.abbarapu@xilinx.com>
> > Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> > ---
> >  drivers/net/can/xilinx_can.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/can/xilinx_can.c
> > b/drivers/net/can/xilinx_can.c index bd95cfa..ac175ab 100644
> > --- a/drivers/net/can/xilinx_can.c
> > +++ b/drivers/net/can/xilinx_can.c
> > @@ -1791,7 +1791,8 @@ static int xcan_probe(struct platform_device
> *pdev)
> >  	/* Getting the CAN can_clk info */
> >  	priv->can_clk = devm_clk_get(&pdev->dev, "can_clk");
> >  	if (IS_ERR(priv->can_clk)) {
> > -		dev_err(&pdev->dev, "Device clock not found.\n");
> > +		if (PTR_ERR(priv->can_clk) != -EPROBE_DEFER)
> > +			dev_err(&pdev->dev, "Device clock not found.\n");
> >  		ret = PTR_ERR(priv->can_clk);
> >  		goto err_free;
> >  	}
> >
> 
> 
> --
> Pengutronix e.K.                  | Marc Kleine-Budde           |
> Industrial Linux Solutions        | Phone: +49-231-2826-924     |
> Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
> Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH 0/5] can: xilinx_can: Bug fixes
  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
  1 sibling, 0 replies; 16+ messages in thread
From: Appana Durga Kedareswara Rao @ 2019-08-12  9:09 UTC (permalink / raw)
  To: Marc Kleine-Budde, wg, davem, Michal Simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel

Hi Marc,

Thanks for the review.

<Snip> 
> On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
> > This patch series fixes below issues
> > --> Bugs in the driver w.r.to CANFD 2.0 IP support Defer the probe if
> > --> clock is not found
> >
> > Appana Durga Kedareswara rao (3):
> >   can: xilinx_can: Fix FSR register handling in the rx path
> >   can: xilinx_can: Fix the data updation logic for CANFD FD frames
> >   can: xilinx_can: Fix FSR register FL and RI mask values for canfd
> > 2.0
> >
> > Srinivas Neeli (1):
> >   can: xilinx_can: Fix the data phase btr1 calculation
> >
> > Venkatesh Yadav Abbarapu (1):
> >   can: xilinx_can: defer the probe if clock is not found
> 
> Please add your S-o-b to patches 4+5.
> 
> As these all are bugfixes please add a reference to the commit it fixes:
> 
>     Fixes: commitish ("description")

Sure will fix in v2... 

Regards,
Kedar. 

> 
> Marc
> 
> --
> Pengutronix e.K.                  | Marc Kleine-Budde           |
> Industrial Linux Solutions        | Phone: +49-231-2826-924     |
> Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
> Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/5] can: xilinx_can: Bug fixes
  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
  1 sibling, 1 reply; 16+ messages in thread
From: Marc Kleine-Budde @ 2019-08-12  9:10 UTC (permalink / raw)
  To: Appana Durga Kedareswara rao, wg, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1311 bytes --]

On 8/12/19 11:05 AM, Marc Kleine-Budde wrote:
> On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
>> This patch series fixes below issues
>> --> Bugs in the driver w.r.to CANFD 2.0 IP support
>> --> Defer the probe if clock is not found
>>
>> Appana Durga Kedareswara rao (3):
>>   can: xilinx_can: Fix FSR register handling in the rx path
>>   can: xilinx_can: Fix the data updation logic for CANFD FD frames
>>   can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0
>>
>> Srinivas Neeli (1):
>>   can: xilinx_can: Fix the data phase btr1 calculation
>>
>> Venkatesh Yadav Abbarapu (1):
>>   can: xilinx_can: defer the probe if clock is not found
> 
> Please add your S-o-b to patches 4+5.
> 
> As these all are bugfixes please add a reference to the commit it fixes:
> 
>     Fixes: commitish ("description")

Add this to your ~/.gitconfig:

[alias]
        lfixes = log --pretty=fixes
[pretty]
        fixes = Fixes: %h (\"%s\")

and then use $(git lfixes $commitish).

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/5] can: xilinx_can: Bug fixes
  2019-08-12  9:10   ` Marc Kleine-Budde
@ 2019-08-12 10:18     ` Michal Simek
  2019-08-12 10:47       ` Marc Kleine-Budde
  0 siblings, 1 reply; 16+ messages in thread
From: Michal Simek @ 2019-08-12 10:18 UTC (permalink / raw)
  To: Marc Kleine-Budde, Appana Durga Kedareswara rao, wg, davem, michal.simek
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel

On 12. 08. 19 11:10, Marc Kleine-Budde wrote:
> On 8/12/19 11:05 AM, Marc Kleine-Budde wrote:
>> On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
>>> This patch series fixes below issues
>>> --> Bugs in the driver w.r.to CANFD 2.0 IP support
>>> --> Defer the probe if clock is not found
>>>
>>> Appana Durga Kedareswara rao (3):
>>>   can: xilinx_can: Fix FSR register handling in the rx path
>>>   can: xilinx_can: Fix the data updation logic for CANFD FD frames
>>>   can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0
>>>
>>> Srinivas Neeli (1):
>>>   can: xilinx_can: Fix the data phase btr1 calculation
>>>
>>> Venkatesh Yadav Abbarapu (1):
>>>   can: xilinx_can: defer the probe if clock is not found
>>
>> Please add your S-o-b to patches 4+5.
>>
>> As these all are bugfixes please add a reference to the commit it fixes:
>>
>>     Fixes: commitish ("description")
> 
> Add this to your ~/.gitconfig:
> 
> [alias]
>         lfixes = log --pretty=fixes
> [pretty]
>         fixes = Fixes: %h (\"%s\")

This is understandable and I have this in my .gitconfig for quite a long
time. And this is just log

> and then use $(git lfixes $commitish).

But what do you mean by this? Are you able to add this to commit message
just with sha1?

Thanks,
Michal




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/5] can: xilinx_can: Bug fixes
  2019-08-12 10:18     ` Michal Simek
@ 2019-08-12 10:47       ` Marc Kleine-Budde
  2019-08-12 10:57         ` Michal Simek
  0 siblings, 1 reply; 16+ messages in thread
From: Marc Kleine-Budde @ 2019-08-12 10:47 UTC (permalink / raw)
  To: Michal Simek, Appana Durga Kedareswara rao, wg, davem
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1883 bytes --]

On 8/12/19 12:18 PM, Michal Simek wrote:
> On 12. 08. 19 11:10, Marc Kleine-Budde wrote:
>> On 8/12/19 11:05 AM, Marc Kleine-Budde wrote:
>>> On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
>>>> This patch series fixes below issues
>>>> --> Bugs in the driver w.r.to CANFD 2.0 IP support
>>>> --> Defer the probe if clock is not found
>>>>
>>>> Appana Durga Kedareswara rao (3):
>>>>   can: xilinx_can: Fix FSR register handling in the rx path
>>>>   can: xilinx_can: Fix the data updation logic for CANFD FD frames
>>>>   can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0
>>>>
>>>> Srinivas Neeli (1):
>>>>   can: xilinx_can: Fix the data phase btr1 calculation
>>>>
>>>> Venkatesh Yadav Abbarapu (1):
>>>>   can: xilinx_can: defer the probe if clock is not found
>>>
>>> Please add your S-o-b to patches 4+5.
>>>
>>> As these all are bugfixes please add a reference to the commit it fixes:
>>>
>>>     Fixes: commitish ("description")
>>
>> Add this to your ~/.gitconfig:
>>
>> [alias]
>>         lfixes = log --pretty=fixes
>> [pretty]
>>         fixes = Fixes: %h (\"%s\")
> 
> This is understandable and I have this in my .gitconfig for quite a long
> time. And this is just log
> 
>> and then use $(git lfixes $commitish).
> 
> But what do you mean by this? Are you able to add this to commit message
> just with sha1?

First identify the commit that this patch fixes then go to the command
line and enter

    git lfixes $committish

and git will print out the line that you can copy directly to the commit
message.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/5] can: xilinx_can: Bug fixes
  2019-08-12 10:47       ` Marc Kleine-Budde
@ 2019-08-12 10:57         ` Michal Simek
  2019-08-12 10:59           ` Marc Kleine-Budde
  0 siblings, 1 reply; 16+ messages in thread
From: Michal Simek @ 2019-08-12 10:57 UTC (permalink / raw)
  To: Marc Kleine-Budde, Michal Simek, Appana Durga Kedareswara rao, wg, davem
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel

On 12. 08. 19 12:47, Marc Kleine-Budde wrote:
> On 8/12/19 12:18 PM, Michal Simek wrote:
>> On 12. 08. 19 11:10, Marc Kleine-Budde wrote:
>>> On 8/12/19 11:05 AM, Marc Kleine-Budde wrote:
>>>> On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
>>>>> This patch series fixes below issues
>>>>> --> Bugs in the driver w.r.to CANFD 2.0 IP support
>>>>> --> Defer the probe if clock is not found
>>>>>
>>>>> Appana Durga Kedareswara rao (3):
>>>>>   can: xilinx_can: Fix FSR register handling in the rx path
>>>>>   can: xilinx_can: Fix the data updation logic for CANFD FD frames
>>>>>   can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0
>>>>>
>>>>> Srinivas Neeli (1):
>>>>>   can: xilinx_can: Fix the data phase btr1 calculation
>>>>>
>>>>> Venkatesh Yadav Abbarapu (1):
>>>>>   can: xilinx_can: defer the probe if clock is not found
>>>>
>>>> Please add your S-o-b to patches 4+5.
>>>>
>>>> As these all are bugfixes please add a reference to the commit it fixes:
>>>>
>>>>     Fixes: commitish ("description")
>>>
>>> Add this to your ~/.gitconfig:
>>>
>>> [alias]
>>>         lfixes = log --pretty=fixes
>>> [pretty]
>>>         fixes = Fixes: %h (\"%s\")
>>
>> This is understandable and I have this in my .gitconfig for quite a long
>> time. And this is just log
>>
>>> and then use $(git lfixes $commitish).
>>
>> But what do you mean by this? Are you able to add this to commit message
>> just with sha1?
> 
> First identify the commit that this patch fixes then go to the command
> line and enter
> 
>     git lfixes $committish
> 
> and git will print out the line that you can copy directly to the commit
> message.

ok. I thought you have any nice way to directly add it to commit message
without c&p.

Thanks,
Michal


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/5] can: xilinx_can: Bug fixes
  2019-08-12 10:57         ` Michal Simek
@ 2019-08-12 10:59           ` Marc Kleine-Budde
  2019-08-12 11:05             ` Michal Simek
  0 siblings, 1 reply; 16+ messages in thread
From: Marc Kleine-Budde @ 2019-08-12 10:59 UTC (permalink / raw)
  To: Michal Simek, Appana Durga Kedareswara rao, wg, davem
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2279 bytes --]

On 8/12/19 12:57 PM, Michal Simek wrote:
> On 12. 08. 19 12:47, Marc Kleine-Budde wrote:
>> On 8/12/19 12:18 PM, Michal Simek wrote:
>>> On 12. 08. 19 11:10, Marc Kleine-Budde wrote:
>>>> On 8/12/19 11:05 AM, Marc Kleine-Budde wrote:
>>>>> On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
>>>>>> This patch series fixes below issues
>>>>>> --> Bugs in the driver w.r.to CANFD 2.0 IP support
>>>>>> --> Defer the probe if clock is not found
>>>>>>
>>>>>> Appana Durga Kedareswara rao (3):
>>>>>>   can: xilinx_can: Fix FSR register handling in the rx path
>>>>>>   can: xilinx_can: Fix the data updation logic for CANFD FD frames
>>>>>>   can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0
>>>>>>
>>>>>> Srinivas Neeli (1):
>>>>>>   can: xilinx_can: Fix the data phase btr1 calculation
>>>>>>
>>>>>> Venkatesh Yadav Abbarapu (1):
>>>>>>   can: xilinx_can: defer the probe if clock is not found
>>>>>
>>>>> Please add your S-o-b to patches 4+5.
>>>>>
>>>>> As these all are bugfixes please add a reference to the commit it fixes:
>>>>>
>>>>>     Fixes: commitish ("description")
>>>>
>>>> Add this to your ~/.gitconfig:
>>>>
>>>> [alias]
>>>>         lfixes = log --pretty=fixes
>>>> [pretty]
>>>>         fixes = Fixes: %h (\"%s\")
>>>
>>> This is understandable and I have this in my .gitconfig for quite a long
>>> time. And this is just log
>>>
>>>> and then use $(git lfixes $commitish).
>>>
>>> But what do you mean by this? Are you able to add this to commit message
>>> just with sha1?
>>
>> First identify the commit that this patch fixes then go to the command
>> line and enter
>>
>>     git lfixes $committish
>>
>> and git will print out the line that you can copy directly to the commit
>> message.
> 
> ok. I thought you have any nice way to directly add it to commit message
> without c&p.

You can insert the output from a console command in vim by adding a "!"
in front of it in the command mode.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/5] can: xilinx_can: Bug fixes
  2019-08-12 10:59           ` Marc Kleine-Budde
@ 2019-08-12 11:05             ` Michal Simek
  0 siblings, 0 replies; 16+ messages in thread
From: Michal Simek @ 2019-08-12 11:05 UTC (permalink / raw)
  To: Marc Kleine-Budde, Michal Simek, Appana Durga Kedareswara rao, wg, davem
  Cc: linux-can, netdev, linux-arm-kernel, linux-kernel

On 12. 08. 19 12:59, Marc Kleine-Budde wrote:
> On 8/12/19 12:57 PM, Michal Simek wrote:
>> On 12. 08. 19 12:47, Marc Kleine-Budde wrote:
>>> On 8/12/19 12:18 PM, Michal Simek wrote:
>>>> On 12. 08. 19 11:10, Marc Kleine-Budde wrote:
>>>>> On 8/12/19 11:05 AM, Marc Kleine-Budde wrote:
>>>>>> On 8/12/19 9:28 AM, Appana Durga Kedareswara rao wrote:
>>>>>>> This patch series fixes below issues
>>>>>>> --> Bugs in the driver w.r.to CANFD 2.0 IP support
>>>>>>> --> Defer the probe if clock is not found
>>>>>>>
>>>>>>> Appana Durga Kedareswara rao (3):
>>>>>>>   can: xilinx_can: Fix FSR register handling in the rx path
>>>>>>>   can: xilinx_can: Fix the data updation logic for CANFD FD frames
>>>>>>>   can: xilinx_can: Fix FSR register FL and RI mask values for canfd 2.0
>>>>>>>
>>>>>>> Srinivas Neeli (1):
>>>>>>>   can: xilinx_can: Fix the data phase btr1 calculation
>>>>>>>
>>>>>>> Venkatesh Yadav Abbarapu (1):
>>>>>>>   can: xilinx_can: defer the probe if clock is not found
>>>>>>
>>>>>> Please add your S-o-b to patches 4+5.
>>>>>>
>>>>>> As these all are bugfixes please add a reference to the commit it fixes:
>>>>>>
>>>>>>     Fixes: commitish ("description")
>>>>>
>>>>> Add this to your ~/.gitconfig:
>>>>>
>>>>> [alias]
>>>>>         lfixes = log --pretty=fixes
>>>>> [pretty]
>>>>>         fixes = Fixes: %h (\"%s\")
>>>>
>>>> This is understandable and I have this in my .gitconfig for quite a long
>>>> time. And this is just log
>>>>
>>>>> and then use $(git lfixes $commitish).
>>>>
>>>> But what do you mean by this? Are you able to add this to commit message
>>>> just with sha1?
>>>
>>> First identify the commit that this patch fixes then go to the command
>>> line and enter
>>>
>>>     git lfixes $committish
>>>
>>> and git will print out the line that you can copy directly to the commit
>>> message.
>>
>> ok. I thought you have any nice way to directly add it to commit message
>> without c&p.
> 
> You can insert the output from a console command in vim by adding a "!"
> in front of it in the command mode.

ok.
M



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-08-12 11:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 5/5] can: xilinx_can: Fix the data phase btr1 calculation Appana Durga Kedareswara rao
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).