]> rtime.felk.cvut.cz Git - socketcan-devel.git/log
socketcan-devel.git
15 years agodisable default receive filter on the write-only bridge socket.
hartkopp [Tue, 6 Jan 2009 09:04:34 +0000 (09:04 +0000)]
disable default receive filter on the write-only bridge socket.

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

15 years agoRemoved trailing whitepaces.
hartkopp [Fri, 2 Jan 2009 13:57:54 +0000 (13:57 +0000)]
Removed trailing whitepaces.

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

15 years agoReverted re-arming the throttle handling by setting kt_lastmsg to
hartkopp [Mon, 29 Dec 2008 07:28:09 +0000 (07:28 +0000)]
Reverted re-arming the throttle handling by setting kt_lastmsg to
current time.
Always schedule the thrtasklet when throttle handler is called.

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

15 years agoUpdated BCM to support hrtimers only run in hard_irq context in 2.6.29+
hartkopp [Sun, 28 Dec 2008 08:11:18 +0000 (08:11 +0000)]
Updated BCM to support hrtimers only run in hard_irq context in 2.6.29+
- added tasklets for messages to the userspace (needs soft_irq context)
- removed avoidable copy of data in bcm_rx_handler()
- fixed rearm of throttle timer in bcm_rx_thr_handler()
- some removal of duplicate code

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

15 years agoAdded new parameter (-q) to quit after n messages.
hartkopp [Thu, 25 Dec 2008 17:07:58 +0000 (17:07 +0000)]
Added new parameter (-q) to quit after n messages.
Fix commandline parameter parsing to unsigned values.

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

15 years agoOnly print as much data[] as can_dlc defines.
hartkopp [Thu, 25 Dec 2008 16:20:13 +0000 (16:20 +0000)]
Only print as much data[] as can_dlc defines.

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

15 years agoAdded compilation error for accidently wrong code selection.
hartkopp [Mon, 22 Dec 2008 08:23:47 +0000 (08:23 +0000)]
Added compilation error for accidently wrong code selection.

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

15 years agoCleaned up the #ifdef KERNEL_VERSION hell:
hartkopp [Mon, 22 Dec 2008 08:15:01 +0000 (08:15 +0000)]
Cleaned up the #ifdef KERNEL_VERSION hell:
bcm.c now supports Kernels 2.6.22+
bcm-prior-2-6-22.c now supports kernels below 2.6.22

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

15 years agoCreated a copy of bcm.c for kernels below 2.6.22 (without hrtimers) to
hartkopp [Sun, 21 Dec 2008 16:55:48 +0000 (16:55 +0000)]
Created a copy of bcm.c for kernels below 2.6.22 (without hrtimers) to
split up the code as a precondition for changes caused by hrtimers in
2.6.29 that only support hrtimers in hard_irq context.

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

15 years agoBackported fix for a race condition in bcm throttling.
hartkopp [Fri, 19 Dec 2008 16:28:02 +0000 (16:28 +0000)]
Backported fix for a race condition in bcm throttling.

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

15 years agoSome cosmetics to be as near as possible to the mainline code.
hartkopp [Fri, 19 Dec 2008 16:11:25 +0000 (16:11 +0000)]
Some cosmetics to be as near as possible to the mainline code.

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

15 years agoBring 2.4 kernel tree up-to-date to the latest mainline fixes.
hartkopp [Fri, 19 Dec 2008 15:45:30 +0000 (15:45 +0000)]
Bring 2.4 kernel tree up-to-date to the latest mainline fixes.

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

15 years agovcan: convert to net_device_ops & whitespace fixes
hartkopp [Thu, 18 Dec 2008 09:31:32 +0000 (09:31 +0000)]
vcan: convert to net_device_ops & whitespace fixes

Upcoming changes for Kernel 2.6.29

http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=5ad258c0a85a7cc03c46874e8a26c7e9b4dfb90d
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=fc10af8e658936f7b2bddd077f7ddcbe1eddc066

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

15 years agocan: merge error paths
hartkopp [Thu, 18 Dec 2008 09:13:05 +0000 (09:13 +0000)]
can: merge error paths

