]> rtime.felk.cvut.cz Git - socketcan-devel.git/log
socketcan-devel.git
14 years agoFix kernel version depency from commit rev 1060
hartkopp [Wed, 23 Sep 2009 18:03:35 +0000 (18:03 +0000)]
Fix kernel version depency from commit rev 1060

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

14 years agoems_usb: move ems_usb.c into the sub-directory usb
wolf [Wed, 23 Sep 2009 09:50:16 +0000 (09:50 +0000)]
ems_usb: move ems_usb.c into the sub-directory usb

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

14 years agocan: make the number of echo skb's configurable
wolf [Tue, 22 Sep 2009 08:08:15 +0000 (08:08 +0000)]
can: make the number of echo skb's configurable

This patch allows the CAN controller driver to define the number
of echo skb's used for the local loopback (echo), as suggested by
Kurt, via:

  struct net_device *alloc_candev(int sizeof_priv,
                                  unsigned int echo_skb_max);

The drivers have been adapted accordingly. Please check if the
value of echo_skb_max is OK for your driver.

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

14 years agocan: Handle netdev->last_rx and netdev_tx_t properly for 2.6.31
wolf [Fri, 18 Sep 2009 12:01:20 +0000 (12:01 +0000)]
can: Handle netdev->last_rx and netdev_tx_t properly for 2.6.31

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

14 years agocan: mscan: fix TX message handling to ensure proper message ordering
wolf [Wed, 16 Sep 2009 08:42:21 +0000 (08:42 +0000)]
can: mscan: fix TX message handling to ensure proper message ordering

An out-of-order TX message problem has been reported and demonstrated
by Vladislav. The TX message buffers were not handled properly if
just one message was pending. This patch remembers the id of the buffer
used previously and increase the buffer priority if the next one has a
lower id number. This allows up to approx. 3*256 messages to be sent
until the lowest buffer priority of 255 is reached.

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

14 years agosja1000: fix network statistics update
wolf [Tue, 15 Sep 2009 18:42:01 +0000 (18:42 +0000)]
sja1000: fix network statistics update

The member "tx_bytes" of "struct net_device_stats" should be
incremented when the interrupt is done and an "arbitration
lost error" is a TX error and the statistics should be updated
accordingly.

See net-next-2.6 commit 8935f57e68c40c6469efe03f996bfb6150e18c6b

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

14 years agoat91_can: fix missing version dependencies for superfluous ->last_rx stores
wolf [Tue, 15 Sep 2009 18:37:11 +0000 (18:37 +0000)]
at91_can: fix missing version dependencies for superfluous ->last_rx stores

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

14 years agoat91_can: add NAPI support fix error and bus off handling
wolf [Tue, 15 Sep 2009 18:25:47 +0000 (18:25 +0000)]
at91_can: add NAPI support fix error and bus off handling

This patch updates the at91_can driver it features:
- NAPI for rx and error packages
  (tx and state changes stay in irq handler)
- implemented bus off and errror handling conforming to the
  Linux CAN API

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

14 years agocan: fix NOHZ local_softirq_pending 08 warning
hartkopp [Tue, 15 Sep 2009 17:29:13 +0000 (17:29 +0000)]
can: fix NOHZ local_softirq_pending 08 warning

When using nanosleep() in an userspace application we get a ratelimit warning

NOHZ: local_softirq_pending 08

for 10 times.

The echo of CAN frames is done from process context and softirq context only.
Therefore the usage of netif_rx() was wrong (for years).

This patch replaces netif_rx() with netif_rx_ni() which has to be used from
process/softirq context. It also adds a missing comment that can_send() must
no be used from hardirq context.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
Also in mainline.

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

14 years agoems_usb: Fix inconsistent naming of devs
wolf [Thu, 10 Sep 2009 14:18:23 +0000 (14:18 +0000)]
ems_usb: Fix inconsistent naming of devs

This patch fixes inconsistent use of netdev, dev and priv
variable names.

Signed-off-by: Sebastian Haas <haas@ems-wuensche.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1054 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoems_usb: CAN/USB driver for EMS CPC-USB/ARM7 CAN interfaces
wolf [Thu, 10 Sep 2009 11:36:21 +0000 (11:36 +0000)]
ems_usb: CAN/USB driver for EMS CPC-USB/ARM7 CAN interfaces

