]>
git.enpas.org Git - elmcan.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
norly [Tue, 19 Feb 2019 21:10:16 +0000 (22:10 +0100)]
ioctl(SIOCGIFNAME): Copy at most IFNAMSIZ bytes, but less if possible
Thus, we don't leak any trailing bytes that may be in the name buffer.
norly [Tue, 19 Feb 2019 19:19:53 +0000 (20:19 +0100)]
Always copy IFNAMSIZ bytes on ioctl(SIOCGIFNAME)
Just in case dev->name is ever not NUL terminated
norly [Tue, 19 Feb 2019 18:59:11 +0000 (19:59 +0100)]
Remove stray spin_lock_bh()
norly [Tue, 19 Feb 2019 14:18:26 +0000 (15:18 +0100)]
Style fixes
norly [Tue, 19 Feb 2019 01:20:42 +0000 (02:20 +0100)]
Synchronize email addresses
norly [Mon, 18 Feb 2019 23:49:06 +0000 (00:49 +0100)]
Fix up stray comments now that we have elm327_is_ready_char()
norly [Mon, 18 Feb 2019 23:24:21 +0000 (00:24 +0100)]
Sanity check TTY input and bail on problems
Also, introduce module parameter 'accept_flaky_uart'.
If your adapter or its connection is unreliable, set this option to
true to try and make the best of a bad situation, but undefined
behavior is prone to occur.
norly [Mon, 18 Feb 2019 23:23:12 +0000 (00:23 +0100)]
Ignore tty RX after HW failure, locking fix
norly [Mon, 18 Feb 2019 20:38:04 +0000 (21:38 +0100)]
readme.rst: Add rationale behind the chosen configuration
Plus minor fixes.
norly [Mon, 18 Feb 2019 13:48:44 +0000 (14:48 +0100)]
README.txt: Add limitations for 'v1.5' clones
norly [Mon, 18 Feb 2019 13:30:29 +0000 (14:30 +0100)]
README.rst: We actually use can_bus_off() now
norly [Mon, 18 Feb 2019 13:27:21 +0000 (14:27 +0100)]
README.rst: Forgot to bump the ldisc number
norly [Mon, 18 Feb 2019 13:23:33 +0000 (14:23 +0100)]
Work around hardware bug when waiting for '>' prompt
Sometimes the ELM327 sets 0x80 and/or 0x40 when sending '>' to indicate
that it is ready to receive the next command.
Masking these two bits out seems to take care of most or all hangs
during initialization.
norly [Sun, 17 Feb 2019 23:34:10 +0000 (00:34 +0100)]
Shut down ELM327's 'protocol' before reconfiguring CAN
According to ELM327's manual, AT PC should be sent before issuing AT PB.
norly [Sun, 17 Feb 2019 23:24:02 +0000 (00:24 +0100)]
Drop fake bittimings in favor of bitrate table
The fake bittiming table produces wrong results in Linux 4.19's bitrate
based parameter calculation.
SocketCAN support for fixed bitrates was introduced in
431af779256c in
Jan 2017, and as of Linux 4.18 the only driver using it is mcba_usb.
Bitrates are also fixed in ELM327, and none of the other parameters can
be tuned, so using this API makes sense here as well.
norly [Thu, 14 Feb 2019 18:29:31 +0000 (19:29 +0100)]
Improve readability of elm327_handle_prompt()
norly [Thu, 14 Feb 2019 18:22:20 +0000 (19:22 +0100)]
Null stack variables before use
norly [Sun, 17 Feb 2019 23:45:42 +0000 (00:45 +0100)]
Don't try to send garbage after each init script entry
Previously, we'd try to send the local txbuf even though it had not been
written to. Thus strlen() would overrun the buffer, which recent Linux
versions catch in a BUG_ON().
norly [Thu, 31 Jan 2019 00:53:14 +0000 (01:53 +0100)]
Use more netdev_err() instead of pr_err()
...and remove a stray comment
norly [Thu, 31 Jan 2019 00:49:33 +0000 (01:49 +0100)]
Return cleanly in functions calling elm327_hw_failure()
norly [Thu, 31 Jan 2019 00:08:15 +0000 (01:08 +0100)]
Don't reset on HW fault, but take the interface down.
There is currently no interface to try again, other than detaching and
re-attaching the line discipline. It wouldn't make much sense either,
unless we've run into an unexpected state in the ELM327's firmware.
norly [Thu, 24 Jan 2019 02:44:04 +0000 (03:44 +0100)]
elmcan_ldisc_ioctl(): Use elm->dev->name again
We now have proper locking, so dev->name is guaranteed to exist.
norly [Wed, 23 Jan 2019 16:04:12 +0000 (17:04 +0100)]
Use netdev_* prints throughout
norly [Wed, 23 Jan 2019 15:41:56 +0000 (16:41 +0100)]
Rename elm327_panic() to elm327_hw_failure() to avoid confusion
norly [Wed, 23 Jan 2019 15:37:39 +0000 (16:37 +0100)]
Handle tty->ops->write() returning error
This was already the case in elmcan_ldisc_tx_worker(), but was missing
in elm327_send().
norly [Wed, 23 Jan 2019 15:19:18 +0000 (16:19 +0100)]
Replace '>' with constant ELM327_READY_CHAR
norly [Wed, 23 Jan 2019 01:54:41 +0000 (02:54 +0100)]
Bump N_ELMCAN to avoid conflicts with future in-tree line disciplines.
We can't go higher than 29 because of NR_LDISCS == 30 in Linux 5.0.
We can't go lower than 28 because of N_NULL == 27 in Linux 5.0.
norly [Wed, 23 Jan 2019 01:39:46 +0000 (02:39 +0100)]
Fix race between ldisc_close() and ldisc_*()
There was a chance that something needed the elm object after it was
freed. Proper locking stops this.
norly [Fri, 11 Jan 2019 02:38:35 +0000 (03:38 +0100)]
Avoid ldisc_ioctl() racing unregister_candev()
When getting the CAN interface's name via the SIOCGIFNAME ioctl,
elm->dev->name may no longer exist because the interface is being shut
down.
Also, print the name of the interface to dmesg.
norly [Mon, 7 Jan 2019 02:33:07 +0000 (03:33 +0100)]
Comments
norly [Tue, 13 Nov 2018 22:38:17 +0000 (23:38 +0100)]
Import first public commit
norly [Tue, 13 Nov 2018 22:38:01 +0000 (23:38 +0100)]
Initial commit