This commit follows the change in net-next-2.6 git tree created by
Ilpo Järvinen.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=ebad5c0984e06f4036d2eb2741b9afce736b8a06

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

15 years agoFix NULL pointer dereference as reported by Chris Dore:
hartkopp [Mon, 8 Dec 2008 18:51:29 +0000 (18:51 +0000)]
Fix NULL pointer dereference as reported by Chris Dore:
https://lists.berlios.de/pipermail/socketcan-core/2008-December/002120.html

Added missing initialisation of resource struct as reported by David Mueller:
https://lists.berlios.de/pipermail/socketcan-core/2008-December/002127.html

Signed-off-by: David Mueller <d.mueller@elsoft.ch>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@879 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoFix data sizes for write() because the BCM looks on correct length now.
hartkopp [Sun, 7 Dec 2008 11:57:01 +0000 (11:57 +0000)]
Fix data sizes for write() because the BCM looks on correct length now.

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

15 years agoAdded CAN core filter test for the use in LTP.
hartkopp [Sat, 6 Dec 2008 19:20:18 +0000 (19:20 +0000)]
Added CAN core filter test for the use in LTP.

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

15 years agoFixed typo found by Simon Pasch:
hartkopp [Thu, 4 Dec 2008 19:06:51 +0000 (19:06 +0000)]
Fixed typo found by Simon Pasch:
https://lists.berlios.de/pipermail/socketcan-users/2008-December/000597.html

Signed-Off-by: Simon Pasch <fpasch@googlemail.com>
Signed-Off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@876 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoSince rev872 the single CAN identifier filter lists handle only non-RTR
hartkopp [Thu, 4 Dec 2008 18:21:43 +0000 (18:21 +0000)]
Since rev872 the single CAN identifier filter lists handle only non-RTR
CAN frames. So we need to omit the check of these filter lists when
receiving RTR CAN frames.

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

15 years agochanged revision print at module startup to look like can-raw again, as
hartkopp [Mon, 1 Dec 2008 15:17:58 +0000 (15:17 +0000)]
changed revision print at module startup to look like can-raw again, as
it was before.

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

15 years agoAdded spaces before the open brace '{' as required by the Kernel coding
hartkopp [Mon, 1 Dec 2008 09:37:35 +0000 (09:37 +0000)]
Added spaces before the open brace '{' as required by the Kernel coding
style in linux/scripts/checkpatch.pl .

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

15 years agoFix sloppy CAN_(EFF|RTR)_FLAG handling in can_filter.can_mask .
hartkopp [Mon, 1 Dec 2008 07:24:18 +0000 (07:24 +0000)]
Fix sloppy CAN_(EFF|RTR)_FLAG handling in can_filter.can_mask .

Due to a wrong safety check in af_can.c it was not possible to filter
for SFF frames with a specific CAN identifier without getting the
same selected CAN identifier from a received EFF frame also.

This fix has a minimum impact on the CAN filter API as the 'sloppy'
handling is still a correct (and possibly wanted?) use-case.

Please update the can-utils (especially candump) whose filter definition
on the commandline made assumptions to correct the user input that are
probably unwanted now.

Thanks to Kurt van Dijck for pointing at this issue!

Signed-Off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@872 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoFixed parse_canframe() with reordering the checks for the can_id
hartkopp [Fri, 28 Nov 2008 21:50:24 +0000 (21:50 +0000)]
Fixed parse_canframe() with reordering the checks for the can_id
delimiter. Before this fix the function may have found delimiters in the
string behind the terminating zero.

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

15 years agoAdded interface name to parameter list in first line.
hartkopp [Mon, 17 Nov 2008 10:23:42 +0000 (10:23 +0000)]
Added interface name to parameter list in first line.

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

15 years agoFix MSCAN bit-timing problems due to improper tseg1_min and tseg2_min
hartkopp [Thu, 13 Nov 2008 13:35:49 +0000 (13:35 +0000)]
Fix MSCAN bit-timing problems due to improper tseg1_min and tseg2_min

