summaryrefslogtreecommitdiff
path: root/module
AgeCommit message (Collapse)Author
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-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-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
2022-03-16Move MODULE_* to end of filenorly
2022-03-16Remove braces from pr_fmtnorly
2022-03-16Re-add author namesnorly
2022-03-12Rework elm327_hw_failure()norly
Using es58x as a rough template
2022-03-12Minor cleanupsnorly
2022-03-12Replace ->can_dlc with ->lennorly
can_frame.can_dlc has been deprecated in favour of can_frame.len and as a new driver, this needs to stick to the new convention. Also include the ugliest backwards hack #define I've ever written to make this compile on Linux <= 5.10 which is currently LTS.
2022-03-12elmcan_netdev_start_xmit(): Remove unnecessary skb->len checknorly
linux/net/can/af_can.c's can_send() guarantees this already.
2022-03-12Use alloc_can_skb()norly
2022-03-12Rename TODO_* to ELM327_TX_DO_*norly
Also rename elm->can_frame to elm->can_frame_to_send
2022-03-07Mark {_len,}_memstrcmp inlinenorly
2022-03-07Change MAGIC to DUMMY, and silence initnorly