* [PATCH] m_can: fixed typo in m_can_set_bittiming() causing corrupt DBTP register content
@ 2021-08-09 17:36 Hussein Alasadi
2021-08-09 18:10 ` Marc Kleine-Budde
0 siblings, 1 reply; 4+ messages in thread
From: Hussein Alasadi @ 2021-08-09 17:36 UTC (permalink / raw)
To: mkl; +Cc: linux-can
Hello everyone,
Fixed M_CAN_DBTP corrupt register contents:
* NBTP_xxx defines were being used instead of DBTP_xxx.
* reg_btp was not getting ORed with the possibly-existing DBTP_TDC flag.
------------------
Hussein Alasadi
ARECS GmbH
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 0cffaad905c2..f3809f4cfc7b 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1168,10 +1168,10 @@ static int m_can_set_bittiming(struct net_device *dev)
FIELD_PREP(TDCR_TDCO_MASK, tdco));
}
- reg_btp = FIELD_PREP(NBTP_NBRP_MASK, brp) |
- FIELD_PREP(NBTP_NSJW_MASK, sjw) |
- FIELD_PREP(NBTP_NTSEG1_MASK, tseg1) |
- FIELD_PREP(NBTP_NTSEG2_MASK, tseg2);
+ reg_btp |= FIELD_PREP(DBTP_DBRP_MASK, brp) |
+ FIELD_PREP(DBTP_DSJW_MASK, sjw) |
+ FIELD_PREP(DBTP_DTSEG1_MASK, tseg1) |
+ FIELD_PREP(DBTP_DTSEG2_MASK, tseg2);
m_can_write(cdev, M_CAN_DBTP, reg_btp);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] m_can: fixed typo in m_can_set_bittiming() causing corrupt DBTP register content
2021-08-09 17:36 [PATCH] m_can: fixed typo in m_can_set_bittiming() causing corrupt DBTP register content Hussein Alasadi
@ 2021-08-09 18:10 ` Marc Kleine-Budde
2021-08-09 20:25 ` Hussein Alasadi
0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2021-08-09 18:10 UTC (permalink / raw)
To: Hussein Alasadi; +Cc: linux-can
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
Hey Hussein Alasadi,
On 09.08.2021 17:36:52, Hussein Alasadi wrote:
> Fixed M_CAN_DBTP corrupt register contents:
> * NBTP_xxx defines were being used instead of DBTP_xxx.
> * reg_btp was not getting ORed with the possibly-existing DBTP_TDC flag.
Thanks for your patch!
Can you please re-send the patch with your "Signed-off-by:". For details
see:
https://elixir.bootlin.com/linux/v5.12/source/Documentation/process/submitting-patches.rst#L356
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] m_can: fixed typo in m_can_set_bittiming() causing corrupt DBTP register content
2021-08-09 18:10 ` Marc Kleine-Budde
@ 2021-08-09 20:25 ` Hussein Alasadi
2021-08-10 6:14 ` Marc Kleine-Budde
0 siblings, 1 reply; 4+ messages in thread
From: Hussein Alasadi @ 2021-08-09 20:25 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: linux-can
Hello Marc,
I hope it's in the correct format now.
Fixed M_CAN_DBTP corrupt register contents:
* NBTP_xxx defines were being used instead of DBTP_xxx.
* reg_btp was not getting ORed with the possibly-existing DBTP_TDC flag.
Signed-off-by: Hussein Alasadi <alasadi@arecs.eu>
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 0cffaad905c2..f3809f4cfc7b 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1168,10 +1168,10 @@ static int m_can_set_bittiming(struct net_device *dev)
FIELD_PREP(TDCR_TDCO_MASK, tdco));
}
- reg_btp = FIELD_PREP(NBTP_NBRP_MASK, brp) |
- FIELD_PREP(NBTP_NSJW_MASK, sjw) |
- FIELD_PREP(NBTP_NTSEG1_MASK, tseg1) |
- FIELD_PREP(NBTP_NTSEG2_MASK, tseg2);
+ reg_btp |= FIELD_PREP(DBTP_DBRP_MASK, brp) |
+ FIELD_PREP(DBTP_DSJW_MASK, sjw) |
+ FIELD_PREP(DBTP_DTSEG1_MASK, tseg1) |
+ FIELD_PREP(DBTP_DTSEG2_MASK, tseg2);
m_can_write(cdev, M_CAN_DBTP, reg_btp);
}
Mit freundlichen Grüßen,
H. Alasadi
Projektleiter Entwicklung
ARECS GmbH
Lindberghstr. 5
82178 Puchheim, Germany
ARECS Advanced Research, Engineering & Consulting Services GmbH
Amtsgericht München HRB 174075, Sitz der Gesellschaft: Puchheim bei München
-----Original Message-----
From: Marc Kleine-Budde <mkl@pengutronix.de>
Sent: Monday, 9 August 2021 8:11 PM
To: Hussein Alasadi <alasadi@arecs.eu>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH] m_can: fixed typo in m_can_set_bittiming() causing corrupt DBTP register content
Hey Hussein Alasadi,
On 09.08.2021 17:36:52, Hussein Alasadi wrote:
> Fixed M_CAN_DBTP corrupt register contents:
> * NBTP_xxx defines were being used instead of DBTP_xxx.
> * reg_btp was not getting ORed with the possibly-existing DBTP_TDC flag.
Thanks for your patch!
Can you please re-send the patch with your "Signed-off-by:". For details
see:
https://elixir.bootlin.com/linux/v5.12/source/Documentation/process/submitting-patches.rst#L356
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-10 6:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 17:36 [PATCH] m_can: fixed typo in m_can_set_bittiming() causing corrupt DBTP register content Hussein Alasadi
2021-08-09 18:10 ` Marc Kleine-Budde
2021-08-09 20:25 ` Hussein Alasadi
2021-08-10 6:14 ` Marc Kleine-Budde
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).