Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-05-31 | Separate buffers from struct elm | norly | |
This avoids trouble with CPU caches racing DMA accesses on ARM. | |||
2019-05-30 | Style: Fix big comments | norly | |
2019-02-28 | Silence unused parameter in elmcan_do_set_bittiming() | norly | |
2019-02-25 | Extract RX sanity checker into separate function | norly | |
2019-02-25 | Comments | norly | |
2019-02-25 | Avoid return in function bodies | norly | |
2019-02-25 | Use can_change_mtu() instead of hand-made function | norly | |
2019-02-19 | Comments and minor style | norly | |
2019-02-19 | Turn BUG_ON() into WARN_ON() | norly | |
2019-02-19 | Style: Move elm327_is_ready_char() further down to where it is used | norly | |
2019-02-19 | Simplify init script sending | norly | |
My problems with initializing the chip should now be solved by the 'accept_flaky_uart' module parameter. | |||
2019-02-19 | ioctl(SIOCGIFNAME): Copy at most IFNAMSIZ bytes, but less if possible | norly | |
Thus, we don't leak any trailing bytes that may be in the name buffer. | |||
2019-02-19 | Always copy IFNAMSIZ bytes on ioctl(SIOCGIFNAME) | norly | |
Just in case dev->name is ever not NUL terminated | |||
2019-02-19 | Remove stray spin_lock_bh() | norly | |
2019-02-19 | Style fixes | norly | |
2019-02-19 | Synchronize email addresses | norly | |
2019-02-19 | Fix up stray comments now that we have elm327_is_ready_char() | norly | |
2019-02-19 | Sanity check TTY input and bail on problems | norly | |
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. | |||
2019-02-19 | Ignore tty RX after HW failure, locking fix | norly | |
2019-02-18 | Work around hardware bug when waiting for '>' prompt | norly | |
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. | |||
2019-02-18 | Shut down ELM327's 'protocol' before reconfiguring CAN | norly | |
According to ELM327's manual, AT PC should be sent before issuing AT PB. | |||
2019-02-18 | Drop fake bittimings in favor of bitrate table | norly | |
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. | |||
2019-02-18 | Improve readability of elm327_handle_prompt() | norly | |
2019-02-18 | Null stack variables before use | norly | |
2019-02-18 | Don't try to send garbage after each init script entry | norly | |
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(). | |||
2019-01-31 | Use more netdev_err() instead of pr_err() | norly | |
...and remove a stray comment | |||
2019-01-31 | Return cleanly in functions calling elm327_hw_failure() | norly | |
2019-01-31 | Don't reset on HW fault, but take the interface down. | norly | |
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. | |||
2019-01-30 | elmcan_ldisc_ioctl(): Use elm->dev->name again | norly | |
We now have proper locking, so dev->name is guaranteed to exist. | |||
2019-01-30 | Use netdev_* prints throughout | norly | |
2019-01-30 | Rename elm327_panic() to elm327_hw_failure() to avoid confusion | norly | |
2019-01-23 | Handle tty->ops->write() returning error | norly | |
This was already the case in elmcan_ldisc_tx_worker(), but was missing in elm327_send(). | |||
2019-01-23 | Replace '>' with constant ELM327_READY_CHAR | norly | |
2019-01-23 | Bump N_ELMCAN to avoid conflicts with future in-tree line disciplines. | norly | |
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. | |||
2019-01-23 | Fix race between ldisc_close() and ldisc_*() | norly | |
There was a chance that something needed the elm object after it was freed. Proper locking stops this. | |||
2019-01-23 | Avoid ldisc_ioctl() racing unregister_candev() | norly | |
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. | |||
2019-01-19 | Comments | norly | |
2018-11-13 | Import first public commit | norly | |