]> rtime.felk.cvut.cz Git - socketcan-devel.git/log
socketcan-devel.git
15 years agoAdded base patch for 2.6.28 patch generation with mkpatch.
hartkopp [Tue, 24 Feb 2009 17:56:22 +0000 (17:56 +0000)]
Added base patch for 2.6.28 patch generation with mkpatch.

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

15 years agoSJA1000: remove dead code in sja1000.h
wolf [Thu, 19 Feb 2009 16:01:41 +0000 (16:01 +0000)]
SJA1000: remove dead code in sja1000.h

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

15 years agoSJA1000: generic OF platform bus driver
wolf [Wed, 18 Feb 2009 18:38:12 +0000 (18:38 +0000)]
SJA1000: generic OF platform bus driver

This patch adds a generic driver for SJA1000 chips on the OpenFirmware
platform bus found on embedded PowerPC systems. You need a SJA1000 node
definition in your flattened device tree source (DTS) file similar to:

   can@3,100 {
           compatible = "philips,sja1000";
           reg = <3 0x100 0x80>;
           clock-frequency = <8000000>;
           cdr-reg = <0x48>;
           ocr-reg = <0x0a>;
           interrupts = <2 0>;
           interrupt-parent = <&mpic>;
   };

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

15 years agoSome minor beautifications of output messages
wolf [Tue, 17 Feb 2009 11:28:31 +0000 (11:28 +0000)]
Some minor beautifications of output messages

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

15 years agoSJA1000: add missing netdev_ops support for > 2.6.29
wolf [Tue, 17 Feb 2009 11:27:17 +0000 (11:27 +0000)]
SJA1000: add missing netdev_ops support for > 2.6.29

We need that for kernel inclusion as well, puh!

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

15 years agoUse EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL for drivers
wolf [Tue, 17 Feb 2009 11:02:09 +0000 (11:02 +0000)]
Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL for drivers

As suggested by Sam, the safer approach is to be more restrictive.
If we later decide we want to support non-gpl we can be less restrictive.
Therefore let's go for the GPL version of the exports for now.

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

15 years agoUse type u64 instead of uint64_t as suggested by Sam
wolf [Tue, 17 Feb 2009 09:19:35 +0000 (09:19 +0000)]
Use type u64 instead of uint64_t as suggested by Sam

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

15 years agoMake CONFIG_CAN_DEV depend on SYSFS
wolf [Tue, 17 Feb 2009 09:18:21 +0000 (09:18 +0000)]
Make CONFIG_CAN_DEV depend on SYSFS

The device driver interface requires SYSFS for proper operation

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

15 years agoFix warnings reported by make sparse
wolf [Tue, 17 Feb 2009 09:17:15 +0000 (09:17 +0000)]
Fix warnings reported by make sparse

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

15 years agoAdd missing CAN_DEBUG_DEVICES Kconfig entry
wolf [Sun, 15 Feb 2009 19:34:29 +0000 (19:34 +0000)]
Add missing CAN_DEBUG_DEVICES Kconfig entry

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

15 years agoSpagetti code cleanup:
hartkopp [Sun, 15 Feb 2009 17:40:32 +0000 (17:40 +0000)]
Spagetti code cleanup:
Moved conversions into separate functions can2pty() and pty2can().
Updated and enhanced some comments.
Variable name cleanups inside the separate functions.
Fix handling on wrong pty commands (was a wrong 'continue' statement).

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

15 years agoPrelimary quilt patch stack for including the device drivers interface
wolf [Sun, 15 Feb 2009 10:38:25 +0000 (10:38 +0000)]
Prelimary quilt patch stack for including the device drivers interface

This is a prelimary quilt patch stack to include the CAN network
device driver interface and some drivers into Linux kernel. It is
based on the netdev GIT tree currently at version 2.6.29-rcX:

git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6

Please test and give feedback.

Wolfgang.

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

15 years agoMSCAN-MPC5200: more style fixes and make MSCAN variant depend on PPC
wolf [Sun, 15 Feb 2009 10:13:09 +0000 (10:13 +0000)]
MSCAN-MPC5200: more style fixes and make MSCAN variant depend on PPC

The MSCAN variant for the MPC5200 is also used on MPC512x processors
and therefore CONFIG_PPC_MPC52xx would not be correct any more.

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