According to the MSCAN manual, tseg1 must be in the range of 4..16 time
quanta and tseg2 between 2..8.

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

15 years agoAdded Id keyword propertiy on new files.
hartkopp [Wed, 5 Nov 2008 14:20:52 +0000 (14:20 +0000)]
Added Id keyword propertiy on new files.

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

15 years agofixed typo.
hartkopp [Wed, 5 Nov 2008 13:11:30 +0000 (13:11 +0000)]
fixed typo.

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

15 years agoAdded ISO 15765-2 CAN transport protocol for protocol family CAN.
hartkopp [Wed, 5 Nov 2008 11:34:23 +0000 (11:34 +0000)]
Added ISO 15765-2 CAN transport protocol for protocol family CAN.
Including some tools and coarse documentation README.isotp

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

15 years agoReworked slcan_attach to give slcan setup values directly on the commandline.
hartkopp [Tue, 4 Nov 2008 10:47:09 +0000 (10:47 +0000)]
Reworked slcan_attach to give slcan setup values directly on the commandline.

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

15 years agoAdded MSG_PEEK test option '-p <number-of-peeks> .
hartkopp [Tue, 4 Nov 2008 08:07:52 +0000 (08:07 +0000)]
Added MSG_PEEK test option '-p <number-of-peeks> .

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

15 years ago[PATCH] SJA1000: ixxat_pci: fix the detection of the second SJA1000 chip
hartkopp [Thu, 30 Oct 2008 21:18:34 +0000 (21:18 +0000)]
[PATCH] SJA1000: ixxat_pci: fix the detection of the second SJA1000 chip

According to the SJA1000 data sheet, section 6.3.2, only the bits 0,5
and 7 of the control/mode register are defined after a reset. This
patch uses a proper mask before checking the value.

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

15 years agoThis patch allows pcmcia subsystem >= 2.6.28
hartkopp [Wed, 29 Oct 2008 19:05:06 +0000 (19:05 +0000)]
This patch allows pcmcia subsystem >= 2.6.28
The function pcmcia_loop_config is used. To support kernels < 2.6.28
the pcmcia_loop_config function is emulated (it does basically the same
as what I used to do, but seperates the code much cleaner) for these kernels.
This is definitely a change, but does not break on recent builds.

Additionally, in order to test the pcmcia access, the code needed to be
tested for 8bit softing pcmcia cards too. Historically, these cards did not
support shared irq's. But my current system, AMD64, does not provide exclusive
interrupts anymore. Therefore, the old 8bit cards are moved to have shared
irq's. The code did succeed in my elementary tests.

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@862 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoPrint non-data stuff (errors, warnings, hints) on stderr.
hartkopp [Wed, 29 Oct 2008 09:41:40 +0000 (09:41 +0000)]
Print non-data stuff (errors, warnings, hints) on stderr.

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

15 years agoAdded support for swapped byte order representation.
hartkopp [Wed, 29 Oct 2008 09:23:48 +0000 (09:23 +0000)]
Added support for swapped byte order representation.

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

15 years agoAdded a file list and base patches to create a Kernel 2.6.25+ with the latest CAN...
hartkopp [Tue, 28 Oct 2008 19:20:02 +0000 (19:20 +0000)]
Added a file list and base patches to create a Kernel 2.6.25+ with the latest CAN divers.
The base patches just remove the vcan driver files which are taken from SVN also.

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

15 years agoAdded missing include of linux/version.h
hartkopp [Tue, 28 Oct 2008 18:53:43 +0000 (18:53 +0000)]
Added missing include of linux/version.h

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

15 years agoUpdated files list for mkpatch.
hartkopp [Tue, 28 Oct 2008 18:14:39 +0000 (18:14 +0000)]
Updated files list for mkpatch.

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

15 years agoUpdated slcan.c following:
hartkopp [Mon, 27 Oct 2008 09:24:55 +0000 (09:24 +0000)]
Updated slcan.c following:
[TTY]: Use tty_mode_ioctl() in network drivers.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d0127539ea9b5fcfe1a1d7d4d57f12384da5190c

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

