linux-lin.git
2 years agoUpdate for changes in recent linux kernels alexander-stein-v2
trainman419 [Mon, 25 Apr 2016 17:41:13 +0000 (10:41 -0700)]
Update for changes in recent linux kernels

5 years agoAdjust sllin configuration utility to specify external expected response length.
Pavel Pisa [Fri, 17 Jan 2014 00:31:47 +0000 (01:31 +0100)]
Adjust sllin configuration utility to specify external expected response length.

The setup of the length has meaning not only for sent frames
but even for received responses. The new kernel driver
code uses DLC value stored in the cache for received frames.
The LIN_CACHE_RESPONSE is used only for IDs which
should be sent by the kernel driver.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
5 years agosllin: Evaluate message upon break only if received at least a LIN ID
Alexander Stein [Mon, 16 Dec 2013 07:54:14 +0000 (08:54 +0100)]
sllin: Evaluate message upon break only if received at least a LIN ID

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: Add LIN ID to timeout frame
Alexander Stein [Mon, 16 Dec 2013 07:54:13 +0000 (08:54 +0100)]
sllin: Add LIN ID to timeout frame

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: Don't fiddle with netdev queue and skb in slave receive mode
Alexander Stein [Mon, 16 Dec 2013 07:54:12 +0000 (08:54 +0100)]
sllin: Don't fiddle with netdev queue and skb in slave receive mode

The queue and stored skb is only used for master mode.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: signal timeout if there are less than configured characters
Alexander Stein [Mon, 16 Dec 2013 07:54:11 +0000 (08:54 +0100)]
sllin: signal timeout if there are less than configured characters

We will hit the timeout if there is a larger length configured than
actually received or none at all. Signal this to userspace.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: Do not set SLF_MSGEVENT flag
Alexander Stein [Mon, 16 Dec 2013 07:54:10 +0000 (08:54 +0100)]
sllin: Do not set SLF_MSGEVENT flag

This is only used if there is some Tx CAN frame.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: dlc in cache > 0 is the expected LIN frame length
Alexander Stein [Mon, 16 Dec 2013 07:54:09 +0000 (08:54 +0100)]
sllin: dlc in cache > 0 is the expected LIN frame length

A cache entry should not be set to LIN_CACHE_RESPONSE if there is nothing
to reply from this node. A dlc set > 0 configures the expected length.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: Fix checksum mode decision
Alexander Stein [Mon, 16 Dec 2013 07:54:08 +0000 (08:54 +0100)]
sllin: Fix checksum mode decision

rx_buff[SLLIN_BUFF_ID] only holds LIN ID + parity bits, but never internal
bits like LIN_CHECKSUM_EXTENDED.
Use correct value from internal cache entry.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: Add version dependent access to termios in tty_struct
Alexander Stein [Mon, 16 Dec 2013 07:54:07 +0000 (08:54 +0100)]
sllin: Add version dependent access to termios in tty_struct

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: Add first support for LIN slave task on slave node
Alexander Stein [Mon, 16 Dec 2013 07:54:06 +0000 (08:54 +0100)]
sllin: Add first support for LIN slave task on slave node

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: If length is unknown read until timer occurs or break is received
Alexander Stein [Mon, 16 Dec 2013 07:54:05 +0000 (08:54 +0100)]
sllin: If length is unknown read until timer occurs or break is received

If the length is unknown stop waiting for new data until the tty rx queue
is empty once is not working on fast systems where sllin_receive_buf is
called for each byte received. Instead wait up to 8 bytes, when the
timeout occurs or when a new break is received.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: reorder functions
Alexander Stein [Mon, 16 Dec 2013 07:54:04 +0000 (08:54 +0100)]
sllin: reorder functions

Needed for further commits

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: slave: don't forget to wait for the checksum
Alexander Stein [Tue, 10 Dec 2013 17:16:14 +0000 (18:16 +0100)]
sllin: slave: don't forget to wait for the checksum

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: Make local functions static
Alexander Stein [Tue, 10 Dec 2013 17:16:13 +0000 (18:16 +0100)]
sllin: Make local functions static

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
5 years agosllin: Replace pr_* with netdev_* where approriate
Alexander Stein [Tue, 10 Dec 2013 17:16:12 +0000 (18:16 +0100)]
sllin: Replace pr_* with netdev_* where approriate

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
6 years agolin_config: Use strtol() instead of atoi() + errorhandling
Rostislav Lisovy [Fri, 3 Aug 2012 13:18:00 +0000 (15:18 +0200)]
lin_config: Use strtol() instead of atoi() + errorhandling