15 years agoMSCAN: further cleanup, remove volatile and whitespace
wolf [Sun, 15 Feb 2009 08:21:25 +0000 (08:21 +0000)]
MSCAN: further cleanup, remove volatile and whitespace

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

15 years agoSJA1000: more cleanup and use SJA1000_MAX_IRQ instead of a plain number
wolf [Sat, 14 Feb 2009 20:40:46 +0000 (20:40 +0000)]
SJA1000: more cleanup and use SJA1000_MAX_IRQ instead of a plain number

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

15 years agoSJA1000: remove error message in ISR with shared interrupts
wolf [Sat, 14 Feb 2009 20:38:23 +0000 (20:38 +0000)]
SJA1000: remove error message in ISR with shared interrupts

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

15 years agoEnable device dev_dbg with CONFIG_CAN_DEBUG_DEVICES
wolf [Sat, 14 Feb 2009 14:35:38 +0000 (14:35 +0000)]
Enable device dev_dbg with CONFIG_CAN_DEBUG_DEVICES

The following patch allows to enable CAN device debug messages via
CONFIG_CAN_DEBUG_DEVICES and adds some useful dev_dbg() to dev.c,
sja1000.c and mscan.c.

The old MSCAN driver used dev_dbg() the heavy way, e.g. printing
messages for each message sent and received. I think that's only
useful for development.

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

15 years agoMSCAN/MPC52xx: copyright note fixes and beautification
wolf [Sat, 14 Feb 2009 14:32:35 +0000 (14:32 +0000)]
MSCAN/MPC52xx: copyright note fixes and beautification

I restricted the copyright to GPL v2 and added a copyright line for myself.
Furthermore, I changed the file header to a more usual format. I also
changed the MODULE_AUTHOR in mpc52xx_can.c to myself for my re-written
version using the OF platform.

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

15 years agodev.c: cleanup and name changes and more doc
wolf [Sat, 14 Feb 2009 14:31:34 +0000 (14:31 +0000)]
dev.c: cleanup and name changes and more doc

This patch briefly documents exported functions of the CAN device
driver interface. I also changed the module description to "CAN
network device driver interface" because it's more appropriate than
"CAN netdevice library", I think. Comments?
Finally, I fix the issue marked with "#ifdef FIXME".

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

15 years agoVarious fixes for dev.h
wolf [Sat, 14 Feb 2009 14:30:19 +0000 (14:30 +0000)]
Various fixes for dev.h

Remove spinlock_t stats_lock because it's not used anywhere. Add myself
to the copyright and correct macro name for the header file.

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

15 years agodrivers/net/can/Kconfig cleanup and beautification
wolf [Sat, 14 Feb 2009 14:29:41 +0000 (14:29 +0000)]
drivers/net/can/Kconfig cleanup and beautification

This patch fixes some white space issues and uses consequently the tag
"---help---" for help text. Furthermore it changes the type of
CAN_CALC_BITTIMING to "bool".

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

15 years agodev: print useful error message if the bit-timing is not valid
wolf [Sat, 14 Feb 2009 14:27:32 +0000 (14:27 +0000)]
dev: print useful error message if the bit-timing is not valid

This should avoid confusion when CONFIG_CAN_CALC_BITTIMING is disabled or
"ifconfig canX up" failed due to missing bit-timing setup.

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

15 years agoMakefile.common: allow CONFIG_CAN_CALC_BITTIMING to be disabled
wolf [Sat, 14 Feb 2009 14:26:52 +0000 (14:26 +0000)]
Makefile.common: allow CONFIG_CAN_CALC_BITTIMING to be disabled

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

15 years agomcp251x CAN driver: correctly initializes can error frame with zeros
wolf [Fri, 13 Feb 2009 16:42:21 +0000 (16:42 +0000)]
mcp251x CAN driver: correctly initializes can error frame with zeros

Use 64-bit access to clear message frame instead of memset as suggested
by Oliver Hartkopp.

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

15 years agomcp251x CAN driver: fixes race condition on module unload and can device up
wolf [Fri, 13 Feb 2009 16:40:34 +0000 (16:40 +0000)]
mcp251x CAN driver: fixes race condition on module unload and can device up

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

15 years agomcp251x CAN driver: fix issue with RX getting stuck on heavy load
wolf [Fri, 13 Feb 2009 16:39:46 +0000 (16:39 +0000)]
mcp251x CAN driver: fix issue with RX getting stuck on heavy load