15 years agoInstead of using own error or success codes, the PCMCIA code should rely on
hartkopp [Fri, 24 Oct 2008 19:11:19 +0000 (19:11 +0000)]
Instead of using own error or success codes, the PCMCIA code should rely on
the generic return values. Therefore, replace all occurrences of CS_SUCCESS
with 0.

Changed for Linux 2.6.28 in git commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4c89e88bfde6a3c179790e21004f24e09a058290

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

15 years agoInstead of using own error or success codes, the PCMCIA code should rely on
hartkopp [Fri, 24 Oct 2008 19:00:32 +0000 (19:00 +0000)]
Instead of using own error or success codes, the PCMCIA code should rely on
the generic return values. Therefore, replace all occurrences of CS_SUCCESS
with 0.

Changed for Linux 2.6.28 in git commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4c89e88bfde6a3c179790e21004f24e09a058290

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

15 years agoFixed double semi-colon typo.
hartkopp [Fri, 24 Oct 2008 18:37:24 +0000 (18:37 +0000)]
Fixed double semi-colon typo.

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

15 years agoThis patch adds hardware probe to mc251x driver.
hartkopp [Fri, 24 Oct 2008 18:28:35 +0000 (18:28 +0000)]
This patch adds hardware probe to mc251x driver.
In case no mcp251x chip is installed the mcp251x_can_probe function
exits without registering the device.

Signed-off-by: Christian Pellegrin <chripell@gmail.com>
Acked-by: Claudio Lanconelli <lanconelli.claudio@eptar.com>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@852 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoThis patch ensures that can_calc_bittiming() returns an error (-EDOM) if
hartkopp [Fri, 24 Oct 2008 13:42:42 +0000 (13:42 +0000)]
This patch ensures that can_calc_bittiming() returns an error (-EDOM) if
the bit-rate error is greater than 5%. In that case, it's very unlikely
that the determined bit-timing works properly anyhow.

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

15 years agothis patch corrects:
hartkopp [Fri, 24 Oct 2008 13:34:42 +0000 (13:34 +0000)]
this patch corrects:
1) crash on bus error found by Claudio
2) enable_dma name clash
3) not turning off transceiver on first load

Signed-off-by: Christian Pellegrin <chripell@gmail.com>
Signed-off-by: Oliver hartkopp <oliver.hartkopp@volkswagen.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@850 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoFixed typos that already had been fixed in mainline kernel.
hartkopp [Thu, 23 Oct 2008 13:57:23 +0000 (13:57 +0000)]
Fixed typos that already had been fixed in mainline kernel.

Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@849 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoUnified double include defines check names in the platform hearders.
hartkopp [Thu, 23 Oct 2008 10:29:01 +0000 (10:29 +0000)]
Unified double include defines check names in the platform hearders.

Signed-off-by: Oliver hartkopp <oliver.hartkopp@volkswagen.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@848 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoMove sja1000 cdr and ocr defines into platform header as discussed on
hartkopp [Thu, 23 Oct 2008 10:17:31 +0000 (10:17 +0000)]
Move sja1000 cdr and ocr defines into platform header as discussed on
SocketCAN ML:
https://lists.berlios.de/pipermail/socketcan-core/2008-October/002032.html

Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@847 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoAs previous commit. Did not save one file - sorry.
hartkopp [Wed, 22 Oct 2008 13:49:18 +0000 (13:49 +0000)]
As previous commit. Did not save one file - sorry.

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

15 years agoChanged default compile targets for out-of-tree compilation.
hartkopp [Wed, 22 Oct 2008 13:47:43 +0000 (13:47 +0000)]
Changed default compile targets for out-of-tree compilation.
- Removed 'old' drivers
- Added sja1000_platform driver
- unified targets

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

