Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1605083

Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

From Akshay Bhat <akshay.bhat@timesys.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver
Date 2017-03-20 20:10 +0100
Message-ID <tnaQO-K7-3@gated-at.bofh.it> (permalink)
References <tm7rY-495-3@gated-at.bofh.it> <tm9k5-5I7-17@gated-at.bofh.it> <tmLSq-8ir-21@gated-at.bofh.it> <tn7pU-6E2-21@gated-at.bofh.it> <tn8Fk-7tv-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Wolfgang,

On 03/20/2017 12:46 PM, Wolfgang Grandegger wrote:
..snip..
>>
>> The top 3 bits of HI3110_READ_ERR (BUSOFF, TXERRP, RXERRP) are valid
>> even if HI3110_INT_BUSERR is not set.
> 
> I'm confused! If you disable BUSERR interrupts, you do not get the
> status bits any longer, you said. But the manual says: "Bits 4:0 in the
> ERR register can be read to determine the source of the error.", which
> excludes the above bits... but obviously the controller does it that way.
> 

I agree this feature could use better documentation.

Based on testing:

If BUSERRIE bit in INTE is clear,
On cable disconnect: No interrupts related to bus errors are generated.
So status change messages do not go out.

If BUSERRIE bit in INTE is set,
On cable disconnect: Interrupts are generated due to ACKERR. The
interrupt routine reads the BUSOFF/TXERRP/RXERRP bits of ERR register
and reports the state. If CAN_CTRLMODE_BERR_REPORTING is set, then
protocol errors are also reported by the interrupt.
On cable re-connect: Interrupts are generated due to TXCPLT. The
interrupt routine reads the BUSOFF/TXERRP/RXERRP bits of ERR register
and reports the state.

Let me know if this helps clear things up :)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 1/2] can: holt_hi311x: document device tree bindings Akshay Bhat <akshay.bhat@timesys.com> - 2017-03-17 22:20 +0100
  [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Akshay Bhat <akshay.bhat@timesys.com> - 2017-03-18 00:20 +0100
    Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Wolfgang Grandegger <wg@grandegger.com> - 2017-03-19 17:30 +0100
      Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Akshay Bhat <akshay.bhat@timesys.com> - 2017-03-20 16:30 +0100
        Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Wolfgang Grandegger <wg@grandegger.com> - 2017-03-20 17:50 +0100
          Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Akshay Bhat <akshay.bhat@timesys.com> - 2017-03-20 20:10 +0100
    Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Akshay Bhat <akshay.bhat@timesys.com> - 2017-03-24 18:30 +0100

csiph-web