This change fixes an issue with some CPU's (such as the PXA270)
that don't support level interrupts where interrupts get stuck
under heavy RX load.

This patch was suggested by Christian Pellegrin <chripell@evolware.org>, the
author of this driver.

Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
Acked-by: Christian Pellegrin <chripell@fsfe.org>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@933 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoAdded CONFIG_CAN_CALC_BITTIMING to be defined by default when compiling
hartkopp [Fri, 6 Feb 2009 10:03:54 +0000 (10:03 +0000)]
Added CONFIG_CAN_CALC_BITTIMING to be defined by default when compiling
CAN drivers on the SVN trunk. This fixes an issue caused by commit r920:
"Make CAN bit-timing calculation configurable"

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

15 years agoMSCAN-MPC52XX: fix section mismatch and OF compatible device list
wolf [Wed, 4 Feb 2009 20:14:42 +0000 (20:14 +0000)]
MSCAN-MPC52XX: fix section mismatch and OF compatible device list

We also need to support "fsl,mpc5200b-*" compatible nodes. We drop
legacy support for old compatible nodes (without fsl).

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

15 years agoAllow SLCAN RTR frames without data length code field.
hartkopp [Wed, 4 Feb 2009 16:51:04 +0000 (16:51 +0000)]
Allow SLCAN RTR frames without data length code field.

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

15 years agoSome more implementation to make it work with a certain application.
hartkopp [Wed, 4 Feb 2009 13:18:44 +0000 (13:18 +0000)]
Some more implementation to make it work with a certain application.

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

15 years agoUse rxbuf[] for acknowledges.
hartkopp [Tue, 3 Feb 2009 20:12:34 +0000 (20:12 +0000)]
Use rxbuf[] for acknowledges.

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

15 years agoImplemented ACK/NACK replies for ASCII commands.
hartkopp [Tue, 3 Feb 2009 13:59:17 +0000 (13:59 +0000)]
Implemented ACK/NACK replies for ASCII commands.
Added 'O'pen and 'C'lose functionality.

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

15 years agoAdded timestamp handling with Z0 or Z1 command.
hartkopp [Tue, 3 Feb 2009 11:59:53 +0000 (11:59 +0000)]
Added timestamp handling with Z0 or Z1 command.

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

15 years agoAdded ISO-TP burst mode for data transfers without tx delay.
hartkopp [Mon, 2 Feb 2009 11:03:09 +0000 (11:03 +0000)]
Added ISO-TP burst mode for data transfers without tx delay.

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

15 years agoMSCAN: cleanup unnecessary debug code
wolf [Sun, 1 Feb 2009 15:37:44 +0000 (15:37 +0000)]
MSCAN: cleanup unnecessary debug code

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

15 years agoMSCAN: fix netdev napi name changes starting with 2.6.29
wolf [Sun, 1 Feb 2009 15:34:29 +0000 (15:34 +0000)]
MSCAN: fix netdev napi name changes starting with 2.6.29

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

15 years agosja1000_platform: fix coding style issues (long lines)
wolf [Sun, 1 Feb 2009 15:30:48 +0000 (15:30 +0000)]
sja1000_platform: fix coding style issues (long lines)

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

15 years agoSJA1000: remove unnecessary debugging code
wolf [Sun, 1 Feb 2009 15:26:56 +0000 (15:26 +0000)]
SJA1000: remove unnecessary debugging code

For kernel inclusion, we need to cleanup and remove unnecessary
debugging code from the SJA1000 driver. Therefore I removed the
private DBG debugging interface and converted a few DBG calls to
dev_info() or dev_err(), where appropriate. Maybe they can be
removed as well, please check?

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

15 years agoMake CAN bit-timing calculation configurable
wolf [Sun, 1 Feb 2009 15:24:41 +0000 (15:24 +0000)]
Make CAN bit-timing calculation configurable

This patch adds the Kconfig option CAN_CALC_BITTIMING to make the
calculation of bit-timing parameters configurable. Disabling it will
save some space and will allow user space tools to determine proper
bit-timing parameters exclusively.

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

15 years agoFix 64bit issue in strtoul() usage reported by Kurt Van Dijck:
hartkopp [Thu, 29 Jan 2009 17:04:44 +0000 (17:04 +0000)]
Fix 64bit issue in strtoul() usage reported by Kurt Van Dijck:

