summaryrefslogtreecommitdiff
path: root/module
AgeCommit message (Collapse)Author
2022-02-10Improve error handling in case of stray charactersnorly
2022-02-10Remove superfluous linesnorly
2022-02-10Clean up commentsnorly
2022-02-10Forward port to Linux v5.17-rc3norly
...while keeping backwards compatibility, tested on v5.10.
2022-02-05Clean up more stringsnorly
2022-02-05Change WARN_ON into WARN_ON_ONCEnorly
2022-02-05Add BSD-3-Clause licencenorly
2022-02-05Convert RX path to NAPI via can_rx_offload_*norly
2022-01-16Clarify some error texts and return valuesnorly
2021-10-22Remove TTY_LDISC_MAGICnorly
This is in sync with upstream 981b22b8777df7de070be1803f6d7ed4f634a43c which removed .magic from struct tty_ldisc_ops in Linux 5.13.
2021-05-17Adds dkms.conf to sign kernel moduleTomasz
2019-06-10Style: According to linux-5.2-rc4 checkpatch.plnorly
2019-06-10Flush worker earlier, resolving the last to-do item.norly
2019-06-01Undo buffer rework for TTY RXnorly
Actually, we fully control the RX buffer, so DMA shouldn't be a concern. Fixes: 40ac32acdae89383ae44f32e612bf37fa0493631
2019-06-01Style: Fix one more block commentnorly
2019-05-31Separate buffers from struct elmnorly
This avoids trouble with CPU caches racing DMA accesses on ARM.
2019-05-30Style: Fix big commentsnorly
2019-02-28Silence unused parameter in elmcan_do_set_bittiming()norly
2019-02-25Extract RX sanity checker into separate functionnorly
2019-02-25Commentsnorly
2019-02-25Avoid return in function bodiesnorly
2019-02-25Use can_change_mtu() instead of hand-made functionnorly
2019-02-19Comments and minor stylenorly
2019-02-19Turn BUG_ON() into WARN_ON()norly
2019-02-19Style: Move elm327_is_ready_char() further down to where it is usednorly
2019-02-19Simplify init script sendingnorly
My problems with initializing the chip should now be solved by the 'accept_flaky_uart' module parameter.
2019-02-19ioctl(SIOCGIFNAME): Copy at most IFNAMSIZ bytes, but less if possiblenorly
Thus, we don't leak any trailing bytes that may be in the name buffer.
2019-02-19Always copy IFNAMSIZ bytes on ioctl(SIOCGIFNAME)norly
Just in case dev->name is ever not NUL terminated
2019-02-19Remove stray spin_lock_bh()norly
2019-02-19Style fixesnorly
2019-02-19Synchronize email addressesnorly
2019-02-19Fix up stray comments now that we have elm327_is_ready_char()norly
2019-02-19Sanity check TTY input and bail on problemsnorly
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-19Ignore tty RX after HW failure, locking fixnorly
2019-02-18Work around hardware bug when waiting for '>' promptnorly
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-18Shut down ELM327's 'protocol' before reconfiguring CANnorly
According to ELM327's manual, AT PC should be sent before issuing AT PB.
2019-02-18Drop fake bittimings in favor of bitrate tablenorly
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-18Improve readability of elm327_handle_prompt()norly
2019-02-18Null stack variables before usenorly
2019-02-18Don't try to send garbage after each init script entrynorly
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-31Use more netdev_err() instead of pr_err()norly
...and remove a stray comment
2019-01-31Return cleanly in functions calling elm327_hw_failure()norly
2019-01-31Don'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-30elmcan_ldisc_ioctl(): Use elm->dev->name againnorly
We now have proper locking, so dev->name is guaranteed to exist.
2019-01-30Use netdev_* prints throughoutnorly
2019-01-30Rename elm327_panic() to elm327_hw_failure() to avoid confusionnorly
2019-01-23Handle tty->ops->write() returning errornorly
This was already the case in elmcan_ldisc_tx_worker(), but was missing in elm327_send().
2019-01-23Replace '>' with constant ELM327_READY_CHARnorly
2019-01-23Bump 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-23Fix 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.