Age | Commit message (Collapse) | Author |
|
|
|
Plus minor fixes.
|
|
|
|
|
|
|
|
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.
|
|
According to ELM327's manual, AT PC should be sent before issuing AT PB.
|
|
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.
|
|
|
|
|
|
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().
|
|
...and remove a stray comment
|
|
|
|
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.
|
|
We now have proper locking, so dev->name is guaranteed to exist.
|
|
|
|
|
|
This was already the case in elmcan_ldisc_tx_worker(), but was missing
in elm327_send().
|
|
|
|
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.
|
|
There was a chance that something needed the elm object after it was
freed. Proper locking stops this.
|
|
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.
|
|
|
|
|
|
|