The idea is that the (unsigned long *) cast is wrong on 64bit,
therefore, a real unsigned long intermediate variable should be
applied. Before this patch, the can_dlc field was always cleared to 0
again.

Added in the patch is a line that I otherwise needed an ascii table to
understand what was going on. I took the freedom to make it more
programmer-readable wihthout performance penalty :-)

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

15 years agoAdded 'U'pdate functionality to update the content without touching the
hartkopp [Thu, 29 Jan 2009 15:06:42 +0000 (15:06 +0000)]
Added 'U'pdate functionality to update the content without touching the
timers.

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

15 years agoUse ip(8) tool to create vcans.
hartkopp [Mon, 26 Jan 2009 11:33:41 +0000 (11:33 +0000)]
Use ip(8) tool to create vcans.
Cosmetics.

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

15 years agoUpdated to latest CAN core changes:
hartkopp [Wed, 21 Jan 2009 12:45:27 +0000 (12:45 +0000)]
Updated to latest CAN core changes:

From commit r890:
- removed avoidable copy of data in bcm_rx_handler()
- some removal of duplicate code

From commit r894:
Omit unneeded skb_clone() calls.
The AF_CAN core delivered always cloned sk_buffs to the AF_CAN
protocols, although this was _only_ needed by the can-raw protocol.
With this (additionally documented) change, the AF_CAN core calls the
callback functions of the registered AF_CAN protocols with the original
(uncloned) sk_buff pointer and let's the can-raw protocol do the
skb_clone() itself which omits all unneeded skb_clone() calls for other
AF_CAN protocols.

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

15 years agoAdded local definition for ETH_P_CAN to compile the tool tst-packet on
hartkopp [Wed, 21 Jan 2009 11:30:12 +0000 (11:30 +0000)]
Added local definition for ETH_P_CAN to compile the tool tst-packet on
Kernel 2.4 again.

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

15 years agoUpdated to latest CAN core changes:
hartkopp [Wed, 21 Jan 2009 10:14:42 +0000 (10:14 +0000)]
Updated to latest CAN core changes:

From commit r890:
- removed avoidable copy of data in bcm_rx_handler()
- some removal of duplicate code

From commit r894:
Omit unneeded skb_clone() calls.
The AF_CAN core delivered always cloned sk_buffs to the AF_CAN
protocols, although this was _only_ needed by the can-raw protocol.
With this (additionally documented) change, the AF_CAN core calls the
callback functions of the registered AF_CAN protocols with the original
(uncloned) sk_buff pointer and let's the can-raw protocol do the
skb_clone() itself which omits all unneeded skb_clone() calls for other
AF_CAN protocols.

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

15 years agoAdd can_id/can_mask filter handling which is defined in the slcan protocol (m/M).
hartkopp [Wed, 21 Jan 2009 09:17:20 +0000 (09:17 +0000)]
Add can_id/can_mask filter handling which is defined in the slcan protocol (m/M).

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

15 years agoRemoved sanity check for received slcan ASCII data
hartkopp [Wed, 21 Jan 2009 07:38:18 +0000 (07:38 +0000)]
Removed  sanity check for received slcan ASCII data
as this is done with ASCII comparision three lines above.

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

15 years agoRevert commit r910: "Added sanity check for received slcan ASCII data."
hartkopp [Wed, 21 Jan 2009 07:36:32 +0000 (07:36 +0000)]
Revert commit r910: "Added sanity check for received slcan ASCII data."
as this is done with ASCII comparision three lines above.
It obviously was too late yesterday ;-)

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

15 years agoAdded sanity check for received slcan ASCII data.
hartkopp [Tue, 20 Jan 2009 23:09:36 +0000 (23:09 +0000)]
Added sanity check for received slcan ASCII data.

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

15 years agoAdded a proof of concept tool 'slcanpty' which
hartkopp [Tue, 20 Jan 2009 23:06:01 +0000 (23:06 +0000)]
Added a proof of concept tool 'slcanpty' which
creates a pty for applications using the slcan ASCII protocol and
converts the data to a CAN network interface (and vice versa).

This can be used for existing applications to run on SocketCAN.

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

15 years agoMSCAN-MPC52XX: re-write as proper OF driver (/arch/ppc is gone)
wolf [Tue, 20 Jan 2009 18:51:50 +0000 (18:51 +0000)]
MSCAN-MPC52XX: re-write as proper OF driver (/arch/ppc is gone)