15 years agoMove platform header for mcp251x.c into platform directory.
hartkopp [Wed, 22 Oct 2008 13:43:22 +0000 (13:43 +0000)]
Move platform header for mcp251x.c into platform directory.

Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@844 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoFrom 0dcf8e2f6a5f453dca20b71aa146a28b470f4b07 Mon Sep 17 00:00:00 2001
hartkopp [Wed, 22 Oct 2008 13:39:50 +0000 (13:39 +0000)]
From 0dcf8e2f6a5f453dca20b71aa146a28b470f4b07 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Sun, 19 Oct 2008 02:55:08 +0200
Subject: [PATCH] [CAN] add generic platform bus based sja1000 driver

This patch adds a generic platform bus based sja1000 driver.

Changes to original post:
- correct placing of config option in Kconfig file
- moved platform header file to separate directory
include/linux/can/platform

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@843 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoRemove pcm027 driver (will be replaced by sja1000_platform).
hartkopp [Wed, 22 Oct 2008 13:25:44 +0000 (13:25 +0000)]
Remove pcm027 driver (will be replaced by sja1000_platform).

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

15 years agoThe callbacks in the struct can_priv used u32 for state and mode.
hartkopp [Sun, 19 Oct 2008 16:12:47 +0000 (16:12 +0000)]
The callbacks in the struct can_priv used u32 for state and mode.
There are already enums for these values. Use these enums to keep
sparse quiet if a driver already uses these values.

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

