]> rtime.felk.cvut.cz Git - socketcan-devel.git/log
socketcan-devel.git
13 years agoUpdated slcan Kconfig entry for mainlining.
hartkopp [Mon, 29 Nov 2010 19:33:19 +0000 (19:33 +0000)]
Updated slcan Kconfig entry for mainlining.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1218 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocandump: Added '-u <usecs>' commandline option to delay bridged CAN frames by
hartkopp [Mon, 29 Nov 2010 19:11:11 +0000 (19:11 +0000)]
candump: Added '-u <usecs>' commandline option to delay bridged CAN frames by
usecs microseconds.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1217 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocangen: Added '-n <count>' commandline option analogue to candump tool.
hartkopp [Mon, 29 Nov 2010 18:58:12 +0000 (18:58 +0000)]
cangen: Added '-n <count>' commandline option analogue to candump tool.
Inspired by Uwe Bonnes.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1216 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoAdded missing #include redirections.
hartkopp [Tue, 23 Nov 2010 09:41:17 +0000 (09:41 +0000)]
Added missing #include redirections.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1215 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoAdded new documentation layout contributed by Daniele Venzano.
hartkopp [Mon, 22 Nov 2010 19:41:13 +0000 (19:41 +0000)]
Added new documentation layout contributed by Daniele Venzano.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1214 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcand : added new commandline option to support direct assignment of a CAN
hartkopp [Fri, 19 Nov 2010 19:52:39 +0000 (19:52 +0000)]
slcand : added new commandline option to support direct assignment of a CAN
netdevice name to the given tty (by renaming the created netdevice).