Starting with 2.6.28, the /arch/ppc tree is no longer available making
the legacy support obsolete. I took the occasion to re-write the driver
using the proper Open Firmware device driver interface.

Furthermore, MSCAN clock source selection has been enhanced. By default,
the external oscillator clock is now selected where appropriate (for
MPC5200B chips) because it's the better choice according to the MPC5200
user's manual as it has less jitter. The IP bus clock can be selected
via flat device tree property "clock-ipb":

    can@980 {
            compatible = "fsl,mpc5200-mscan";
            interrupts = <2 18 0>;
            interrupt-parent = <&mpc5200_pic>;
            reg = <0x980 0x80>;
            clock-ipb;
    };

Note: the will break compatibiity with old Socket-CAN versions. So far
we always selected the IP bus clock for MSCAN devices.

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

15 years agoMSCAN: don't use interrrupt sharing
wolf [Tue, 20 Jan 2009 18:50:21 +0000 (18:50 +0000)]
MSCAN: don't use interrrupt sharing

The MSCAN devices use dedicated interrupt sources and therefore
interrupt sharing is not needed. This patch corrects the relevant
flags of request_irq().

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

15 years agoMSCAN: netdev layer adaptions for 2.6.29
wolf [Tue, 20 Jan 2009 18:49:44 +0000 (18:49 +0000)]
MSCAN: netdev layer adaptions for 2.6.29

The netdev layer changed again substantially with 2.6.29. This
patch fixes the issues with NAPI and net_device_ops.

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

15 years agodev: add register_candev() and unregister_candev()
wolf [Tue, 20 Jan 2009 18:48:41 +0000 (18:48 +0000)]
dev: add register_candev() and unregister_candev()

Not all CAN devices are using the CAN device interface, like vcan or
slcan. Providing "struct can_priv" and SYSFS files for them seems
overkill. Because it's awkward to identify a device using the CAN
device interface in the netdev notifier callback, the functions
register_candev() and unregister_candev() have been introduced. All
devices using the CAN device interface should call them instead of
register_netdev() and unregister_netdev().

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
This line, and those below, will be ignored--

M    kernel/2.6/include/linux/can/dev.h
M    kernel/2.6/drivers/net/can/dev.c
M    kernel/2.6/drivers/net/can/mcp251x.c
M    kernel/2.6/drivers/net/can/mscan/mscan.c
M    kernel/2.6/drivers/net/can/softing/softing_main.c
M    kernel/2.6/drivers/net/can/sja1000/sja1000.c

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

15 years agoFix crash on re-attaching slcan netdevices ...
hartkopp [Fri, 16 Jan 2009 11:51:44 +0000 (11:51 +0000)]
Fix crash on re-attaching slcan netdevices ...
... by removing the extra code added to slcan.c that was not in slip.c .
Indeed the slip driver (and so the slcan driver) holds the several
created slcan netdevices in a structure and only registeres the allocated
netdevices - but doesn't unregister them immediately at detach time.
Even when detached the devices still appear in /proc/net/dev (!)
Finally the destructor is well defined to execute free_netdev() at
unregister_netdev() which is handled properly.
The added free_netdev() produced a double free and crashed. Sorry.

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

15 years agoReverted the removal of dev->get_stats = can_get_stats for kernels < 2.6.23
hartkopp [Thu, 15 Jan 2009 11:14:12 +0000 (11:14 +0000)]
Reverted the removal of dev->get_stats = can_get_stats for kernels < 2.6.23
For these old kernels the access to the stats from outside the driver
only works via this function call.

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