15 years agoThe macro definition DRV_NAME is used for regions (/proc/ioports,
hartkopp [Sat, 18 Oct 2008 18:08:01 +0000 (18:08 +0000)]
The macro definition DRV_NAME is used for regions (/proc/ioports,
/proc/iomem), device names (/proc/bus/pci/devices), etc. The
names are now derived from the corresponding file name and do not
use the prefix "can-" any more.

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

15 years agoThis patch fixes suspend/resume for platforms that "lose" bit
hartkopp [Sat, 18 Oct 2008 13:22:00 +0000 (13:22 +0000)]
This patch fixes suspend/resume for platforms that "lose" bit
timing settings after a suspend/resume cycle and improves robustness
in case of misbehaving hardware (doesn't lock the machine anymore)

Signed-off-by: Christian Pellegrin <chripell@gmail.com>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@839 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoIf priv->do_get_state returns an error, nothing is printed
hartkopp [Thu, 16 Oct 2008 14:13:50 +0000 (14:13 +0000)]
If priv->do_get_state returns an error, nothing is printed
and "0" thus no error is delivered into userspace. This patch
changes the behaviour so that the error is propagated into the
userspace correctly.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Oliver Hartkopp <oliver@hartkopp.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@838 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoApplied patch from Christian Pellegrin
hartkopp [Tue, 14 Oct 2008 19:08:33 +0000 (19:08 +0000)]
Applied patch from Christian Pellegrin
https://lists.berlios.de/pipermail/socketcan-core/2008-October/001960.html
after fixing some whitespace issues in a comment section and the removal
of an obsolete debug output.

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

15 years agoFixed linux version code definition that confused the strip-src tool.
hartkopp [Wed, 8 Oct 2008 20:03:50 +0000 (20:03 +0000)]
Fixed linux version code definition that confused the strip-src tool.

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

15 years agoUse simple_stroul() and correct variable type instead of a misplaced
hartkopp [Tue, 7 Oct 2008 12:47:41 +0000 (12:47 +0000)]
Use simple_stroul() and correct variable type instead of a misplaced
strict_stroul(). This also allows compilation on older Kernels than 2.6.25.

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

15 years agoAdded strict_strtoul() from linux-2.6.25/lib/vsprintf.c to compile on
hartkopp [Tue, 7 Oct 2008 08:10:14 +0000 (08:10 +0000)]
Added strict_strtoul() from linux-2.6.25/lib/vsprintf.c to compile on
older kernels < v2.6.25.

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

15 years agoThe semantic of netdev_priv() changed in 2.6.27.
hartkopp [Tue, 7 Oct 2008 08:08:05 +0000 (08:08 +0000)]
The semantic of netdev_priv() changed in 2.6.27.
Detect VCAN devices via trnl_link_ops in newer kernels.

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

15 years agoFix problems with calculating bit-timing parameters
wolf [Tue, 7 Oct 2008 07:36:50 +0000 (07:36 +0000)]
Fix problems with calculating bit-timing parameters

This patch fixes a bug resulting in a badly matching sample point.
Furthermore, it temporarily fixes the problems with prog_seg being
0 on AT91 and MPC2510 CAN controllers. A proper fix using min/max
values for prog_seg, phase_seg1 and phase_seg2 is on the to-do
list.

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

15 years agodrop the do_set_bittiming hook in the softing driver.
hartkopp [Mon, 6 Oct 2008 14:25:52 +0000 (14:25 +0000)]
drop the do_set_bittiming hook in the softing driver.
https://lists.berlios.de/pipermail/socketcan-core/2008-October/001902.html

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

15 years agoChange can_set_bittiming() to allow
hartkopp [Mon, 6 Oct 2008 13:59:11 +0000 (13:59 +0000)]
Change can_set_bittiming() to allow
- pre-defined parameters
- non-available do_set_bittiming() functions

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

15 years agoApplied two cosmetic issues from Kurt van Dijck:
hartkopp [Mon, 6 Oct 2008 11:54:19 +0000 (11:54 +0000)]
Applied two cosmetic issues from Kurt van Dijck:
https://lists.berlios.de/pipermail/socketcan-core/2008-October/001885.html
https://lists.berlios.de/pipermail/socketcan-core/2008-October/001883.html

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

15 years agoCleanup new bittime interface on Softing Cards as proposed by Kurt van Dijck:
hartkopp [Mon, 6 Oct 2008 09:32:02 +0000 (09:32 +0000)]
Cleanup new bittime interface on Softing Cards as proposed by Kurt van Dijck:
https://lists.berlios.de/pipermail/socketcan-core/2008-October/001868.html
https://lists.berlios.de/pipermail/socketcan-core/2008-October/001870.html

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

15 years agoSupport the new bittime interface.
hartkopp [Sun, 5 Oct 2008 17:00:52 +0000 (17:00 +0000)]
Support the new bittime interface.
Fixes in softing_reinit() in softing_fw.c:
- calculate bittiming at re-init the chips
- in debug trace: use card->bus[1]->can.bittiming.bitrate for bus1

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

15 years agoAdded MCP251x SPI CAN driver posted by Chris Elston <celston@katalix.com>
hartkopp [Sat, 4 Oct 2008 18:55:01 +0000 (18:55 +0000)]
Added MCP251x SPI CAN driver posted by Chris Elston <celston@katalix.com>
and Christian Pellegrin <chripell@evolware.org> in
https://lists.berlios.de/pipermail/socketcan-core/2008-October/001861.html
after updating the driver to the new bitrate setting interface.

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

15 years agoAdded new interface for setting bit-timing parameters.
hartkopp [Sat, 4 Oct 2008 17:18:23 +0000 (17:18 +0000)]
Added new interface for setting bit-timing parameters.
See details at:
https://lists.berlios.de/pipermail/socketcan-core/2008-September/001850.html

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

15 years agoAdded new interface for setting bit-timing parameters.
hartkopp [Sat, 4 Oct 2008 17:17:07 +0000 (17:17 +0000)]
Added new interface for setting bit-timing parameters.
See details at
https://lists.berlios.de/pipermail/socketcan-core/2008-September/001850.html

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

15 years agoAdded new interface for setting bit-timing parameters.
hartkopp [Sat, 4 Oct 2008 17:15:39 +0000 (17:15 +0000)]
Added new interface for setting bit-timing parameters.
See details at
https://lists.berlios.de/pipermail/socketcan-core/2008-September/001850.html

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

15 years agoStart candump in silent mode, when logging into a file.
hartkopp [Thu, 2 Oct 2008 13:47:43 +0000 (13:47 +0000)]
Start candump in silent mode, when logging into a file.

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

15 years agonetns: Use net_eq() to compare net-namespaces for optimization.
hartkopp [Thu, 18 Sep 2008 10:05:16 +0000 (10:05 +0000)]
netns: Use net_eq() to compare net-namespaces for optimization.

Without CONFIG_NET_NS, namespace is always &init_net.
Compiler will be able to omit namespace comparisons with this patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
git commit 721499e8931c5732202481ae24f2dfbf9910f129

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

15 years agoThe number for the SLCAN line discipline can not be found in
hartkopp [Wed, 17 Sep 2008 13:02:49 +0000 (13:02 +0000)]
The number for the SLCAN line discipline can not be found in
<linux/tty.h> anyway but needs to be written as module alias

tty-ldisc-17 slcan

So we remove the annoying #error output and use the correctly defined
'17' from Kernel 2.6.25+ as default.

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

15 years agoAdded support for Kernel 2.6.27 following slip.c changes from git commit
hartkopp [Wed, 17 Sep 2008 09:32:49 +0000 (09:32 +0000)]
Added support for Kernel 2.6.27 following slip.c changes from git commit
a352def21a642133758b868c71bee12ab34ad5c5 ('tty: Ldisc revamp')

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

15 years agoAdded support for Kernel 2.6.26 following slip.c changes from git commit
hartkopp [Wed, 17 Sep 2008 08:59:03 +0000 (08:59 +0000)]
Added support for Kernel 2.6.26 following slip.c changes from git commit
f34d7a5b7010b82fe97da95496b9971435530062

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

15 years agoFixed some typos reported by Hans-Juergen Koch and C. Boone.
hartkopp [Tue, 16 Sep 2008 08:54:00 +0000 (08:54 +0000)]
Fixed some typos reported by Hans-Juergen Koch and C. Boone.

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

15 years agoAdded some documentation about virtual CAN driver.
hartkopp [Mon, 15 Sep 2008 14:56:39 +0000 (14:56 +0000)]
Added some documentation about virtual CAN driver.
To be reviewed.

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

15 years agoAdded support for comments in logfiles.
hartkopp [Tue, 9 Sep 2008 12:56:05 +0000 (12:56 +0000)]
Added support for comments in logfiles.
Added some sanity checks and error messages.

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

15 years agoRemoved obsolete include of <pcmcia/version.h> which was dead since 2005-07-08:
hartkopp [Thu, 14 Aug 2008 12:29:59 +0000 (12:29 +0000)]
Removed obsolete include of <pcmcia/version.h> which was dead since 2005-07-08:

http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.26.y.git;a=commitdiff;h=a00db1ba7c33619cbd7c3153e4746d15881c0383

The include file itself has been removed completely in 2.6.27.

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

15 years agoCreate an informative error message when detecting a wrong line format.
hartkopp [Fri, 25 Jul 2008 06:32:20 +0000 (06:32 +0000)]
Create an informative error message when detecting a wrong line format.

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

15 years agoChanged comment line recognition:
hartkopp [Thu, 24 Jul 2008 19:12:19 +0000 (19:12 +0000)]
Changed comment line recognition:
Everything without a '(' at the beginning of an input line is treated as comment.
Changed buffer size to allow long comment lines & added overflow handling.

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

15 years agoSupport for comment lines in the logfile:
hartkopp [Thu, 24 Jul 2008 13:03:18 +0000 (13:03 +0000)]
Support for comment lines in the logfile:
'#' at the beginning of a line marks comment lines.

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

15 years agoAdded missing help test.
hartkopp [Thu, 10 Jul 2008 11:01:37 +0000 (11:01 +0000)]
Added missing help test.

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

15 years agoAdded -f option to filter only on the CAN-ID and not on the content.
hartkopp [Thu, 10 Jul 2008 10:59:37 +0000 (10:59 +0000)]
Added -f option to filter only on the CAN-ID and not on the content.
This can be useful when the timestamp cyle needs to be displayed.

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

15 years agoUpdated can_if start script to support vcan creation.
hartkopp [Sun, 6 Jul 2008 19:15:24 +0000 (19:15 +0000)]
Updated can_if start script to support vcan creation.

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

15 years agoFix order for sanity check before grabbing the netdev.
hartkopp [Wed, 2 Jul 2008 17:39:45 +0000 (17:39 +0000)]
Fix order for sanity check before grabbing the netdev.

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

15 years agoDo not allow to create error frame filters via standard filter sets.
hartkopp [Wed, 2 Jul 2008 04:19:07 +0000 (04:19 +0000)]
Do not allow to create error frame filters via standard filter sets.

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

15 years agoAdded automatic extended frame format recognition.
hartkopp [Wed, 2 Jul 2008 04:05:11 +0000 (04:05 +0000)]
Added automatic extended frame format recognition.

Most SocketCAN userspace tools (like cansend) recognize the EFF by the
stringlength of the given CAN-ID: 3 -> SFF , 8 -> EFF.
This was missing in the candump filter definition and therefore the
values had to be specified with the CAN_EFF_FLAG set in the value, e.g.
92345678 for the extended CAN-ID 12345678 - this was not really nice.

Now the filtersets for extended frames can be specified as expected:
12345678:1FFFFFFF to filter for only 12345678 extended CAN-ID
000000AA:1FFFFFFF to filter for only AA extended CAN-ID.

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

15 years agoAdded silent correction for can_dlc out of range.
hartkopp [Tue, 1 Jul 2008 11:31:59 +0000 (11:31 +0000)]
Added silent correction for can_dlc out of range.

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

15 years agoAdded Softing driver contributed by Kurt Van Dijck (EIA Electronics).
hartkopp [Tue, 1 Jul 2008 10:09:12 +0000 (10:09 +0000)]
Added Softing driver contributed by Kurt Van Dijck (EIA Electronics).

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

15 years agoRemoved spaces after type casts. Fixed typo.
hartkopp [Tue, 1 Jul 2008 09:16:34 +0000 (09:16 +0000)]
Removed spaces after type casts. Fixed typo.

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

15 years agoFollow the changes that added more sanity checks in rev800.
hartkopp [Tue, 1 Jul 2008 08:51:21 +0000 (08:51 +0000)]
Follow the changes that added more sanity checks in rev800.

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

15 years agoAdded some sanity checks to prevent skbuffs from containing inconsistent
hartkopp [Tue, 1 Jul 2008 08:47:47 +0000 (08:47 +0000)]
Added some sanity checks to prevent skbuffs from containing inconsistent
CAN frames.

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

15 years agoFixed condition pointed out by Uwe Bonnes:
hartkopp [Thu, 26 Jun 2008 14:35:46 +0000 (14:35 +0000)]
Fixed condition pointed out by Uwe Bonnes:
https://lists.berlios.de/pipermail/socketcan-core/2008-June/001625.html

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

15 years agoAdd script mkseries to create kernel patches from the trunk
wolf [Wed, 25 Jun 2008 09:07:06 +0000 (09:07 +0000)]
Add script mkseries to create kernel patches from the trunk

To continue developing Socket-CAN on the SVN trunk, the script mkseries
has been provided to create kernel patches suitible for posting on the
netdev mailing list. It requires a kernel version >= 2.6.25 against
which patches will be created.

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

15 years agoRemoved copyright and license info from the Makefiles.
hartkopp [Tue, 24 Jun 2008 06:12:18 +0000 (06:12 +0000)]
Removed copyright and license info from the Makefiles.

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

15 years agoRemoved module revision dates due to discussion on socketcan-sore ML.
hartkopp [Mon, 23 Jun 2008 12:05:42 +0000 (12:05 +0000)]
Removed module revision dates due to discussion on socketcan-sore ML.

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

15 years agoFix checkpatch "ERROR: do not use assignment in if condition"
hartkopp [Sun, 22 Jun 2008 18:54:20 +0000 (18:54 +0000)]
Fix checkpatch "ERROR: do not use assignment in if condition"

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

15 years agoAdded missing casts that produced warnings on 64-bit compilers.
hartkopp [Sun, 22 Jun 2008 10:47:01 +0000 (10:47 +0000)]
Added missing casts that produced warnings on 64-bit compilers.

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