This patch adds support for the CAN/USB interface CPC-USB/ARM7 from EMS
Dr. Thomas Wuensche.

Signed-off-by: Sebastian Haas <haas@ems-wuensche.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1053 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agoIntroduce KERNELDIR variable to allow override when invoking make on commandline.
hartkopp [Thu, 10 Sep 2009 08:01:00 +0000 (08:01 +0000)]
Introduce KERNELDIR variable to allow override when invoking make on commandline.

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

14 years agocan: sja1000: remove duplicated includes
hartkopp [Thu, 10 Sep 2009 07:43:36 +0000 (07:43 +0000)]
can: sja1000: remove duplicated includes

Following:

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

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

14 years agoMove BCM server into can-utils as it is not test application anymore.
hartkopp [Thu, 10 Sep 2009 07:39:33 +0000 (07:39 +0000)]
Move BCM server into can-utils as it is not test application anymore.

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

14 years agoRemove obsolete 'vcan' tool.
hartkopp [Thu, 10 Sep 2009 07:34:06 +0000 (07:34 +0000)]
Remove obsolete 'vcan' tool.

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

14 years agoFix connotation remarked by Chris Verges.
hartkopp [Thu, 3 Sep 2009 06:32:43 +0000 (06:32 +0000)]
Fix connotation remarked by Chris Verges.

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

14 years agorevert code movement from previous commit.
hartkopp [Mon, 31 Aug 2009 14:41:15 +0000 (14:41 +0000)]
revert code movement from previous commit.

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

14 years agoUpdate minor changes from mainline, e.g.
hartkopp [Mon, 31 Aug 2009 12:16:26 +0000 (12:16 +0000)]
Update minor changes from mainline, e.g.

can: switch carrier on if device was stopped while in bus-off state
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=1b0d92244ff2434a98272f6d2525da32fc230f19

And reorder of can_update_spt() in can_calc_bittiming().

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

14 years agoSupport nested #if LINUX_VERSION_CODE ... conditions.
thuermann [Mon, 31 Aug 2009 09:02:05 +0000 (09:02 +0000)]
Support nested #if LINUX_VERSION_CODE ... conditions.
This is needed in kernel/2.6/drivers/net/can/mscan/mpc52xx_can.c.
Also fix white-space.

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

14 years agocan: use correct NET_RX_ return values
hartkopp [Mon, 31 Aug 2009 06:35:22 +0000 (06:35 +0000)]
can: use correct NET_RX_ return values

Dropped skb's should be documented by an appropriate return value.
Use the correct NET_RX_DROP and NET_RX_SUCCESS values for that reason.

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

14 years agoAdd support for seq_file in Kernels >= 2.6.26.
hartkopp [Mon, 31 Aug 2009 06:26:30 +0000 (06:26 +0000)]
Add support for seq_file in Kernels >= 2.6.26.

Provided by Alexey Dobriyan.

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

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

14 years agoSubstitute ND2D() macro by default when creating patches with mkpatch.
hartkopp [Thu, 27 Aug 2009 05:55:41 +0000 (05:55 +0000)]
Substitute ND2D() macro by default when creating patches with mkpatch.

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

14 years agoUpdated Kconfig entries that are already in mainline to the mainline content.
hartkopp [Thu, 27 Aug 2009 05:27:31 +0000 (05:27 +0000)]
Updated Kconfig entries that are already in mainline to the mainline content.

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

14 years agoUpdated Kconfig.kernel to latest mainline version.
hartkopp [Thu, 27 Aug 2009 05:20:55 +0000 (05:20 +0000)]
Updated Kconfig.kernel to latest mainline version.

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

14 years agocan: Use WARN_ONCE() instead of BUG_ON() for sanity check in receive path
hartkopp [Wed, 26 Aug 2009 12:20:34 +0000 (12:20 +0000)]
can: Use WARN_ONCE() instead of BUG_ON() for sanity check in receive path

Only for Kernel 2.6.27+
Upstream for Mainline 2.6.32

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

To ensure a proper handling of CAN frames transported in skbuffs some checks
need to be performed at receive time.