15 years agoAdded missing SET_NETDEV_DEV() that caused 2.6.29 to crash :-[
hartkopp [Thu, 15 Jan 2009 09:02:53 +0000 (09:02 +0000)]
Added missing SET_NETDEV_DEV() that caused 2.6.29 to crash :-[

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

15 years agoUpdate acces to netstats for 2.6.29
hartkopp [Thu, 15 Jan 2009 08:30:18 +0000 (08:30 +0000)]
Update acces to netstats for 2.6.29
---
The successor of dev->get_stats(dev) in 2.6.29 is dev_get_stats(dev)
which provides a const(!) pointer for read only access to the stats.
As the usual current method to access the stats is to reference
dev->stats directly as stats is part of the struce netdevice
since 2.6.23 this patch implements this method of access now.
For kernels < 2.6.23 the netstats are part of the private data
and only this is handled by a separate wrapper now.
The idea was also to get a proper source code after strip-src.

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

15 years agoSince commit ca109491f612aab5c8152207631c0444f63da97f ("hrtimer:
hartkopp [Wed, 14 Jan 2009 08:49:48 +0000 (08:49 +0000)]
Since commit ca109491f612aab5c8152207631c0444f63da97f ("hrtimer:
removing all ur callback modes") the hrtimer callbacks are processed
only in hardirq context.

This patch moves some functionality into tasklets to run in softirq
context.

This change has also been made for bcm.c:
http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=6e5c172cf7ca1ab878cc6a6a4c1d52fef60f3ee0

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

15 years agoDue to the loopback functionality in can_send() we can not invoke it
hartkopp [Wed, 14 Jan 2009 08:02:23 +0000 (08:02 +0000)]
Due to the loopback functionality in can_send() we can not invoke it
from hardirq context which was done inside the bcm_tx_timeout_handler()
hrtimer callback:

[  700.361154]  [<c012228c>] warn_slowpath+0x80/0xb6
[  700.361163]  [<c013d559>] valid_state+0x125/0x136
[  700.361171]  [<c013d858>] mark_lock+0x18e/0x332
[  700.361180]  [<c013e300>] __lock_acquire+0x12e/0xb1e
[  700.361189]  [<f8ab5915>] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361198]  [<c031e20a>] dev_queue_xmit+0x191/0x479
[  700.361206]  [<c01262a7>] __local_bh_disable+0x2b/0x64
[  700.361213]  [<c031e20a>] dev_queue_xmit+0x191/0x479
[  700.361225]  [<f8aa69a1>] can_send+0xd7/0x11a [can]
[  700.361235]  [<f8ab522b>] bcm_can_tx+0x9d/0xd9 [can_bcm]
[  700.361245]  [<f8ab597f>] bcm_tx_timeout_handler+0x6a/0xbc [can_bcm]
[  700.361255]  [<f8ab5915>] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361263]  [<c0134143>] __run_hrtimer+0x5a/0x86
[  700.361273]  [<f8ab5915>] bcm_tx_timeout_handler+0x0/0xbc [can_bcm]
[  700.361282]  [<c0134a50>] hrtimer_interrupt+0xb9/0x110

This patch moves the rest of the functionality from the hrtimer callback
to the already existing tasklet to fix this slowpath problem.

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

15 years agoConsistencely allow '-?' to get a help text.
hartkopp [Tue, 13 Jan 2009 09:32:45 +0000 (09:32 +0000)]
Consistencely allow '-?' to get a help text.

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

15 years agoUse netdev_priv() as the element priv is no longer supported in 2.6.29.
hartkopp [Thu, 8 Jan 2009 11:09:50 +0000 (11:09 +0000)]
Use netdev_priv() as the element priv is no longer supported in 2.6.29.

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

15 years agoAdded some sample code to use CAN interfaces with PF_PACKET sockets.
hartkopp [Wed, 7 Jan 2009 08:38:59 +0000 (08:38 +0000)]
Added some sample code to use CAN interfaces with PF_PACKET sockets.
Just a proof-of-concept that has several drawbacks:
- you need to be root to access the CAN bus
- no local loopback (therefore virtual CAN interfaces do not really work)
- no CAN filters and other socket options from the can-raw socket

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

15 years agoremove superflous parentheses.
hartkopp [Tue, 6 Jan 2009 10:22:11 +0000 (10:22 +0000)]
remove superflous parentheses.

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

15 years agoOmit unneeded skb_clone() calls.
hartkopp [Tue, 6 Jan 2009 09:23:41 +0000 (09:23 +0000)]
Omit unneeded skb_clone() calls.
The AF_CAN core delivered always cloned sk_buffs to the AF_CAN
protocols, although this was _only_ needed by the can-raw protocol.
With this (additionally documented) change, the AF_CAN core calls the
callback functions of the registered AF_CAN protocols with the original
(uncloned) sk_buff pointer and let's the can-raw protocol do the
skb_clone() itself which omits all unneeded skb_clone() calls for other
AF_CAN protocols.

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

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