6 years agolin_config: Help screen
Rostislav Lisovy [Fri, 3 Aug 2012 12:55:33 +0000 (14:55 +0200)]
lin_config: Help screen

6 years agolin_config: Parsing of "device type" when is part of device path
Rostislav Lisovy [Thu, 2 Aug 2012 15:44:57 +0000 (17:44 +0200)]
lin_config: Parsing of "device type" when is part of device path

6 years agosllin: Fixed some issues reported by checkpatch.pl
Rostislav Lisovy [Thu, 2 Aug 2012 14:14:50 +0000 (16:14 +0200)]
sllin: Fixed some issues reported by checkpatch.pl

6 years agosllin: Minor fixes to properly compile on 3.5 linux kernel
Rostislav Lisovy [Thu, 2 Aug 2012 14:06:18 +0000 (16:06 +0200)]
sllin: Minor fixes to properly compile on 3.5 linux kernel

6 years agolin_config: Configuration of sllin frame cache
Rostislav Lisovy [Fri, 20 Jul 2012 16:14:00 +0000 (18:14 +0200)]
lin_config: Configuration of sllin frame cache

6 years agosllin: Makefile upgrade
Rostislav Lisovy [Fri, 20 Jul 2012 13:17:42 +0000 (15:17 +0200)]
sllin: Makefile upgrade

6 years agolin_config: Added missing header
Rostislav Lisovy [Fri, 20 Jul 2012 13:15:41 +0000 (15:15 +0200)]
lin_config: Added missing header

6 years agoMerge /home/pi/repo/lin/pcan_lin_config/submodule/linux-lin
Pavel Pisa [Fri, 20 Jul 2012 13:07:22 +0000 (15:07 +0200)]
Merge /home/pi/repo/lin/pcan_lin_config/submodule/linux-lin

6 years agolin_config: Basic sllin frame cache configuration
Rostislav Lisovy [Fri, 20 Jul 2012 12:50:05 +0000 (14:50 +0200)]
lin_config: Basic sllin frame cache configuration

6 years agosllin: Flags clean up
Rostislav Lisovy [Fri, 20 Jul 2012 09:16:43 +0000 (11:16 +0200)]
sllin: Flags clean up

6 years agolin_config: Added script simplifying running of lin_config
Rostislav Lisovy [Thu, 19 Jul 2012 16:26:30 +0000 (18:26 +0200)]
lin_config: Added script simplifying running of lin_config

6 years agolin_config: Run as daemon when configuring sllin tty line discipline
Rostislav Lisovy [Thu, 19 Jul 2012 16:19:47 +0000 (18:19 +0200)]
lin_config: Run as daemon when configuring sllin tty line discipline

6 years agolinconf: Fix baudrate setting for PCAN-LIN
Rostislav Lisovy [Thu, 19 Jul 2012 14:11:55 +0000 (16:11 +0200)]
linconf: Fix baudrate setting for PCAN-LIN

6 years agolinconf: Basic sllin configuration.
Rostislav Lisovy [Wed, 18 Jul 2012 15:33:05 +0000 (17:33 +0200)]
linconf: Basic sllin configuration.

6 years agolinconf: Modular architecture.
Rostislav Lisovy [Mon, 16 Jul 2012 15:02:00 +0000 (17:02 +0200)]
linconf: Modular architecture.

Configuring of another devices should be implemented more easily.

6 years agopcanlin: Passing of XML configuration file path through program parameter
Rostislav Lisovy [Thu, 31 May 2012 13:36:18 +0000 (15:36 +0200)]
pcanlin: Passing of XML configuration file path through program parameter

6 years agopcanlin: Added example XML configuration file
Rostislav Lisovy [Thu, 31 May 2012 13:35:21 +0000 (15:35 +0200)]
pcanlin: Added example XML configuration file

6 years agopcanlin: Basic parsing of XML configuration files
Rostislav Lisovy [Thu, 31 May 2012 13:11:05 +0000 (15:11 +0200)]
pcanlin: Basic parsing of XML configuration files

6 years agopcanlin: Upgraded Makefile
Rostislav Lisovy [Thu, 31 May 2012 13:10:30 +0000 (15:10 +0200)]
pcanlin: Upgraded Makefile

6 years agopcanlin: Initial commit.
Rostislav Lisovy [Thu, 31 May 2012 13:08:27 +0000 (15:08 +0200)]
pcanlin: Initial commit.

7 years agosllin: Fixed potential invalid pointer dereference.
Rostislav Lisovy [Thu, 16 Feb 2012 15:14:53 +0000 (16:14 +0100)]
sllin: Fixed potential invalid pointer dereference.

7 years agosllin: Handling with incorrect Break or Sync characters.
Rostislav Lisovy [Wed, 15 Feb 2012 17:31:49 +0000 (18:31 +0100)]
sllin: Handling with incorrect Break or Sync characters.

7 years agosllin: TTY RX function split into two different functions -- one for Master mode...
Rostislav Lisovy [Fri, 10 Feb 2012 17:19:08 +0000 (18:19 +0100)]
sllin: TTY RX function split into two different functions -- one for Master mode another one for Slave mode.

7 years agosllin: Fixed reception of LIN response in Master mode.
Rostislav Lisovy [Mon, 6 Feb 2012 14:17:52 +0000 (15:17 +0100)]
sllin: Fixed reception of LIN response in Master mode.

7 years agosllin: protection against sllin_write_wakeup and sllin_send_tx_buff concurrency.
Pavel Pisa [Sun, 5 Feb 2012 23:27:43 +0000 (00:27 +0100)]
sllin: protection against sllin_write_wakeup and sllin_send_tx_buff concurrency.

The lock-less mutual exclusion protect code against
theoretical possibility of concurrent execution attempt.
That scenario can appear only on UART with FIFO shorter
than 10 characters and likely impossible even in such
cases.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
7 years agosllin: Use separate spinlock for LIN frame cache and processing protection.
Pavel Pisa [Sun, 5 Feb 2012 22:04:21 +0000 (23:04 +0100)]
sllin: Use separate spinlock for LIN frame cache and processing protection.

The sl->linfr_lock spinlock is used with spin_lock_irqsave
exclusivelly and it is safe to use it in all kinds
of contexts (thread, bottom-halves or even IRQ handlers).
The sl->lock protects network device related data
and outside of sll_xmit or other bottom-halves callbacks
has to be locked with spin_lock_bh variant.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
7 years agoAdd locking around frame_cache manipulation
Michal Sojka [Wed, 25 Jan 2012 00:07:45 +0000 (01:07 +0100)]
Add locking around frame_cache manipulation

7 years agoSmall fixes in documentation.
Rostislav Lisovy [Mon, 16 Jan 2012 10:14:29 +0000 (11:14 +0100)]
Small fixes in documentation.

7 years agoCoding style only.
Rostislav Lisovy [Mon, 16 Jan 2012 10:08:03 +0000 (11:08 +0100)]
Coding style only.

Fixes with regard to errors reported by checkpatch.pl script (part of Linux kernel package).

7 years agoMerge branch 'master' of ssh://rtime.felk.cvut.cz/lisovros/pcan_lin into experiments
Rostislav Lisovy [Fri, 6 Jan 2012 14:53:55 +0000 (15:53 +0100)]
Merge branch 'master' of ssh://rtime.felk.cvut.cz/lisovros/pcan_lin into experiments

7 years agosllin: Documentation.
Rostislav Lisovy [Mon, 2 Jan 2012 10:00:46 +0000 (11:00 +0100)]
sllin: Documentation.

7 years agosllin: Enhanced reception of LIN frames in Slave mode.
Rostislav Lisovy [Wed, 21 Dec 2011 16:39:09 +0000 (17:39 +0100)]
sllin: Enhanced reception of LIN frames in Slave mode.

7 years agosllin: Bugfix. Check length in sll_bump.
Rostislav Lisovy [Wed, 21 Dec 2011 16:30:32 +0000 (17:30 +0100)]
sllin: Bugfix. Check length in sll_bump.

7 years agosllin: Some more corrections to Slave mode.
Rostislav Lisovy [Wed, 21 Dec 2011 12:48:26 +0000 (13:48 +0100)]
sllin: Some more corrections to Slave mode.

7 years agosllin: Small corrections to Slave mode.
Rostislav Lisovy [Wed, 21 Dec 2011 12:08:26 +0000 (13:08 +0100)]
sllin: Small corrections to Slave mode.

7 years agosllin: Enabled sending of RTR CAN frame, when there was LIN header on the bus (in...
Rostislav Lisovy [Mon, 19 Dec 2011 16:58:32 +0000 (17:58 +0100)]
sllin: Enabled sending of RTR CAN frame, when there was LIN header on the bus (in slave mode).

7 years agosllin: Very basic LIN bus monitoring feature.
Rostislav Lisovy [Mon, 19 Dec 2011 16:36:56 +0000 (17:36 +0100)]
sllin: Very basic LIN bus monitoring feature.

Enabled when the module is loaded with parameter master=0.

7 years agosllin: Added module parameters.
Rostislav Lisovy [Mon, 19 Dec 2011 14:10:17 +0000 (15:10 +0100)]
sllin: Added module parameters.

7 years agosllin: Added authors.
Rostislav Lisovy [Mon, 19 Dec 2011 13:16:14 +0000 (14:16 +0100)]
sllin: Added authors.

7 years agosllin: Improved handling of UART errors.
Rostislav Lisovy [Mon, 19 Dec 2011 13:04:16 +0000 (14:04 +0100)]
sllin: Improved handling of UART errors.

7 years agosllin: Ensure full initialization of all termios flags.
Rostislav Lisovy [Mon, 19 Dec 2011 12:13:21 +0000 (13:13 +0100)]
sllin: Ensure full initialization of all termios flags.

7 years agosllin: Pictures of real communication on LIN bus.
Rostislav Lisovy [Fri, 16 Dec 2011 14:26:27 +0000 (15:26 +0100)]
sllin: Pictures of real communication on LIN bus.

7 years agosllin: Bugfix. Stop rx_timer when LIN response is received as CAN frame.
Rostislav Lisovy [Fri, 16 Dec 2011 12:39:05 +0000 (13:39 +0100)]
sllin: Bugfix. Stop rx_timer when LIN response is received as CAN frame.

7 years agosllin: rx_timer is also used when waiting for received characters while sending Heade...
Rostislav Lisovy [Fri, 16 Dec 2011 09:46:32 +0000 (10:46 +0100)]
sllin: rx_timer is also used when waiting for received characters while sending Header -- this prevents from blocking when faulty or no LIN-voltage-level-converter is used.

7 years agosllin: Updating of Error counters belonging to netdevice when an error occurs.
Rostislav Lisovy [Wed, 14 Dec 2011 14:52:42 +0000 (15:52 +0100)]
sllin: Updating of Error counters belonging to netdevice when an error occurs.

7 years agosllin: All comments are C89 compatible.
Rostislav Lisovy [Wed, 14 Dec 2011 14:39:08 +0000 (15:39 +0100)]
sllin: All comments are C89 compatible.

7 years agosllin: Documentation.
Rostislav Lisovy [Wed, 14 Dec 2011 13:55:39 +0000 (14:55 +0100)]
sllin: Documentation.

7 years agosllin: Removed unnecessary white-spaces.
Rostislav Lisovy [Wed, 14 Dec 2011 13:17:16 +0000 (14:17 +0100)]
sllin: Removed unnecessary white-spaces.

7 years agosllin: Added patches enabling some programs from can-utils to work with sllin.
Rostislav Lisovy [Wed, 14 Dec 2011 12:50:01 +0000 (13:50 +0100)]
sllin: Added patches enabling some programs from can-utils to work with sllin.

7 years agosllin: Changed prefix for LIN flags/masks from SLLIN_ to LIN_.
Rostislav Lisovy [Wed, 14 Dec 2011 12:41:33 +0000 (13:41 +0100)]
sllin: Changed prefix for LIN flags/masks from SLLIN_ to LIN_.

7 years agosllin: General purpose LIN-related flags and masks moved into separate header file.
Rostislav Lisovy [Wed, 14 Dec 2011 12:33:20 +0000 (13:33 +0100)]
sllin: General purpose LIN-related flags and masks moved into separate header file.

7 years agosllin: Added comments.
Rostislav Lisovy [Wed, 14 Dec 2011 12:26:59 +0000 (13:26 +0100)]
sllin: Added comments.

7 years agosllin: "printk(KERN_INFO...)" changed to pr_debug() to easier enabling/disabling...
Rostislav Lisovy [Wed, 14 Dec 2011 10:56:33 +0000 (11:56 +0100)]
sllin: "printk(KERN_INFO...)" changed to pr_debug() to easier enabling/disabling of printing of debugging information.

7 years agosllin: Checking of checksum on received LIN frames.
Rostislav Lisovy [Mon, 12 Dec 2011 17:35:03 +0000 (18:35 +0100)]
sllin: Checking of checksum on received LIN frames.

7 years agosllin: Reorganization and optimization of State automaton.
Rostislav Lisovy [Mon, 12 Dec 2011 15:24:36 +0000 (16:24 +0100)]
sllin: Reorganization and optimization of State automaton.

sllin_configure_frame_cache moved out of Switch statement into sll_xmit
(access to sl->linfr_cache is now done with spinlocks).

7 years agosllin: Time to sleep during sending Break is computed depending on baud rate.
Rostislav Lisovy [Mon, 12 Dec 2011 15:21:42 +0000 (16:21 +0100)]
sllin: Time to sleep during sending Break is computed depending on baud rate.

7 years agosllin: Reception an parsing of CAN frames enabled immediately after LIN header was...
Rostislav Lisovy [Mon, 12 Dec 2011 14:00:55 +0000 (15:00 +0100)]
sllin: Reception an parsing of CAN frames enabled immediately after LIN header was sent.

This makes possible to send LIN response received as CAN
frame immediately after LIN header transmission.

7 years agosllin: Errors are reported as CAN frames with particular SLLIN_ERR_ flags set.
Rostislav Lisovy [Fri, 9 Dec 2011 16:22:50 +0000 (17:22 +0100)]
sllin: Errors are reported as CAN frames with particular SLLIN_ERR_ flags set.

7 years agosllin: Removed unused code.
Rostislav Lisovy [Fri, 9 Dec 2011 15:06:43 +0000 (16:06 +0100)]
sllin: Removed unused code.

7 years agosllin: It is possible to send "LIN response" from linfr_cache when configured.
Rostislav Lisovy [Fri, 9 Dec 2011 14:35:48 +0000 (15:35 +0100)]
sllin: It is possible to send "LIN response" from linfr_cache when configured.

7 years agosllin: Added LIN frame cache and its configuration with CAN EFF frames.
Rostislav Lisovy [Fri, 9 Dec 2011 12:58:30 +0000 (13:58 +0100)]
sllin: Added LIN frame cache and its configuration with CAN EFF frames.

7 years agosllin: Network statistics for received CAN frames.
Rostislav Lisovy [Wed, 7 Dec 2011 17:26:12 +0000 (18:26 +0100)]
sllin: Network statistics for received CAN frames.

7 years agosllin: Sending CAN frame with LIN data payload received from LIN slave response from...
Rostislav Lisovy [Wed, 7 Dec 2011 17:19:41 +0000 (18:19 +0100)]
sllin: Sending CAN frame with LIN data payload received from LIN slave response from the LIN bus.

7 years agosllin: Added timer handling timeout when receiving LIN response.
Rostislav Lisovy [Sat, 3 Dec 2011 19:43:56 +0000 (20:43 +0100)]
sllin: Added timer handling timeout when receiving LIN response.

7 years agolin_master: Checking if character read is really a break.
Rostislav Lisovy [Fri, 2 Dec 2011 13:46:05 +0000 (14:46 +0100)]
lin_master: Checking if character read is really a break.

7 years agosllin: Improved sending of a "LIN response" sent by master following LIN header.
Rostislav Lisovy [Fri, 2 Dec 2011 13:42:28 +0000 (14:42 +0100)]
sllin: Improved sending of a "LIN response" sent by master following LIN header.

7 years agosllin: LIN frame is sent (to TTY) after receiving CAN frame (from network subsystem).
Rostislav Lisovy [Wed, 30 Nov 2011 16:09:00 +0000 (17:09 +0100)]
sllin: LIN frame is sent (to TTY) after receiving CAN frame (from network subsystem).

RTR CAN frame received     -> LIN header sent
NON-RTR CAN frame received -> LIN header + LIN response sent

7 years agoBreak correctly generated either with timer or with baud-rate change.
Rostislav Lisovy [Mon, 28 Nov 2011 16:29:39 +0000 (17:29 +0100)]
Break correctly generated either with timer or with baud-rate change.

One way how to generate Break is by manually controlling break signal
while sleeping with timer.
Another way is to slower baud-rate of an UART and send 0x00.

7 years agosllin: Generating Break signal done with our own function.
Rostislav Lisovy [Fri, 25 Nov 2011 16:09:10 +0000 (17:09 +0100)]
sllin: Generating Break signal done with our own function.

7 years agoSllin: Temporarily commented out some error checking for testing purposes.
Rostislav Lisovy [Fri, 25 Nov 2011 16:02:32 +0000 (17:02 +0100)]
Sllin: Temporarily commented out some error checking for testing purposes.

7 years agosllin: Commented out unused code.
Rostislav Lisovy [Fri, 25 Nov 2011 11:01:39 +0000 (12:01 +0100)]
sllin: Commented out unused code.

7 years agoMerge branch 'master' of ssh://rtime.felk.cvut.cz/lisovros/pcan_lin
Rostislav Lisovy [Fri, 25 Nov 2011 10:56:01 +0000 (11:56 +0100)]
Merge branch 'master' of ssh://rtime.felk.cvut.cz/lisovros/pcan_lin

7 years agoKernel LIN code uses same baudrate setup as user space now.
Pavel Pisa [Fri, 25 Nov 2011 10:54:48 +0000 (11:54 +0100)]
Kernel LIN code uses same baudrate setup as user space now.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
7 years agoMerge branch 'master' of ssh://rtime.felk.cvut.cz/lisovros/pcan_lin
Rostislav Lisovy [Fri, 25 Nov 2011 09:36:26 +0000 (10:36 +0100)]
Merge branch 'master' of ssh://rtime.felk.cvut.cz/lisovros/pcan_lin

7 years agoUpdate response checksum calculation for kernel code too.
Pavel Pisa [Fri, 25 Nov 2011 01:58:41 +0000 (02:58 +0100)]
Update response checksum calculation for kernel code too.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
7 years agoUserspace LIN is compiled with USE_TERMIOS2 by default now.
Pavel Pisa [Fri, 25 Nov 2011 01:41:27 +0000 (02:41 +0100)]
Userspace LIN is compiled with USE_TERMIOS2 by default now.

If compiled with USE_TERMIOS2 then new kernel methods
is used to set generic baudrate.

The baudrate values are specified by c_ospeed
and c_ispeed fields of struct termios2 and new
IOCTL numbers TCSETS2 and TCGETS2 are used
for terminal parameters setting and reading.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
7 years agoUserspace LIN master: Provide state encapsulation to test kernel code.
Pavel Pisa [Fri, 25 Nov 2011 00:39:25 +0000 (01:39 +0100)]
Userspace LIN master: Provide state encapsulation to test kernel code.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
7 years agosllin: Removed unused 'leased' field.
Rostislav Lisovy [Thu, 24 Nov 2011 15:44:46 +0000 (16:44 +0100)]
sllin: Removed unused 'leased' field.

7 years agosllin: Added debugging prints. Little bugfix.
Rostislav Lisovy [Thu, 24 Nov 2011 15:17:55 +0000 (16:17 +0100)]
sllin: Added debugging prints. Little bugfix.

7 years agoBasic argument parsing made by getopt_long.
Rostislav Lisovy [Thu, 24 Nov 2011 14:50:28 +0000 (15:50 +0100)]
Basic argument parsing made by getopt_long.

7 years agoSetting of uart baudrate done in separate function.
Rostislav Lisovy [Thu, 24 Nov 2011 13:42:19 +0000 (14:42 +0100)]
Setting of uart baudrate done in separate function.

7 years agoSetting UART speed to custom value for sending break.
Rostislav Lisovy [Wed, 23 Nov 2011 17:59:26 +0000 (18:59 +0100)]
Setting UART speed to custom value for sending break.

Used with 19200 baud rate for data TX, break generated by
sending 0x00 with 12800 baud rate.

PCAN LIN converter configured as a slave does respond.

7 years agoMerge branch 'master' of ssh://rtime.felk.cvut.cz/lisovros/pcan_lin
Pavel Pisa [Tue, 22 Nov 2011 21:17:49 +0000 (22:17 +0100)]
Merge branch 'master' of ssh://rtime.felk.cvut.cz/lisovros/pcan_lin