[PATCH v2 0/2] can: CAN_C changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This includes two patches for the C_CAN. The first one is D_CAN
specific though. The state issue is easily reproducable, with
nothing connected to the CAN-bus, do:

ip link set can0 up type can bitrate 250000
cansend can0 123#1122334455667788
ifconfig can0 down
ifconfig can0 up
ip -details link show can0

2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0
    can state ERROR-ACTIVE (berr-counter tx 128 rx 0) restart-ms 0
      bitrate 250000 sample-point 0.875
      tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
      c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
      clock 24000000numtxqueues 1 gso_max_size 65536 gso_max_segs 65535

And then the interface reports it is error active, while the
error counters reveal it is actually error passive.

After this patch it is:
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
    link/can  promiscuity 0 minmtu 0 maxmtu 0 
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0 
	  bitrate 250000 sample-point 0.875
	  tq 250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
	  c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
	  clock 24000000numtxqueues 1 gso_max_size 65536 gso_max_segs 65535

The other patch adds events when the state is going down and goes through
error warning again when the bus recovers.

v2:
  * rename the static software_reset to c_can_software_reset
  * fix typo s/update/updated in the commit description
  * add tags from Kurt Van Dijck

Jeroen Hofstee (2):
  can: D_CAN: perform a sofware reset on open
  can: C_CAN: add bus recovery events

 drivers/net/can/c_can/c_can.c | 46 +++++++++++++++++++++++++++++++++--
 1 file changed, 44 insertions(+), 2 deletions(-)

-- 
2.17.1





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux