]>
rtime.felk.cvut.cz Git - linux-lin.git/log
Pavel Pisa [Mon, 29 Jul 2019 17:21:50 +0000 (19:21 +0200)]
sllin: register the second line discipline to distinguish request for slave configuration.
This allows to combining master and slave devices on single
computer/system.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Pavel Pisa [Mon, 29 Jul 2019 17:07:14 +0000 (19:07 +0200)]
sllin: runtime selectable break by baudrate switching.
It is used as fallback for case when provided TTY does
not support break_ctl operation.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
kahiroka [Tue, 28 Mar 2017 07:16:48 +0000 (16:16 +0900)]
Workaround in case flush_buffer handler is not implemented in a tty driver e.g. usb-serial.
Pavel Pisa [Wed, 24 Jul 2019 07:00:16 +0000 (09:00 +0200)]
sllin: updates for the newer (4.12+) kernel version.
Problem reported and fix for 4.19 kernel contributed by
Remi Verschelde <rverschelde@gmail.com>
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Pavel Pisa [Mon, 20 Mar 2017 09:13:12 +0000 (10:13 +0100)]
sllin: remove block local variable where function wide one is available.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Tomas Tvaroha [Wed, 22 Feb 2017 14:16:46 +0000 (15:16 +0100)]
sllin: set module params permissions to be visible in sysfs
Tomas Tvaroha [Fri, 16 Sep 2016 13:08:54 +0000 (15:08 +0200)]
sllin: add led triggers
Tomas Tvaroha [Fri, 19 Aug 2016 09:21:52 +0000 (11:21 +0200)]
sllin: add single-response flag
Tomas Tvaroha [Fri, 19 Aug 2016 09:21:43 +0000 (11:21 +0200)]
sllin: disable printing of debug messages
Pavel Pisa [Tue, 10 Jan 2017 09:00:09 +0000 (10:00 +0100)]
sllin: Select enhanced checksum mode according to the cache and SFF frame even for master.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
trainman419 [Mon, 25 Apr 2016 17:41:13 +0000 (10:41 -0700)]
Update for changes in recent linux kernels
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Rostislav Lisovy [Fri, 3 Aug 2012 13:18:00 +0000 (15:18 +0200)]
lin_config: Use strtol() instead of atoi() + errorhandling
Rostislav Lisovy [Fri, 3 Aug 2012 12:55:33 +0000 (14:55 +0200)]
lin_config: Help screen
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
Rostislav Lisovy [Thu, 2 Aug 2012 14:14:50 +0000 (16:14 +0200)]
sllin: Fixed some issues reported by checkpatch.pl
Rostislav Lisovy [Thu, 2 Aug 2012 14:06:18 +0000 (16:06 +0200)]
sllin: Minor fixes to properly compile on 3.5 linux kernel
Rostislav Lisovy [Fri, 20 Jul 2012 16:14:00 +0000 (18:14 +0200)]
lin_config: Configuration of sllin frame cache
Rostislav Lisovy [Fri, 20 Jul 2012 13:17:42 +0000 (15:17 +0200)]
sllin: Makefile upgrade
Rostislav Lisovy [Fri, 20 Jul 2012 13:15:41 +0000 (15:15 +0200)]
lin_config: Added missing header
Pavel Pisa [Fri, 20 Jul 2012 13:07:22 +0000 (15:07 +0200)]
Merge /home/pi/repo/lin/pcan_lin_config/submodule/linux-lin
Rostislav Lisovy [Fri, 20 Jul 2012 12:50:05 +0000 (14:50 +0200)]
lin_config: Basic sllin frame cache configuration
Rostislav Lisovy [Fri, 20 Jul 2012 09:16:43 +0000 (11:16 +0200)]
sllin: Flags clean up
Rostislav Lisovy [Thu, 19 Jul 2012 16:26:30 +0000 (18:26 +0200)]
lin_config: Added script simplifying running of lin_config
Rostislav Lisovy [Thu, 19 Jul 2012 16:19:47 +0000 (18:19 +0200)]
lin_config: Run as daemon when configuring sllin tty line discipline
Rostislav Lisovy [Thu, 19 Jul 2012 14:11:55 +0000 (16:11 +0200)]
linconf: Fix baudrate setting for PCAN-LIN
Rostislav Lisovy [Wed, 18 Jul 2012 15:33:05 +0000 (17:33 +0200)]
linconf: Basic sllin configuration.
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.
Rostislav Lisovy [Thu, 31 May 2012 13:36:18 +0000 (15:36 +0200)]
pcanlin: Passing of XML configuration file path through program parameter
Rostislav Lisovy [Thu, 31 May 2012 13:35:21 +0000 (15:35 +0200)]
pcanlin: Added example XML configuration file
Rostislav Lisovy [Thu, 31 May 2012 13:11:05 +0000 (15:11 +0200)]
pcanlin: Basic parsing of XML configuration files
Rostislav Lisovy [Thu, 31 May 2012 13:10:30 +0000 (15:10 +0200)]
pcanlin: Upgraded Makefile
Rostislav Lisovy [Thu, 31 May 2012 13:08:27 +0000 (15:08 +0200)]
pcanlin: Initial commit.
Rostislav Lisovy [Thu, 16 Feb 2012 15:14:53 +0000 (16:14 +0100)]
sllin: Fixed potential invalid pointer dereference.
Rostislav Lisovy [Wed, 15 Feb 2012 17:31:49 +0000 (18:31 +0100)]
sllin: Handling with incorrect Break or Sync characters.
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.
Rostislav Lisovy [Mon, 6 Feb 2012 14:17:52 +0000 (15:17 +0100)]
sllin: Fixed reception of LIN response in Master mode.
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>
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>
Michal Sojka [Wed, 25 Jan 2012 00:07:45 +0000 (01:07 +0100)]
Add locking around frame_cache manipulation
Rostislav Lisovy [Mon, 16 Jan 2012 10:14:29 +0000 (11:14 +0100)]
Small fixes in documentation.
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).
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
Rostislav Lisovy [Mon, 2 Jan 2012 10:00:46 +0000 (11:00 +0100)]
sllin: Documentation.
Rostislav Lisovy [Wed, 21 Dec 2011 16:39:09 +0000 (17:39 +0100)]
sllin: Enhanced reception of LIN frames in Slave mode.
Rostislav Lisovy [Wed, 21 Dec 2011 16:30:32 +0000 (17:30 +0100)]
sllin: Bugfix. Check length in sll_bump.
Rostislav Lisovy [Wed, 21 Dec 2011 12:48:26 +0000 (13:48 +0100)]
sllin: Some more corrections to Slave mode.
Rostislav Lisovy [Wed, 21 Dec 2011 12:08:26 +0000 (13:08 +0100)]
sllin: Small corrections to Slave mode.
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).
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.
Rostislav Lisovy [Mon, 19 Dec 2011 14:10:17 +0000 (15:10 +0100)]
sllin: Added module parameters.
Rostislav Lisovy [Mon, 19 Dec 2011 13:16:14 +0000 (14:16 +0100)]
sllin: Added authors.
Rostislav Lisovy [Mon, 19 Dec 2011 13:04:16 +0000 (14:04 +0100)]
sllin: Improved handling of UART errors.
Rostislav Lisovy [Mon, 19 Dec 2011 12:13:21 +0000 (13:13 +0100)]
sllin: Ensure full initialization of all termios flags.
Rostislav Lisovy [Fri, 16 Dec 2011 14:26:27 +0000 (15:26 +0100)]
sllin: Pictures of real communication on LIN bus.
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.
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.
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.
Rostislav Lisovy [Wed, 14 Dec 2011 14:39:08 +0000 (15:39 +0100)]
sllin: All comments are C89 compatible.
Rostislav Lisovy [Wed, 14 Dec 2011 13:55:39 +0000 (14:55 +0100)]
sllin: Documentation.
Rostislav Lisovy [Wed, 14 Dec 2011 13:17:16 +0000 (14:17 +0100)]
sllin: Removed unnecessary white-spaces.
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.
Rostislav Lisovy [Wed, 14 Dec 2011 12:41:33 +0000 (13:41 +0100)]
sllin: Changed prefix for LIN flags/masks from SLLIN_ to LIN_.
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.
Rostislav Lisovy [Wed, 14 Dec 2011 12:26:59 +0000 (13:26 +0100)]
sllin: Added comments.
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.
Rostislav Lisovy [Mon, 12 Dec 2011 17:35:03 +0000 (18:35 +0100)]
sllin: Checking of checksum on received LIN frames.
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).
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.
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.
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.
Rostislav Lisovy [Fri, 9 Dec 2011 15:06:43 +0000 (16:06 +0100)]
sllin: Removed unused code.
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.
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.
Rostislav Lisovy [Wed, 7 Dec 2011 17:26:12 +0000 (18:26 +0100)]
sllin: Network statistics for received CAN frames.
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.
Rostislav Lisovy [Sat, 3 Dec 2011 19:43:56 +0000 (20:43 +0100)]
sllin: Added timer handling timeout when receiving LIN response.
Rostislav Lisovy [Fri, 2 Dec 2011 13:46:05 +0000 (14:46 +0100)]
lin_master: Checking if character read is really a break.
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.
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
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.
Rostislav Lisovy [Fri, 25 Nov 2011 16:09:10 +0000 (17:09 +0100)]
sllin: Generating Break signal done with our own function.
Rostislav Lisovy [Fri, 25 Nov 2011 16:02:32 +0000 (17:02 +0100)]
Sllin: Temporarily commented out some error checking for testing purposes.
Rostislav Lisovy [Fri, 25 Nov 2011 11:01:39 +0000 (12:01 +0100)]
sllin: Commented out unused code.
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
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>