As stated by Michael Olbrich and Luotao Fu BUG_ON() might be to restrictive.
This is right as we can just drop the non conform skbuff and the Kernel can
continue working.

This patch replaces the BUG_ON() with a WARN_ONCE() so that the system remains
healthy but we made the problem visible (once).

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
CC: Michael Olbrich <m.olbrich@pengutronix.de>
CC: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1039 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agomerged branches/netlink in rev. 1037 back to trunk.
hartkopp [Fri, 21 Aug 2009 10:00:21 +0000 (10:00 +0000)]
merged branches/netlink in rev. 1037 back to trunk.

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

14 years agonet/can bugfix: use after free bug in can protocol drivers
hartkopp [Mon, 20 Jul 2009 07:11:21 +0000 (07:11 +0000)]
net/can bugfix: use after free bug in can protocol drivers

Fix a use after free bug in can protocol drivers

The release functions of the can protocol drivers lack a call to
sock_orphan() which leads to referencing freed memory under certain
circumstances.

This patch fixes a bug reported here:
https://lists.berlios.de/pipermail/socketcan-users/2009-July/000985.html

net-2.6 git commit f7e5cc0c40dff92bad2894153f675c6c542ba2f0

Signed-off-by: Lothar Wassmann <LW@KARO-electronics.de>
Acked-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1033 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agonet/can: add module alias to can protocol drivers
hartkopp [Mon, 20 Jul 2009 07:01:03 +0000 (07:01 +0000)]
net/can: add module alias to can protocol drivers

Add appropriate MODULE_ALIAS() to facilitate autoloading of can protocol drivers

git commit: b13bb2e9933b9dfa25c81d959d847c843481111e

Signed-off-by: Lothar Wassmann <LW@KARO-electronics.de>
Acked-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@1032 030b6a49-0b11-0410-94ab-b0dab22257f2

14 years agodev: add can_get_echo_skb() for cleanup purposes
wolf [Tue, 2 Jun 2009 11:57:19 +0000 (11:57 +0000)]
dev: add can_get_echo_skb() for cleanup purposes

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

14 years agodev: Use minimal set of SYSFS flies for intelligent CAN controllers
wolf [Tue, 2 Jun 2009 11:55:06 +0000 (11:55 +0000)]
dev: Use minimal set of SYSFS flies for intelligent CAN controllers

Active or intelligent CAN controllers do the setting of the bit-timing
internally rendering most of the standard bit-timing parameters for
the passive CAN controllers unnecessary. Usually just an index to a
fixed bit-time setting can be selected. For this purpose, just the
SYSFS file "can_bittiming/bitrate" will be created, if the CAN
bit-timing constants are not provided for the device.

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

14 years agoDriver for the esd PCI/331, CPCI/331 and PMC/331 cards
wolf [Tue, 2 Jun 2009 11:47:02 +0000 (11:47 +0000)]
Driver for the esd PCI/331, CPCI/331 and PMC/331 cards

This patch adds support for the PCI/331, CPCI/331 and PMC/331 CAN
interface cards from electronic system design gmbh.

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

15 years agoAdded slcand daemon contributed by Robert Haddon <robert.haddon@verari.com>
hartkopp [Tue, 5 May 2009 09:40:10 +0000 (09:40 +0000)]
Added slcand daemon contributed by Robert Haddon <robert.haddon@verari.com>

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

15 years agoAs the original code was already under GPL the additional license information was...
hartkopp [Tue, 5 May 2009 09:00:33 +0000 (09:00 +0000)]
As the original code was already under GPL the additional license information was removed.
Also moved the dual license BSD/GPL to only GPL.
Added some information about N_SLCAN in precompiled Kernels provided by Lionel Saugrain.

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

15 years agoAdded backport of slcan driver to kernel 2.4 tree.
hartkopp [Tue, 5 May 2009 08:49:03 +0000 (08:49 +0000)]
Added backport of slcan driver to kernel 2.4 tree.

Signed-off-by: Lionel Saugrain <lionel.saugrain at sogeti.com>
Signed-off-by: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@971 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoDrivers for esd SJA1000 based PCI CAN cards
wolf [Thu, 23 Apr 2009 08:47:30 +0000 (08:47 +0000)]
Drivers for esd SJA1000 based PCI CAN cards

This patch adds support for SJA1000 based PCI CAN interface cards
from electronic system design gmbh.

The following list of boards are supported:

        CAN-PCI/200 (PCI)
        CAN-PCI/266 (PCI)
        CAN-PMC266 (PMC module)
        CAN-PCIe/2000 (PCI Express)
        CAN-CPCI/200 (Compact PCI, 3U)
        CAN-PCI104 (PCI104)

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@970 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoFor the Network Drop Monitor introduced in 2.6.30 by Neil Horman the
hartkopp [Thu, 16 Apr 2009 08:43:14 +0000 (08:43 +0000)]
For the Network Drop Monitor introduced in 2.6.30 by Neil Horman the
end-of-line points for skbs that are not dropped due to errors should
use consume_skb() instead of kfree_skb() to not be monitored as a 'drop'.

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

15 years agoAdded commandline option '-r' to set the per-socket receive buffer size.
hartkopp [Thu, 16 Apr 2009 08:05:42 +0000 (08:05 +0000)]
Added commandline option '-r' to set the per-socket receive buffer size.

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

15 years agoRemoved the limitation for the number of CAN filters for each interface.
hartkopp [Mon, 6 Apr 2009 11:15:27 +0000 (11:15 +0000)]
Removed the limitation for the number of CAN filters for each interface.
Updated Copyright notice.
And finally: Yeah! I did something with malloc :-)

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

15 years agoAT91SAM9263 CAN driver taken from Marc's GIT repository
wolf [Mon, 6 Apr 2009 10:59:05 +0000 (10:59 +0000)]
AT91SAM9263 CAN driver taken from Marc's GIT repository
(http://pasiphae.extern.pengutronix.de/?p=mkl/linux-can;a=summary)
commit id 95742fd12484176ecaa7c54a1d08e744fac487e3
and adapted to work with the latest SVN version 963 of SocketCAN
according to SJA1000 driver. Changes:

- change register_netdev() to register_candev()
- fix bittiming constants to enable bitrates up to 1000000 bps
- some cosmetic changes and spelling errors fixes

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
git-svn-id: svn://svn.berlios.de//socketcan/trunk@966 030b6a49-0b11-0410-94ab-b0dab22257f2

15 years agoAdd functionality to
hartkopp [Mon, 6 Apr 2009 08:41:17 +0000 (08:41 +0000)]
Add functionality to
terminate after receiption of <count> CAN frames.

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

15 years agoproc 2/2: remove struct proc_dir_entry::owner
hartkopp [Fri, 3 Apr 2009 15:12:40 +0000 (15:12 +0000)]
proc 2/2: remove struct proc_dir_entry::owner

Updated SVN for Kernel versions > 2.6.29 following git commit

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=99b76233803beab302123d243eea9e41149804f3

from Alexey Dobriyan <adobriyan@gmail.com>

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

15 years agoAdded some more documentation.
hartkopp [Tue, 17 Mar 2009 14:50:02 +0000 (14:50 +0000)]
Added some more documentation.

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

15 years agoAdded signal handler (from Andre Naujoks) and read exit condition.
hartkopp [Wed, 11 Mar 2009 11:02:49 +0000 (11:02 +0000)]
Added signal handler (from Andre Naujoks) and read exit condition.

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

15 years agoAdded BCM receive functions 'R', 'F' and 'X'.
hartkopp [Wed, 11 Mar 2009 09:53:22 +0000 (09:53 +0000)]
Added BCM receive functions 'R', 'F' and 'X'.
Changed command parser to be robust for single chars and select().
Documentation & cosmetics.

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

15 years agoRemove some pointless conditionals before kfree_skb().
hartkopp [Sun, 1 Mar 2009 19:03:27 +0000 (19:03 +0000)]
Remove some pointless conditionals before kfree_skb().
(for Kernels > 2.6.16)

Following commit

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

from Wei Yongjun.

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

15 years agoAdd missing SET_NETDEV_DEV() in SJA1000 OF platform driver
wolf [Fri, 27 Feb 2009 07:54:30 +0000 (07:54 +0000)]
Add missing SET_NETDEV_DEV() in SJA1000 OF platform driver

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

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