Signed-off-by: Robert Haddon <robert.haddon@cirrascale.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1213 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan: let network statistic handling look like in slip.c
hartkopp [Thu, 18 Nov 2010 21:31:41 +0000 (21:31 +0000)]
slcan: let network statistic handling look like in slip.c

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1212 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan: clean up #includes
hartkopp [Thu, 18 Nov 2010 20:36:40 +0000 (20:36 +0000)]
slcan: clean up #includes

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1211 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan: This commit reverts commit rev1171 that has been done to
hartkopp [Thu, 18 Nov 2010 20:19:23 +0000 (20:19 +0000)]
slcan: This commit reverts commit rev1171 that has been done to
enable the swtc char hack. Once swtc has gone the upstream commit
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5342b77c4123ba39f911d92a813295fb3bb21f69
is restored now to his original extend.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1210 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoMostly cosmetic changes to make the code look similar to the latest
hartkopp [Thu, 18 Nov 2010 19:51:14 +0000 (19:51 +0000)]
Mostly cosmetic changes to make the code look similar to the latest
net-next-2.6/drivers/net/slip.c code where it has been updated since
we branched slcan.c.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1209 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan: Remove unused debug stuff.
hartkopp [Wed, 17 Nov 2010 18:43:00 +0000 (18:43 +0000)]
slcan: Remove unused debug stuff.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1208 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan: Change copyright/module author according to the real maintainer.
hartkopp [Wed, 17 Nov 2010 18:35:54 +0000 (18:35 +0000)]
slcan: Change copyright/module author according to the real maintainer.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1207 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan: Create netdevice names 'slcan%d' instead of 'can%d' to make it easier to
hartkopp [Wed, 17 Nov 2010 18:27:37 +0000 (18:27 +0000)]
slcan: Create netdevice names 'slcan%d' instead of 'can%d' to make it easier to
rename the netdevices to wanted assignments.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1206 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan: Revert SVN commit r1170 (SWTC char hack), as it is superfluous.
hartkopp [Wed, 17 Nov 2010 18:23:18 +0000 (18:23 +0000)]
slcan: Revert SVN commit r1170 (SWTC char hack), as it is superfluous.
https://lists.berlios.de/pipermail/socketcan-users/2010-November/001652.html

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1205 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan_attach: Added new commandline option to specify the created netdevice name.
hartkopp [Wed, 17 Nov 2010 11:55:46 +0000 (11:55 +0000)]
slcan_attach: Added new commandline option to specify the created netdevice name.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1204 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoslcan_attach: Print the name of the assigned netdevice after attaching the tty.
hartkopp [Wed, 17 Nov 2010 06:59:20 +0000 (06:59 +0000)]
slcan_attach: Print the name of the assigned netdevice after attaching the tty.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1203 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoisotp: the timestamp for rx stmin enforcement was reset in the function that
hartkopp [Mon, 15 Nov 2010 15:08:36 +0000 (15:08 +0000)]
isotp: the timestamp for rx stmin enforcement was reset in the function that
receives the flow control. Of course it has to be in the funtion that sends
the FC to the sender of the data. :-(
This patch fixes the rx/tx issue.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1202 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoAdded new socketoptions to force the isotp protocol to intentionally
hartkopp [Sun, 14 Nov 2010 08:55:06 +0000 (08:55 +0000)]
Added new socketoptions to force the isotp protocol to intentionally
misbehave for regression tests.

CAN_ISOTP_TX_STMIN:
Set a value in nano secs that's used as minimum CF gap by the sender.
This value is used instead of the value provided by the receiver inside the FC.

CAN_ISOTP_RX_STMIN:
Ignores received CF frames which timestamps differ less than this value in nano
secs. This is used to test the receivers misbehaviour when the receiver
provides a lower stmin value that he's able to cope with. Received CF frames
are silently dropped when they come faster than specified by this value.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1201 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan-bcm: fix minor heap overflow
hartkopp [Sat, 13 Nov 2010 16:43:29 +0000 (16:43 +0000)]
can-bcm: fix minor heap overflow

On 64-bit platforms the ASCII representation of a pointer may be up to 17
bytes long. This patch increases the length of the buffer accordingly.

http://marc.info/?l=linux-netdev&m=128872251418192&w=2

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Upstream Commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=0597d1b99fcfc2c0eada09a698f85ed413d4ba84

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1200 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan-raw: add msg_flags to distinguish local traffic
hartkopp [Fri, 22 Oct 2010 05:24:03 +0000 (05:24 +0000)]
can-raw: add msg_flags to distinguish local traffic

CAN has no addressing scheme. It is currently impossible for userspace
to tell is a received CAN frame comes from another process on the local
host, or from a remote CAN device.

This patch add support for userspace applications to distinguish between
'own', 'local' and 'remote' CAN traffic. The distinction is made by returning
flags in msg->msg_flags in the call to recvmsg().

The added documentation explains the introduced flags.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Upstream commit:
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=1e55659ce6ddb5247cee0b1f720d77a799902b85

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1199 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoAdded information how to obtain timestamps as suggested by
hartkopp [Thu, 30 Sep 2010 12:51:54 +0000 (12:51 +0000)]
Added information how to obtain timestamps as suggested by
Daniele Venzano <venza@brownhat.org>. Extended the possibility
to get timestamps via recvmsg().

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1198 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoFix datatype issue in sscanf() on 64bit systems.
hartkopp [Sat, 25 Sep 2010 10:24:37 +0000 (10:24 +0000)]
Fix datatype issue in sscanf() on 64bit systems.

On 64bit systems a 'long' is a 64bit value but the target values of scanf()
are always 32bit in the affected code - which means just an 'unsigned int'.
Unsigned int is fine on 32 and 64 bit systems.

Thanks to Andre Naujoks for reporting this issue.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1197 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoAdded support for inverted CAN ID filters.
hartkopp [Fri, 24 Sep 2010 18:23:42 +0000 (18:23 +0000)]
Added support for inverted CAN ID filters.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1196 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoFixed calculation of needed bits on the physical wire according Ken Tindells
hartkopp [Fri, 24 Sep 2010 17:56:53 +0000 (17:56 +0000)]
Fixed calculation of needed bits on the physical wire according Ken Tindells
*worst* case calculation for stuff-bits.
(see "Guaranteeing Message Latencies on Controller Area Network" 1st ICC'94)
Due to the bitstuffing estimation the calculated busload may exceed 100%.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1195 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan: add limit for nframes and clean up signed/unsigned variables
hartkopp [Fri, 13 Aug 2010 16:15:16 +0000 (16:15 +0000)]
can: add limit for nframes and clean up signed/unsigned variables

This patch adds a limit for nframes as the number of frames in TX_SETUP and
RX_SETUP are derived from a single byte multiplex value by default.
Use-cases that would require to send/filter more than 256 CAN frames should
be implemented in userspace for complexity reasons anyway.

Additionally the assignments of unsigned values from userspace to signed
values in kernelspace and vice versa are fixed by using unsigned values in
kernelspace consistently.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Reported-by: Ben Hawkes <hawkes@google.com>
Acked-by: Urs Thuermann <urs.thuermann@volkswagen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Upstream commit:
http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=5b75c4973ce779520b9d1e392483207d6f842cde

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1194 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoUpdated tool for a userfriendly result output.
hartkopp [Mon, 9 Aug 2010 14:00:21 +0000 (14:00 +0000)]
Updated tool for a userfriendly result output.

user@host:~/socketcan/trunk/test$ /bin/ip link show vcan0
9: vcan0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc noqueue state UNKNOWN
    link/can
user@host:~/socketcan/trunk/test$ ./tst-rcv-own-msgs vcan0
Starting PF_CAN frame flow test.
checking socket default settings ... ok.
check loopback 0 recv_own_msgs 0 ... ok.
check loopback 0 recv_own_msgs 1 ... ok.
check loopback 1 recv_own_msgs 0 ... ok.
check loopback 1 recv_own_msgs 1 ... ok.
PF_CAN frame flow test was successful.
user@hosts:~/socketcan/trunk/test$ echo $?
0

Remarks:

No need to make sure (in a script) that the CAN device has IFF_ECHO flags set!

e.g. with
/bin/ip link show vcan0 | grep -c ECHO

The return code of tst-rcv-own-msgs is
0 (success)
1 (failure)

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1193 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoAdded mandatory commandline option to specify the CAN network device.
hartkopp [Thu, 29 Jul 2010 09:44:09 +0000 (09:44 +0000)]
Added mandatory commandline option to specify the CAN network device.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1192 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoAdded test programm to check the correct functionality of
hartkopp [Thu, 29 Jul 2010 09:11:12 +0000 (09:11 +0000)]
Added test programm to check the correct functionality of
CAN_RAW_LOOPBACK and CAN_RAW_RECV_OWN_MSGS socket options.

It needs a vcan0 virtual CAN network interface and should produce an output like this, when invoked:

sockopt default
 t : 0
 timeout
sockopt - -
 timeout
sockopt - R
 timeout
sockopt L -
 t : 3
 timeout
sockopt L R
 s : 4
 t : 4
 timeout
done.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1191 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan-calc-bit-timing: remove rtcantl1
bet-frogger [Tue, 20 Jul 2010 14:10:38 +0000 (14:10 +0000)]
can-calc-bit-timing: remove rtcantl1

No one can verify the timing parameters to be correct.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1190 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan-calc-bit-timing: add more can controller definitions and ref clocks
bet-frogger [Tue, 20 Jul 2010 13:43:20 +0000 (13:43 +0000)]
can-calc-bit-timing: add more can controller definitions and ref clocks

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1189 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan-calc-bit-timing: calculate bit timings for all known controllers by default
bet-frogger [Tue, 20 Jul 2010 13:43:16 +0000 (13:43 +0000)]
can-calc-bit-timing: calculate bit timings for all known controllers by default

When testing or improving the bit timing algorithm, you're probably
interested in the values of all can controllers. Further you might not
know the all reference clocks of the controllers.

This patch add a "ref_clock" member to the "struct can_bittiming_const"
that holds the reference clock of the controller in Hz.

By default now the bit timing is calculated for all known can
controllers with the default ref_clock defined in "can_bittiming_const".

It's still possible to overwrite the ref clock with the command line
option "-c".

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1188 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan-calc-bit-timing: improve printing of bit timing parameters
bet-frogger [Tue, 20 Jul 2010 13:43:12 +0000 (13:43 +0000)]
can-calc-bit-timing: improve printing of bit timing parameters

This patch adds additional fields when printing the bit timing
parameters. Now the real bitrate the nominal and the real sample point
as well as the error of the sample point is displayed.

The output now looks like this:

Bit timing parameters for at91 with 100.000000 MHz ref clock
nominal                                 real Bitrt   nom  real SampP
Bitrate TQ[ns] PrS PhS1 PhS2 SJW BRP Bitrate Error SampP SampP Error     CAN_BR
1000000     50   7    7    5   1   5 1000000  0.0% 75.0% 75.0%  0.0% 0x00040664
 800000     50   8    8    8   1   5  800000  0.0% 80.0% 68.0% 15.0% 0x00040777
 500000    100   8    8    3   1  10  500000  0.0% 87.5% 85.0%  2.9% 0x00090772
 250000    250   6    7    2   1  25  250000  0.0% 87.5% 87.5%  0.0% 0x00180561
 125000    500   6    7    2   1  50  125000  0.0% 87.5% 87.5%  0.0% 0x00310561
 100000    500   8    8    3   1  50  100000  0.0% 87.5% 85.0%  2.9% 0x00310772
  50000   1250   6    7    2   1 125   50000  0.0% 87.5% 87.5%  0.0% 0x007c0561
  20000 ***bitrate not possible***
  10000 ***bitrate not possible***

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1187 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan-calc-bit-timing: use algorithm from the kernel
bet-frogger [Tue, 20 Jul 2010 13:43:08 +0000 (13:43 +0000)]
can-calc-bit-timing: use algorithm from the kernel

This patch copies the algorithm functions (can_update_spt and
can_calc_bittiming) from the kernel. Then some glue code is added that
these functions compile in userspace.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1186 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agocan-calc-bit-timing: fix indention
bet-frogger [Tue, 20 Jul 2010 13:43:04 +0000 (13:43 +0000)]
can-calc-bit-timing: fix indention

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1185 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoadd can-calc-bit-timing to Makefiles + gitignore
bet-frogger [Tue, 20 Jul 2010 13:43:01 +0000 (13:43 +0000)]
add can-calc-bit-timing to Makefiles + gitignore

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1184 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoadd can-calc-bit-timing
bet-frogger [Tue, 20 Jul 2010 13:42:57 +0000 (13:42 +0000)]
add can-calc-bit-timing

Add the tool as sent by Wolfgang via email
(<4BE152D2.6060306@grandegger.com>).

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1183 030b6a49-0b11-0410-94ab-b0dab22257f2

13 years agoAdded PCI device ID for the PCAN Express Card hardware.
hartkopp [Tue, 22 Jun 2010 20:41:17 +0000 (20:41 +0000)]
Added PCI device ID for the PCAN Express Card hardware.
Updated module descriptions with PCIe(xpress).

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1182 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoMake protected command register access CONFIG_SMP unconditional.
hartkopp [Wed, 19 May 2010 16:21:00 +0000 (16:21 +0000)]
Make protected command register access CONFIG_SMP unconditional.
Added missing spin_lock_init() for the defined locking variable.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1181 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoFix writes to the SJA1000 command register on SMP systems.
hartkopp [Mon, 17 May 2010 10:22:59 +0000 (10:22 +0000)]
Fix writes to the SJA1000 command register on SMP systems.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1180 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoRemove compiler warning :
hartkopp [Fri, 14 May 2010 12:50:17 +0000 (12:50 +0000)]
Remove compiler warning :
warning: suggest explicit braces to avoid ambiguous â€˜else’

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1179 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded isotpserver in autotool config file and gitignore
hartkopp [Fri, 14 May 2010 12:43:42 +0000 (12:43 +0000)]
Added isotpserver in autotool config file and gitignore

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1178 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded tiny ip server to send ISO 15765-2 PDUs via internetsockets to the CAN bus...
hartkopp [Fri, 14 May 2010 12:03:32 +0000 (12:03 +0000)]
Added tiny ip server to send ISO 15765-2 PDUs via internetsockets to the CAN bus and vice versa.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1177 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAllow to have 4, 5 or 6 decimal places instead of only 4 & 6.
hartkopp [Tue, 11 May 2010 10:01:49 +0000 (10:01 +0000)]
Allow to have 4, 5 or 6 decimal places instead of only 4 & 6.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1176 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoUpdated gwtest.c to latest netlink CAN GW API.
hartkopp [Tue, 27 Apr 2010 06:03:58 +0000 (06:03 +0000)]
Updated gwtest.c to latest netlink CAN GW API.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1175 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoadd autotools infrastructure
bet-frogger [Mon, 19 Apr 2010 12:12:18 +0000 (12:12 +0000)]
add autotools infrastructure

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1174 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoadd .gitignore
bet-frogger [Mon, 19 Apr 2010 12:12:04 +0000 (12:12 +0000)]
add .gitignore

This may be usefull once the can-utils are migrated to git.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1173 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agocangw: replace obsolete bzero by memset
bet-frogger [Mon, 19 Apr 2010 12:11:49 +0000 (12:11 +0000)]
cangw: replace obsolete bzero by memset

uclibc for example doesn't implement bzero

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1172 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoThe cleanup of slc_alloc() integrated in SVN Rev1095 based on upstream commit
hartkopp [Sun, 18 Apr 2010 09:03:15 +0000 (09:03 +0000)]
The cleanup of slc_alloc() integrated in SVN Rev1095 based on upstream commit
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5342b77c4123ba39f911d92a813295fb3bb21f69
was not really Kernel-version depended ...

So far this code section is needed for the changes added in SVN Rev1170 so we
would need to revisit this code when mainlining the driver.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1171 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded possibility to force the slcan driver to use a specific device number
hartkopp [Fri, 16 Apr 2010 19:39:09 +0000 (19:39 +0000)]
Added possibility to force the slcan driver to use a specific device number
when set via SWTC char (e.g. with stty). See thread
https://lists.berlios.de/pipermail/socketcan-users/2010-April/001378.html
Provided by Stephen Hellriegel <Stephen.Hellriegel@verari.com>
So far this change only applies for Kernels < 2.6.32 ...

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1170 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoThere is no reason why the 'real' SLCAN interfaces should have a different
hartkopp [Fri, 16 Apr 2010 19:08:34 +0000 (19:08 +0000)]
There is no reason why the 'real' SLCAN interfaces should have a different
naming scheme than other 'real' CAN interfaces.
So create canX instead of slcX network device names with the slcan driver.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1169 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAs Stephen Hellriegel pointed out in
hartkopp [Fri, 16 Apr 2010 19:03:14 +0000 (19:03 +0000)]
As Stephen Hellriegel pointed out in
https://lists.berlios.de/pipermail/socketcan-users/2010-April/001378.html
it does not make sense to monitor the tx data flow in the slcan driver as
we do not know anything about the CAN specific problems that may occur in the
slcan device.

Therefore we just wait until the ASCII data is sent on the serial line without
having a separate timeout handler in the slcan driver.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1168 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded CRC8 profiles to handle additional data for checksum generation.
hartkopp [Fri, 16 Apr 2010 08:46:17 +0000 (08:46 +0000)]
Added CRC8 profiles to handle additional data for checksum generation.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1167 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded checksum functionality and some documentation in gw.h
hartkopp [Mon, 12 Apr 2010 14:41:14 +0000 (14:41 +0000)]
Added checksum functionality and some documentation in gw.h

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1166 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoComplete rework of CAN netlink gateway.
hartkopp [Sat, 10 Apr 2010 16:38:48 +0000 (16:38 +0000)]
Complete rework of CAN netlink gateway.

Major changes:

- rework internal structures to prepare routings and modifications of CAN traffic also to non-CAN interfaces
- fix reading of netlink messages in cangw.c (added RTCAN_RTA / RTCAN_PAYLOAD macros)
- rework reading of gw-job lists in cgw_dump_jobs()
- rename of functions and API definitions to have a common namespace cgw_
- added infrastructure to perform crc8 and xor checksums in CAN frame data[]

TODO:

- add and test functionality for crc8 and xor checksums in CAN frame data[]
- add help text for crc8 and xor checksums in CAN frame data[]

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1165 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoThese issues have been solved already
hartkopp [Thu, 25 Mar 2010 19:32:43 +0000 (19:32 +0000)]
These issues have been solved already

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1164 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoSome binaries in can-utils depend on features in the socket-can svn
hartkopp [Wed, 17 Mar 2010 19:21:38 +0000 (19:21 +0000)]
Some binaries in can-utils depend on features in the socket-can svn
repository. Building with exported headers from an unpatched kernel will
fail due to missing symbols or headers.

This patch adds two make variables to optionally disable building such
binaries, like this:

make PROGRAMS_ISOTP= PROGRAMS_CANGW= PROGRAMS_SLCAN= all

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1163 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoTo simplify packaging of can-utils, add DESTDIR and PREFIX support to
hartkopp [Wed, 17 Mar 2010 19:12:26 +0000 (19:12 +0000)]
To simplify packaging of can-utils, add DESTDIR and PREFIX support to
the can-utils Makefile.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1162 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoReduce codesize by using a macro.
hartkopp [Fri, 12 Mar 2010 16:48:13 +0000 (16:48 +0000)]
Reduce codesize by using a macro.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1161 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoat91_can: sync with mainline kernel version (minor issues)
wolf [Fri, 5 Mar 2010 21:23:46 +0000 (21:23 +0000)]
at91_can: sync with mainline kernel version (minor issues)

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1160 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agomscan: sync with mainline kernel version (minor issues)
wolf [Fri, 5 Mar 2010 21:23:08 +0000 (21:23 +0000)]
mscan: sync with mainline kernel version (minor issues)

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1159 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agosja1000: sync with mainline kernel version (minor issues)
wolf [Fri, 5 Mar 2010 21:21:00 +0000 (21:21 +0000)]
sja1000: sync with mainline kernel version (minor issues)

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1158 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agosja1000: some minor white space fixes
wolf [Fri, 5 Mar 2010 20:53:22 +0000 (20:53 +0000)]
sja1000: some minor white space fixes

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1157 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agodrivers/net/: use DEFINE_PCI_DEVICE_TABLE()
wolf [Fri, 5 Mar 2010 20:41:36 +0000 (20:41 +0000)]
drivers/net/: use DEFINE_PCI_DEVICE_TABLE()

Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct sec
in every case.

From net-next-2.6 commit a3aa18842a5303fc28fcc4d57dbd16618bd830a0 with
proper version dependencies.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1156 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoRename modprobe file to can.conf to be placed in /etc/modprobe.d without problems.
hartkopp [Fri, 5 Mar 2010 10:58:23 +0000 (10:58 +0000)]
Rename modprobe file to can.conf to be placed in /etc/modprobe.d without problems.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1155 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoplx_pci: fix white space issue with KERNEL_VERSION to get strip-src working
wolf [Fri, 5 Mar 2010 09:16:56 +0000 (09:16 +0000)]
plx_pci: fix white space issue with KERNEL_VERSION to get strip-src working

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1154 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agocan: netlink support for bus-error reporting and counters
wolf [Fri, 5 Mar 2010 09:11:52 +0000 (09:11 +0000)]
can: netlink support for bus-error reporting and counters

This patch makes the bus-error reporting configurable and allows to
retrieve the CAN TX and RX bus error counters via netlink interface.
I have added support for the SJA1000. The TX and RX bus error counters
are also copied to the data fields 6..7 of error messages when state
changes are reported.

From net-next-2.6 commit 52c793f24054f5dc30d228e37e0e19cc8313f086

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1153 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoInitialize packet counters when printing each routing entry.
hartkopp [Thu, 4 Mar 2010 10:59:24 +0000 (10:59 +0000)]
Initialize packet counters when printing each routing entry.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1152 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded two missing kernel version depencies.
hartkopp [Sun, 28 Feb 2010 14:58:11 +0000 (14:58 +0000)]
Added two missing kernel version depencies.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1151 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoRework of help text.
hartkopp [Sat, 27 Feb 2010 16:07:58 +0000 (16:07 +0000)]
Rework of help text.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1150 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoDeclare local modification functions as static.
hartkopp [Sat, 27 Feb 2010 15:55:14 +0000 (15:55 +0000)]
Declare local modification functions as static.
Fix typo.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1149 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoWhen sending a sequence, we need to resend the same frame when poll() returns.
hartkopp [Fri, 26 Feb 2010 08:38:47 +0000 (08:38 +0000)]
When sending a sequence, we need to resend the same frame when poll() returns.
Fixed that to be a valid data source e.g. for ptx cansequence.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1148 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded commandline option '-p <timeout>' to enable polling on the writing socket.
hartkopp [Thu, 25 Feb 2010 20:53:19 +0000 (20:53 +0000)]
Added commandline option '-p <timeout>' to enable polling on the writing socket.
Inspired by Marc Kleine-Budde :-)

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1147 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agosofting_cs: fix for net-next-2.6 (2.6.33+)
hartkopp [Thu, 25 Feb 2010 17:10:40 +0000 (17:10 +0000)]
softing_cs: fix for net-next-2.6 (2.6.33+)

The pcmcia_request_window() is postponed a little, as some flags must be
set before this call (I believe). It is a small change, but with some
noise in the patch. Same with softing_card_irq().

The netif_start_queue() is omitted, as softing_cycle() does a
netif_wake_queue().

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1146 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agocan: mscan-mpc5xxx: fix broken support for the MPC5200
hartkopp [Thu, 25 Feb 2010 08:04:22 +0000 (08:04 +0000)]
can: mscan-mpc5xxx: fix broken support for the MPC5200
Due to an invalid "#ifdef CONFIG_PPC_MPC5200", the real clock setup
function was not called for the MPC5200.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Upstream commit
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=c5bab5e94d148aee2c852450374143c89aa56511

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1145 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded funtionality to flush all GW jobs in one netlink message.
hartkopp [Tue, 23 Feb 2010 19:13:17 +0000 (19:13 +0000)]
Added funtionality to flush all GW jobs in one netlink message.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1144 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded Kconfig entry for the CAN Gateway/Router.
hartkopp [Tue, 23 Feb 2010 18:18:50 +0000 (18:18 +0000)]
Added Kconfig entry for the CAN Gateway/Router.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1143 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoBeautify the listing of registered gwjobs (cangw -L).
hartkopp [Mon, 22 Feb 2010 18:57:45 +0000 (18:57 +0000)]
Beautify the listing of registered gwjobs (cangw -L).

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1142 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded missing include for rcu hlist.
hartkopp [Mon, 22 Feb 2010 11:26:02 +0000 (11:26 +0000)]
Added missing include for rcu hlist.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1141 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded feature to list created gateway jobs.
hartkopp [Mon, 22 Feb 2010 09:57:12 +0000 (09:57 +0000)]
Added feature to list created gateway jobs.
Also added some fixes and removed debug printf's.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1140 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded netlink error message support to be able to provide return values.
hartkopp [Sun, 21 Feb 2010 12:34:34 +0000 (12:34 +0000)]
Added netlink error message support to be able to provide return values.
Renamed some structure elements. Updated usage text.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1139 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoMoved kernel parsing of netlink attributes into can_can_parse_attr().
hartkopp [Sat, 20 Feb 2010 20:41:24 +0000 (20:41 +0000)]
Moved kernel parsing of netlink attributes into can_can_parse_attr().
Added functionalitiy to remove formerly created CAN GW jobs.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1138 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoCopy the struct members separately to ensure that no uninitialized
hartkopp [Sat, 20 Feb 2010 18:04:56 +0000 (18:04 +0000)]
Copy the struct members separately to ensure that no uninitialized
data are copied in the 3 bytes hole of the struct. This is needed
to make easy compares of the data in the struct can_can_gw.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1137 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded cangw netlink gateway configuration tool.
hartkopp [Fri, 19 Feb 2010 13:33:59 +0000 (13:33 +0000)]
Added cangw netlink gateway configuration tool.

TODO (in both cangw and can-gw.ko) : Support removal and listing of rules.
So far the gateway jobs are only removed on can-gw.ko module unload or when
the used CAN netdevices disappear.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1136 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoems_pcmcia: Fix compiler errors with recent net-next-2.6
wolf [Fri, 19 Feb 2010 09:02:36 +0000 (09:02 +0000)]
ems_pcmcia: Fix compiler errors with recent net-next-2.6

Fix compiler errors with recent net-next-2.6 for 2.6.33
- Removed IRQInfo1 (as for irq_req_t)
- window_handle_t is now unsigned long instead of window_t*
- pcmcia_request_window needs now only a pointer, not pointer to pointer
- pass struct pcmcia_device pointer to pcmcia_map_mem_page
- Replaced cs_error function with dbg_err

Signed-off-by: Markus Plessing <plessing@ems-wuensche.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1135 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoConsistently rename LOOPBACK to ECHO to meet IFF_ECHO for CAN.
hartkopp [Fri, 19 Feb 2010 08:07:37 +0000 (08:07 +0000)]
Consistently rename LOOPBACK to ECHO to meet IFF_ECHO for CAN.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1134 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded include for gw.h to be accessed by can-utils.
hartkopp [Fri, 19 Feb 2010 07:46:56 +0000 (07:46 +0000)]
Added include for gw.h to be accessed by can-utils.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1133 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agodoc fix. Struct can_filter is only 8 bytes long.
hartkopp [Fri, 19 Feb 2010 07:24:35 +0000 (07:24 +0000)]
doc fix. Struct can_filter is only 8 bytes long.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1132 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoGrrr. Fixed previous commit which was using the wrong skb ... and a typo.
hartkopp [Fri, 19 Feb 2010 07:10:02 +0000 (07:10 +0000)]
Grrr. Fixed previous commit which was using the wrong skb ... and a typo.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1131 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded flag to preserve the timestamp from the source device when routing
hartkopp [Fri, 19 Feb 2010 07:06:17 +0000 (07:06 +0000)]
Added flag to preserve the timestamp from the source device when routing
the CAN frame (which saves some time, if the timestamp is not needed).
Usually the skb->tstamp is cleared which makes the destination interface
create a new timestamp (e.g. when the frame hit's the bus) on loopback.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1130 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoSwapped the parameters inside the modifier attribute to have the aligned
hartkopp [Fri, 19 Feb 2010 05:12:49 +0000 (05:12 +0000)]
Swapped the parameters inside the modifier attribute to have the aligned
struct can_frame the first parameter. This allows the usage of 'packed'
structs in userspace with an aligned access to the CAN frame structures.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1129 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoCorrect frame counter in gw_rcv.
hartkopp [Thu, 18 Feb 2010 21:43:42 +0000 (21:43 +0000)]
Correct frame counter in gw_rcv.
Fix error path in gw_create_job() to prevent double put of netdevs.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1128 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoAdded netlink powered CAN gateway functionality with CAN frame modification features.
hartkopp [Thu, 18 Feb 2010 18:37:20 +0000 (18:37 +0000)]
Added netlink powered CAN gateway functionality with CAN frame modification features.
TODO: Implement removal of single routing entries / Dump complete entries with packet counters.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1127 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoesd_usb2: fix compile warnings with 2.6.32
wolf [Mon, 15 Feb 2010 09:43:44 +0000 (09:43 +0000)]
esd_usb2: fix compile warnings with 2.6.32

Check the return value of device_create_file to make gcc happy.

Signed-off-by: Daniel Baluta <daniel.baluta@gmail.com>
Reported-by: Thorsten Godau <dl9sec@gmx.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1126 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoplx_pci: sync with net-next-2.6
wolf [Thu, 11 Feb 2010 12:33:56 +0000 (12:33 +0000)]
plx_pci: sync with net-next-2.6

This patch makes the plx_pci driver in the BerliOS repo same as in
net-next-2.6

Changes since previous revision (1120):
- Added some defines for static inline int plx_pci_check_sja1000(...)
- static struct pci_device_id plx_pci_tbl[] replaced by
  static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl)
- Typo fixed
- Changed order of device info to have the PCI devices in alphabetical
  order

From net-next-2.6 commit 24c4a3b29255f9f8bc48d93597a58256b5a1f83f

Signed-off-by: Pavel Cheblakov <P.B.Cheblakov@inp.nsk.su>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1125 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoesd_pci331: fix 64bit compiler warning
wolf [Wed, 10 Feb 2010 09:25:28 +0000 (09:25 +0000)]
esd_pci331: fix 64bit compiler warning

This patch removes a warning when compiling in 64 bit systems.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1124 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agocan: Proper ctrlmode handling for CAN devices
wolf [Fri, 5 Feb 2010 19:47:46 +0000 (19:47 +0000)]
can: Proper ctrlmode handling for CAN devices

From net-next-2.6 commit ad72c347e56bf3a0231b9d686e17764157d2961c

This patch adds error checking of ctrlmode values for CAN devices. As
an example all availabe bits are implemented in the mcp251x driver.

Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1123 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoThe hlist content ensured only CAN netdevices to be accessed by the
hartkopp [Wed, 3 Feb 2010 17:55:16 +0000 (17:55 +0000)]
The hlist content ensured only CAN netdevices to be accessed by the
can_rx_(un)register() functions which accidently dropped away together with
the receive list access speedup in rev 1118 and rev 1119.

This patch re-introduces the check for CAN netdevices in can_rx_(un)register()
(not in the hot path!) for Kernels >= 2.6.26.

See upstream commit:
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=8b64056dacf6ec81986d63dff96fca039fe95f6e

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1122 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agomcp251x: misc bugfixes
wolf [Sat, 30 Jan 2010 19:07:06 +0000 (19:07 +0000)]
mcp251x: misc bugfixes

Several bugs are fixed: utilization of just half of the RX buffers,
useless wait for interrupt on open, more reliable reset sequence.
The MERR interrupt is not used anymore: it overloads the CPU in
bus-off state without any additional information. One shot mode for
the MCP2515 is added.

Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1121 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agosja1000: Driver for some PLX PCI bridge + sja1000 CAN controllers
wolf [Mon, 25 Jan 2010 10:35:12 +0000 (10:35 +0000)]
sja1000: Driver for some PLX PCI bridge + sja1000 CAN controllers

It's a next version of sja1000_plx_pci driver.
In struct plx_pci_card_info pointer to device-dependent reset function was
added. It's necessary for special reset operations which take place in
some cards (like Marathon CAN-bus-PCI).
Also, I've introduced a special reset function for Marathon card. This
function incapsulates ability to reset the SJA1000 on such cards.

plx_pci_check_sja1000 was slightly modified for a purpose of exhaustive
checking.

Signed-off-by: Pavel Cheblakov <P.B.Cheblakov@inp.nsk.su>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1120 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoConsistently clean up the reference dev->ml_priv when the device receiver list is...
hartkopp [Sun, 24 Jan 2010 21:35:06 +0000 (21:35 +0000)]
Consistently clean up the reference dev->ml_priv when the device receiver list is (to be) removed.
Cleanly separate find_dev_rcv_lists() function for 2.6.26+ as we do not need the fallback.

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1119 030b6a49-0b11-0410-94ab-b0dab22257f2