summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-05-05Add hint to upstream documentationHEADmasternorly
2023-08-01Guard hacks for Linux < v6.0 with #ifdefsnorly
Also comment on the upstream commits which made them unnecessary.
2023-08-01Align code style with first upstream in Linux v6.0norly
2022-11-26Add upstream notenorly
2022-06-18Don't kfree_skb() after submitting the repurposed SKBnorly
If can327 locks up your machine, but only in very specific situations, this is probably why. The memory leak fix went too far, and I missed the call to can327_feed_frame_to_netdev() before a return -ENODATA. Fixes: 37111be717212b8c7779978c0385393c2d51747d
2022-06-18Rename elm327_* to can327_*norly
2022-06-12Don't count RTR DLC as sent bytesnorly
RTR frames don't actually carry data, so bytes sent is 0.
2022-06-11Re-align buffers, make RX buffer a power of twonorly
2022-06-11README: Shorten duplicate mention of replies not being usednorly
2022-06-11Remove CAN specific LED codenorly
This is now handled by common netdev LED events instead: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=6c1e423a3c84953edcf91ff03ab97829b287184a
2022-06-11elm327_init: Update old comment referencing bittiming_constnorly
This has been gone since a44b237ce7e9 in 2019.
2022-06-11Remove fixed array size for can327_bitrate_constnorly
No idea why this was even there.
2022-06-11Stop leaking SKBs in elm327_parse_frame()norly
SKBs need to be used or freed before returning, no exceptions.
2022-06-11Remove unused includesnorly
2022-06-11README: Cleanup according to upstream requestsnorly
- Show communication example before known limitations - Add missing :: to start code block - Only mention baud rate once instead of twice - Clarify AT CSM and AT MA - Reflow sections touched upon
2022-06-06Increase ELM327_SIZE_RXBUF to support fat UART buffersnorly
See: https://github.com/norly/elmcan/issues/8 There, a VM was used, and apparently buffers of over 256 bytes were being piped in.
2022-06-06On RX buffer overflow, printk remaining input sizenorly
If can327_ldisc_rx() is called with a large 'count' because the UART driver feeds us huge buffers, then the user should have a chance to know and report this. In this case, we'll have to increase ELM327_SIZE_RXBUF.
2022-06-06Fix compilation on Linux up to v5.4norly
mailbox_read()'s type signature was changed in 4e9c9484b085 which is upstream since v5.5.
2022-06-05Update thanksnorly
2022-05-31Accelerate parsing by not re-checking previous datanorly
While waiting for a <CR> the code would search through prevois received characters, too. Keep track of what we've already checked to speed this up.
2022-05-31Speed up can327_is_valid_rx_char() with a LUTnorly
2022-05-31Make elm327_rxbuf_cmp() return boolnorly
2022-05-31Simplify/clarify branching and locking in several placesnorly
2022-05-19Don't ____cacheline_aligned the TX buffernorly
TTY drivers don't seem to care, and if they did, we'd likely have to kmalloc() as before anyway.
2022-05-19Style and comments cleanupnorly
2022-05-12Rename elmcan to can327norly
This is to clarify that this driver is not a product of ELM Electronics.
2022-05-03Restore WAKEUP set_bit vs. write() order in elm327_send()norly
Also, fix a silly spelling error.
2022-05-03Repack struct elmcannorly
2022-05-03Clear TTY_DO_WRITE_WAKEUP bit on uart_side_failurenorly
2022-05-03checkpatch.pl style fixesnorly
2022-05-03Fix lockdep_assert parametersnorly
&elm->lock instead of elm->lock
2022-05-01Shorten the derivation comment at the startnorly
2022-05-01Update comment about N_DEVELOPMENTnorly
N_DEVELOPMENT has been officially set to 29 in Linux v5.18-rc1.
2022-04-29Only netif_wake_queue() when ELM327 is really idlenorly
That is, when it is receiving, as that's the default state the driver tries its best to keep it in.
2022-04-28Statically allocate TX buffernorly
And also optimise struct elmcan{}'s size with pahole.
2022-04-28Start/stop TTY on netdev open/closenorly
This allows the ldisc to reset cleanly, and even after a UART error. It also makes for a cleaner ldisc close().
2022-04-28Name enum elm327_to_to_do_bits in lowercase for kernel code stylenorly
2022-04-28Rename hw_failure to uart_side_failure for easier understandingnorly
2022-04-28elm327_handle_prompt(): Explain size of local buffernorly
Also use snprintf() instead of sprintf()/strcpy(), to clarify the size restriction.
2022-04-28Clarify memory/string comparisonsnorly
We really can't use strncmp() here. Sorry!
2022-04-28Remove .hangup()norly
We were just calling .close(), which the TTY layer does for us anyway. And it does so with the correct locking.
2022-04-28Simplify TTY sending code and lockingnorly
The great get_elm() dance was unnecessary, since the TTY layer already synchronises *all* calls to ldisc_ops with tty_ldisc_ref() and tty_ldisc_lock(). All that we have to ensure is that the worker does not race against close(), which is trivial if we clear TTY_DO_WRITE_WAKEUP and then flush the worker. Also, the worker no longer checks whether the netdev is up - all it needs to do is to write out the TTY buffer, and wake up the netdev when the buffer is empty.
2022-03-17Get rid of dummy mailbox_read() for rx_offloadnorly
Use can_rx_offload_add_manual() instead of can_rx_offload_add_fifo(), starting with Linux 5.10.
2022-03-17Add can_dropped_invalid_skb() to elmcan_netdev_start_xmit()norly
2022-03-17Drop superflouous elm->can.state = CAN_STATE_STOPPED;norly
2022-03-17Minor cleanupsnorly
2022-03-16Convert comments to lockdep_assert_held()norly
2022-03-16Clean up types and unused vars in struct elmcannorly
2022-03-16Rename ELM_ to ELM327_STATE_norly
2022-03-16Unify indentation in struct elmcannorly