hartkopp [Thu, 3 May 2007 15:37:10 +0000 (15:37 +0000)]
removed spinlocks for now as i got a dead lock on heavy CAN traffic with
heavy proc_fs reading. I assume a spinlock is really not needed here.
Checking again tomorrow.
hartkopp [Wed, 2 May 2007 15:41:14 +0000 (15:41 +0000)]
Introduced the module param 'drv_loopback' to switch the vcan driver into
the appropriate loopback mode at loading time.
This makes tests of the CAN core more easy and can additionally be used as
a reference implementation hint.
Also added some comments.
hartkopp [Wed, 2 May 2007 09:48:11 +0000 (09:48 +0000)]
Moved timeval2jiffies function from af_can.c to bcm.c and added a comment why
using the kernel function timeval_to_jiffies() is problematic here.
TODO: Check if this could be a hrtimer use-case here.
hartkopp [Tue, 1 May 2007 14:21:39 +0000 (14:21 +0000)]
Changes after test integration into kernel 2.6.21 :
Exported functions in core.h need to be declared 'extern' to avoid the
kernel error "can: exports duplicate symbol can_send (owned by kernel)"
This occures e.g. when can.ko is built-in and the protocol modules are
built as modules.
Made our kernel log messages lower case as other subsystems like USB do.
Changed some kernel messages. Cosmetics.
RFC: Use 20070501 as CAN_VERSION inside the Kernel instead of 2.0.0-pre7?
Introduced single can_frames inside the bcm_op as 99% of the known
use-cases do not use more than one CAN frame (=> nframes = 1).
These single can_frames inside the bcm_op therefore omit the
expensive kmalloc's for single can_frames with 16 bytes ...
Delete blank lines following the #if LINUX_VESION_CODE ... #endif,
if the #if line was preceded by a blank line and everything between
#if and #endif was deleted, i.e. there would be multiple consecutive
blank lines.
Add -d (debug) option.
Applied patch from Domen Puncer:
- irqhandler_t api change
- socket class_dev api change
- add suspend/resume support to mpc52xx can driver
- add support for arch/powerpc tree
- release_mem_region's size parameter fixed to mem->end - mem->start + 1
- Makefile fix
- s/GPLv2/GPL v2/ as it should be (see module.h)
The new mkpatch script removes the trailing blank lines after a
#if LINUX_VERSION_CODE ...
Added some blank lines to get a better linespacing in the (patched) code.
Unified the RCSID stuff which is usefull when making an external compilation.
The version.h include and the RCSID macro is automatically removed when
creating a (mainline) kernel patch by the script trunk/mkpatch .
Fixed compile error due to moved CAN_VERSION string.
Indeed the version of a netdev driver has nothing to do with the
version of the protocol family CAN core ...
Remove everything from version.h except definition of RCSID().
Rename macro VERSION to CAN_VERSION, now defined in core.h.
Add macro CAN_ABI_VERSION.
Don't include version.h in kernel patches and delete usage of RCSID()
from all files generated by mkpatch.
Added local kzalloc() function for Kernel Versions < 2.6.14 .
kzalloc() became part of the Mainline Kernel in 2.6.14 .
Tnx to the hint from Simon Kallweit.
Following the discussion with tglx the functions can_dev_(un)register get a
return value.
* Moved EXPORT_SYMBOL macro to end of the appropriate function (Codingstyle).
* Added Kerneldoc compatible comments for exported fundctions.
TODO: Check if can_proto_(un)register should also have a return value.
Cleaned up the code according to the hints from a code review with
Thomas Gleixner. Removed many goto's and variable assignments within
conditions for that reason. Usage of kzalloc, etc ...
TODO:
- Add kernel doc comments for structs & public (global) functions
- Find a solution for the RCS / version.h stuff (together with Urs)
- Sort the functions to reduce forward declarations for static functions.
- Check for pr_debug as a replacement for local DBG macros
- And some more details on my list ...
Moved the work from branches/ha/candrv to trunk.
Added support for @$%&! Intel i82527 controller.
Added hardware abstraction layer inspired by the OCAN i82527 driver.
Therefore reworked the SJA1000 driver. Comments / KConfig / etc.
thuermann [Mon, 19 Mar 2007 13:03:37 +0000 (13:03 +0000)]
Add a quick'n'dirty script to generate a kernel patch file.
Needs a list of files to be added on stdin and currently also a diff file
for the kernel version the patch is to be generated for.
hartkopp [Tue, 13 Mar 2007 21:31:59 +0000 (21:31 +0000)]
Due to several complains about the 'failing make' the compilation of the
slcan-driver is now removed as part of the 'all' target.
Not everyone knows 'make -k' and as long as the defines for N_SLCAN are not
commonly defined in the Kernel you have to build the slcan-driver as an extra
target: 'make slcan'
After downloading fresh source code a failing 'make' doesn't smell well :-/
hartkopp [Mon, 12 Mar 2007 20:33:38 +0000 (20:33 +0000)]
Applied patch from Eberhard Stoll to fix MSCAN TX timeout problems:
---
Now it uses only one tx buffer, all others are unused.
For me this seems to be the best way, especially after i read the new
RevB ERRATA sheet. Purging the pending can frame is done via CANTARQ
register.
---
Tnx to Eberhard for the contribution!
hartkopp [Thu, 8 Mar 2007 11:02:43 +0000 (11:02 +0000)]
Moved definition and prototypes for for CAN protocol modules using the PF_CAN
core module into linux/can/core.h to be public visible for external
compilation. Thanks to Urs for the hint and advisory.
hartkopp [Mon, 5 Mar 2007 13:55:34 +0000 (13:55 +0000)]
Defined ARPHARD_CAN as 280 (formerly 804) due to my RFC on the socketcan-core
mailinglist. Had a phonecall with Marc who sees no problem with ARPHRD_CAN 280
hartkopp [Mon, 5 Mar 2007 10:23:51 +0000 (10:23 +0000)]
Added slim Makefiles that are working inside the kernel tree.
For the first step only vcan and slcan drivers are on the roadmap for
integration into the kernel. IMHO the device drivers and the ioctl interface
as well as the CAN driver lib (candev.ko) from Andrey should be focussed
when we're stable integrated into the kernel tree.
hartkopp [Mon, 5 Mar 2007 10:14:18 +0000 (10:14 +0000)]
Moved the definitions of AF_CAN, PF_CAN, ARPHRD_CAN and ETH_P_CAN out of the
file can.h to make can.h fit for a kernel integration path.
Therefore i added the 'hack' to the Makefiles which now contain the missing
defines. Maybe there will be a better solution in the future (when CAN is
part of the kernel). But currently it helps to maintain sourcecode to be
copied right into the kernel source tree.
Additionally added address structures for isotp and bap in sockaddr_can.
Cleanups. Cosmetics.