I plan to spend some time today tracking down the problem. I am most curious
to discover if there is a problem in the msg returned from send_dump_request().
$ sudo ./canconfig can0 state
can0 state: STOPPED
$ sudo ./canconfig can1 state
can1 state: STOPPED
$ sudo ./canconfig can2 state
can2: failed to get state
$ sudo ./canconfig can3 state
can3: failed to get state
$ ip -d -s link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes packets errors dropped overrun mcast
500 8 0 0 0 0
TX: bytes packets errors dropped carrier collsns
500 8 0 0 0 0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
qlen 1000
link/ether 00:11:2f:72:cc:4d brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
997317 7091 0 0 0 2
TX: bytes packets errors dropped carrier collsns
285592 3799 0 0 0 0
3: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN qlen 10
link/can
can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
bitrate 0 sample-point 0.000
tq 0 prop-seg 0 phase-seg1 0 phase-seg2 0 sjw 0
sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
4: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN qlen 10
link/can
can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
bitrate 0 sample-point 0.000
tq 0 prop-seg 0 phase-seg1 0 phase-seg2 0 sjw 0
sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
5: can2: <NOARP,ECHO> mtu 16 qdisc noop state DOWN qlen 10
link/can
can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
bitrate 0 sample-point 0.000
tq 0 prop-seg 0 phase-seg1 0 phase-seg2 0 sjw 0
sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
6: can3: <NOARP,ECHO> mtu 16 qdisc noop state DOWN qlen 10
link/can
can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
bitrate 0 sample-point 0.000
tq 0 prop-seg 0 phase-seg1 0 phase-seg2 0 sjw 0
sja1000: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
Mit freundlichen Grüssen / Yours sincerely,
James Kime
Entwicklung / Development
--------------------------------------------
IXXAT Automation GmbH
Leibnizstr. 15, 88250 Weingarten, Germany
Phone +49-751-56146-181
Fax +49-751-56146-29
mailto:[email protected]
http://www.ixxat.de
--------------------------------------------
PRIVILEGED AND CONFIDENTIAL.
Any unauthorized use or disclosure
is strictly prohibited.
--------------------------------------------
Sitz der Gesellschaft: Weingarten
Handelsregister Ulm HRB 551905
Geschäftsführer:
Dipl.-Ing. Christian Schlegel
--------------------------------------------
-----Original Message-----
From: Wolfgang Grandegger [mailto:[email protected]]
Sent: Thursday, December 08, 2011 8:15 PM
To: Kime, James
Cc: [email protected]; [email protected]
Subject: Re: CAN State Information
Hello James,
On 12/08/2011 09:43 AM, [email protected] wrote:
> Hello,
> Thanks for the response. I am using can_get_state() as part of my start_CAN
> routine. After, I call can_do_start(), I read the state to see if I need to
> do bus-off recovery. So it is not a frequent call. I was able to see the
> states correctly on all four CAN channels with "ip -d -s link".
OK, just to be sure. Does the "canconfig canX state" from the
Pengutronix canutils list the state correctly for any device?
I just tried here and it works fine.
> I updated the code in plx_pci.c to include support for the IXXAT card. I
> wanted to ask you how to submit the changes since I have not done it before.
> I attached a patch file.
Nice! A patch should be submitted as *inline* mail to the linux-can
*and* netdev mailing list with a proper subject, patch description and
signed-off-by line. The subject line should be something like:
"[PATCH net-next] can: plx_pci: add support for IXXAT PCI cards"
It's best to use git to create and send the patch but for simple patches
it doesn't really matter.
Wolfgang.
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core