Thread (1 message) 1 message, 1 author, 2011-03-24

Re: [PATCH resend] can: c_can: Fix tx_bytes accounting

From: Wolfgang Grandegger <hidden>
Date: 2011-03-24 11:49:03

On 03/24/2011 11:49 AM, Kurt Van Dijck wrote:
On Thu, Mar 24, 2011 at 12:26:50PM +0100, Jan Altenberg wrote:
quoted
The current SocketCAN implementation for the Bosch c_can cell doesn't
account the TX bytes correctly, because it calls
c_can_inval_msg_object() (which clears the msg ctrl register) before
reading the DLC value:

The fix is quite easy: Just move c_can_inval_msg_object() to the end of
the if() statement. So:
      * We only call c_can_inval_msg_object() if the message was
        actually transmitted
      * We read out the DLC value _before_ clearing the msg ctrl
        register

Signed-off-by: Jan Altenberg <redacted>
Acked-by: Kurt Van Dijck <kurt.van.dijck-/BeEPy95v10@public.gmane.org>
Acked-by: Wolfgang Grandegger <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help