aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/can
AgeCommit message (Collapse)AuthorFilesLines
2024-06-21can: kvaser_pciefd: Add MSI interruptsMartin Jocic1-4/+20
Use MSI interrupts with fallback to INTx interrupts. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] [mkl: kvaser_pciefd_probe(): call pci_free_irq_vectors() unconditionally] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_pciefd: Move reset of DMA RX buffers to the end of the ISRMartin Jocic1-12/+18
A new interrupt is triggered by resetting the DMA RX buffers. Since MSI interrupts are faster than legacy interrupts, the reset of the DMA buffers must be moved to the very end of the ISR, otherwise a new MSI interrupt will be masked by the current one. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_pciefd: Change name of return code variableMartin Jocic1-28/+28
Replace the variable name err used for return codes with the more generic name ret. An upcoming patch series for adding MSI interrupts will introduce code which also returns values other than return codes. Renaming the variable to ret enables using it for both purposes. This is applied to the whole file to make it consistent. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_pciefd: Rename board_irq to pci_irqMartin Jocic1-4/+4
Rename the variable name board_irq in the ISR to pci_irq to be more specific and to match the macro by which it is read. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_pciefd: Add unlikelyMartin Jocic1-5/+5
Use unlikely for some unexpected errors. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_pciefd: Add inlineMartin Jocic1-1/+1
Make the short function kvaser_pciefd_set_tx_irq inline. This function is effectively three lines long and therefore inlining it should be OK according to rule #15 of the Linux kernel coding style. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_pciefd: Remove unnecessary commentMartin Jocic1-1/+0
The code speaks for itself. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_pciefd: Skip redundant NULL pointer check in ISRMartin Jocic1-6/+0
This check is already done at the creation of the net devices in kvaser_pciefd_setup_can_ctrls called from kvaser_pciefd_probe. If it fails, the driver won't load, so there should be no need to repeat the check inside the ISR. The number of channels is read from the FPGA and should be trusted. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_pciefd: Group #defines togetherMartin Jocic1-1/+1
Increases readability Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_usb: Add support for Kvaser Mini PCIe 1xCANMartin Jocic2-0/+4
Add support for Kvaser Mini PCIe 1xCAN, based on the hydra platform. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_usb: Add support for Kvaser USBcan Pro 5xCANMartin Jocic2-0/+4
Add support for Kvaser USBcan Pro 5xCAN, based on the hydra platform. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-21can: kvaser_usb: Add support for Vining 800Martin Jocic2-0/+4
Add support for Vining 800, a branded device based on the hydra platform. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-20can: mscan: remove unused struct 'mscan_state'Dr. David Alan Gilbert1-6/+0
'mscan_state' is unused since the original commit afa17a500a36 ("net/can: add driver for mscan family & mpc52xx_mscan"). Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-20can: xilinx_can: Document driver description to list all supported IPsHarini T1-1/+1
Xilinx CAN driver supports AXI CAN, AXI CANFD, CANPS and CANFD PS IPs. Document all supported IPs in comment description. Signed-off-by: Harini T <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-20can: Kconfig: remove obsolete help text for slcanMans Rullgard1-3/+2
Commit cfcb4465e992 ("can: slcan: remove legacy infrastructure") removed the 10-device limit. Update the Kconfig help text accordingly. Signed-off-by: Mans Rullgard <[email protected]> Acked-by: Vincent Mailhol <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-20can: sja1000: plx_pci: Reuse predefined CTI subvendor IDAndy Shevchenko1-2/+1
There is predefined PCI_SUBVENDOR_ID_CONNECT_TECH, use it in the driver. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-06-20can: mcp251x: Fix up includesAndy Shevchenko1-3/+2
This driver is including the legacy GPIO header <linux/gpio.h> but the only thing it is using from that header is the wrong define for GPIOF_DIR_OUT. Fix it up by using GPIO_LINE_DIRECTION_* macros respectively. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Vincent Mailhol <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-05-07net: annotate writes on dev->mtu from ndo_change_mtu()Eric Dumazet3-3/+3
Simon reported that ndo_change_mtu() methods were never updated to use WRITE_ONCE(dev->mtu, new_mtu) as hinted in commit 501a90c94510 ("inet: protect against too small mtu values.") We read dev->mtu without holding RTNL in many places, with READ_ONCE() annotations. It is time to take care of ndo_change_mtu() methods to use corresponding WRITE_ONCE() Signed-off-by: Eric Dumazet <[email protected]> Reported-by: Simon Horman <[email protected]> Closes: https://lore.kernel.org/netdev/[email protected]/ Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Sabrina Dubroca <[email protected]> Reviewed-by: Simon Horman <[email protected]> Acked-by: Shannon Nelson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2024-04-08net: handle HAS_IOPORT dependenciesNiklas Schnelle2-0/+2
In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at compile time. We thus need to add HAS_IOPORT as dependency for those drivers requiring them. For the DEFXX driver the use of I/O ports is optional and we only need to fence specific code paths. It also turns out that with HAS_IOPORT handled explicitly HAMRADIO does not need the !S390 dependency and successfully builds the bpqether driver. Acked-by: Marc Kleine-Budde <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Acked-by: Maciej W. Rozycki <[email protected]> Co-developed-by: Arnd Bergmann <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2024-03-19can: kvaser_pciefd: Add additional Xilinx interruptsMartin Jocić1-2/+2
Since Xilinx-based adapters now support up to eight CAN channels, the TX interrupt mask array must have eight elements. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Fixes: 9b221ba452aa ("can: kvaser_pciefd: Add support for Kvaser PCIe 8xCAN") [mkl: replace Link by Fixes tag] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-03-04can: mcp251xfd: __mcp251xfd_get_berr_counter(): use CAN_BUS_OFF_THRESHOLD ↵Marc Kleine-Budde1-1/+1
instead of open coding it Since 3f9c26210cf8 ("can: error: add definitions for the different CAN error thresholds") we have proper defines for the various CAN error thresholds. So make use of it and replace 256 by CAN_BUS_OFF_THRESHOLD. Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-03-04can: gs_usb: gs_cmd_reset(): use cpu_to_le32() to assign modeMarc Kleine-Budde1-1/+1
The structure gs_device_mode dm::mode is a __le32, use cpu_to_le32() to assign GS_CAN_MODE_RESET. As GS_CAN_MODE_RESET is 0x0, this is basically a no-op. Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-03-04can: kvaser_pciefd: Add support for Kvaser PCIe 8xCANMartin Jocić2-1/+7
Add support for new Kvaser pciefd device, PCIe 8xCAN, based on Xilinx FPGA. Signed-off-by: Martin Jocic <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-03-04can: kvaser_usb: Add support for Leaf v3Jimmy Assarsson2-0/+4
Add support for Kvaser Leaf v3, based on the hydra platform. Signed-off-by: Jimmy Assarsson <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-26rtnetlink: prepare nla_put_iflink() to run under RCUEric Dumazet1-1/+1
We want to be able to run rtnl_fill_ifinfo() under RCU protection instead of RTNL in the future. This patch prepares dev_get_iflink() and nla_put_iflink() to run either with RTNL or RCU held. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2024-02-20Merge tag 'linux-can-next-for-6.9-20240220' of ↵Paolo Abeni6-15/+220
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2024-02-20 this is a pull request of 9 patches for net-next/master. The first patch is by Francesco Dolcini and removes a redundant check for pm_clock_support from the m_can driver. Martin Hundebøll contributes 3 patches to the m_can/tcan4x5x driver to allow resume upon RX of a CAN frame. 3 patches by Srinivas Goud add support for ECC statistics to the xilinx_can driver. The last 2 patches are by Oliver Hartkopp and me, target the CAN RAW protocol and fix an error in the getsockopt() for CAN-XL introduced in the previous pull request to net-next (linux-can-next-for-6.9-20240213). linux-can-next-for-6.9-20240220 * tag 'linux-can-next-for-6.9-20240220' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: raw: raw_getsockopt(): reduce scope of err can: raw: fix getsockopt() for new CAN_RAW_XL_VCID_OPTS can: xilinx_can: Add ethtool stats interface for ECC errors can: xilinx_can: Add ECC support dt-bindings: can: xilinx_can: Add 'xlnx,has-ecc' optional property can: tcan4x5x: support resuming from rx interrupt signal can: m_can: allow keeping the transceiver running in suspend dt-bindings: can: tcan4x5x: Document the wakeup-source flag can: m_can: remove redundant check for pm_clock_support ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2024-02-16can: xilinx_can: Add ethtool stats interface for ECC errorsSrinivas Goud1-0/+64
Add ethtool stats interface for reading FIFO 1bit/2bit ECC errors information. Signed-off-by: Srinivas Goud <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-16can: xilinx_can: Add ECC supportSrinivas Goud1-4/+101
Add ECC support for Xilinx CAN Controller, so this driver reports 1bit/2bit ECC errors for FIFO's based on ECC error interrupt. ECC feature for Xilinx CAN Controller selected through 'xlnx,has-ecc' DT property Signed-off-by: Srinivas Goud <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski1-1/+1
Cross-merge networking fixes after downstream PR. No conflicts. Adjacent changes: net/core/dev.c 9f30831390ed ("net: add rcu safety to rtnl_prop_list_size()") 723de3ebef03 ("net: free altname using an RCU callback") net/unix/garbage.c 11498715f266 ("af_unix: Remove io_uring code for GC.") 25236c91b5ab ("af_unix: Fix task hung while purging oob_skb in GC.") drivers/net/ethernet/renesas/ravb_main.c ed4adc07207d ("net: ravb: Count packets instead of descriptors in GbEth RX path" ) c2da9408579d ("ravb: Add Rx checksum offload support for GbEth") net/mptcp/protocol.c bdd70eb68913 ("mptcp: drop the push_pending field") 28e5c1380506 ("mptcp: annotate lockless accesses around read-mostly fields") Signed-off-by: Jakub Kicinski <[email protected]>
2024-02-14can: netlink: Fix TDCO calculation using the old data bittimingMaxime Jayat1-1/+1
The TDCO calculation was done using the currently applied data bittiming, instead of the newly computed data bittiming, which means that the TDCO had an invalid value unless setting the same data bittiming twice. Fixes: d99755f71a80 ("can: netlink: add interface for CAN-FD Transmitter Delay Compensation (TDC)") Signed-off-by: Maxime Jayat <[email protected]> Reviewed-by: Vincent Mailhol <[email protected]> Link: https://lore.kernel.org/all/[email protected] Cc: [email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-14can: tcan4x5x: support resuming from rx interrupt signalMartin Hundebøll1-2/+32
Implement the "wakeup-source" device tree property, so the chip is left running when suspending, and its rx interrupt is used as a wakeup source to resume operation. Signed-off-by: Martin Hundebøll <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-14can: m_can: allow keeping the transceiver running in suspendMartin Hundebøll5-5/+21
Add a flag to the device class structure that leaves the chip in a running state with rx interrupt enabled, so that an m_can device driver can configure and use the interrupt as a wakeup source. Signed-off-by: Martin Hundebøll <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-14can: m_can: remove redundant check for pm_clock_supportFrancesco Dolcini1-5/+3
m_can_clk_start() already skip starting the clock when clock support is disabled, remove the redundant check in m_can_class_register(). This also solves the imbalance with m_can_clk_stop() that is called afterward in the same function before the return. Signed-off-by: Francesco Dolcini <[email protected]> Reviewed-by: Markus Schneider-Pargmann <[email protected]> Link: https://lore.kernel.org/all/[email protected] [mkl: rebased to net-next/main] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: softing: remove redundant NULL checkDaniil Dulov1-1/+1
In this case dev cannot be NULL, so remove redundant check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 03fd3cf5a179 ("can: add driver for Softing card") Signed-off-by: Daniil Dulov <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: kvaser_pciefd: Add support for Kvaser M.2 PCIe 4xCANJimmy Assarsson2-0/+56
Add support for new Kvaser pciefd device, M.2 PCIe 4xCAN, based on Xilinx FPGA. Signed-off-by: Jimmy Assarsson <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Implement transmit submission coalescingMarkus Schneider-Pargmann2-4/+58
m_can supports submitting multiple transmits with one register write. This is an interesting option to reduce the number of SPI transfers for peripheral chips. The m_can_tx_op is extended with a bool that signals if it is the last transmission and the submit should be executed immediately. The worker then writes the skb to the FIFO and submits it only if the submit bool is set. If it isn't set, the worker will write the next skb which is waiting in the workqueue to the FIFO, etc. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Implement BQLMarkus Schneider-Pargmann1-14/+36
Implement byte queue limiting in preparation for the use of xmit_more(). Signed-off-by: Markus Schneider-Pargmann <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Use tx_fifo_in_flight for netif_queue controlMarkus Schneider-Pargmann1-57/+20
The network queue is currently always stopped in start_xmit and continued in the interrupt handler. This is not possible anymore if we want to keep multiple transmits in flight in parallel. Use the previously introduced tx_fifo_in_flight counter to control the network queue instead. This has the benefit of not needing to ask the hardware about fifo status. This patch stops the network queue in start_xmit if the number of transmits in flight reaches the size of the fifo and wakes up the queue from the interrupt handler once the transmits in flight drops below the fifo size. This means any skbs over the limit will be rejected immediately in start_xmit (it shouldn't be possible at all to reach that state anyways). The maximum number of transmits in flight is the size of the fifo. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Introduce a tx_fifo_in_flight counterMarkus Schneider-Pargmann2-0/+34
Keep track of the number of transmits in flight. This patch prepares the driver to control the network interface queue based on this counter. By itself this counter be implemented with an atomic, but as we need to do other things in the critical sections later I am using a spinlock instead. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Use the workqueue as queueMarkus Schneider-Pargmann2-47/+76
The current implementation uses the workqueue for peripheral chips to submit work. Only a single work item is queued and used at any time. To be able to keep more than one transmit in flight at a time, prepare the workqueue to support multiple transmits at the same time. Each work item now has a separate storage for a skb and a pointer to cdev. This assures that each workitem can be processed individually. The workqueue is replaced by an ordered workqueue which makes sure that only a single worker processes the items queued on the workqueue. Also items are ordered by the order they were enqueued. This removes most of the concurrency the workqueue normally offers. It is not necessary for this driver. The cleanup functions have to be adopted a bit to handle this new mechanism. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Cache tx putidxMarkus Schneider-Pargmann2-1/+10
m_can_tx_handler is the only place where data is written to the tx fifo. We can calculate the putidx in the driver code here to avoid the dependency on the txfqs register. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Use u32 for putidxMarkus Schneider-Pargmann1-4/+4
putidx is not an integer normally, it is an unsigned field used in hardware registers. Use a u32 for it. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Add tx coalescing ethtool supportMarkus Schneider-Pargmann1-1/+37
Add TX support to get/set functions for ethtool coalescing. tx-frames-irq and tx-usecs-irq can only be set/unset together. tx-frames-irq needs to be less than TXE and TXB. As rx and tx share the same timer, rx-usecs-irq and tx-usecs-irq can be enabled/disabled individually but they need to have the same value if enabled. Polling is excluded from TX irq coalescing. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Add rx coalescing ethtool supportMarkus Schneider-Pargmann1-1/+54
Add the possibility to set coalescing parameters with ethtool. rx-frames-irq and rx-usecs-irq can only be set and unset together as the implemented mechanism would not work otherwise. rx-frames-irq can't be greater than the RX FIFO size. Also all values can only be changed if the chip is not active. Polling is excluded from irq coalescing support. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Implement transmit coalescingMarkus Schneider-Pargmann2-13/+24
Extend the coalescing implementation for transmits. In normal mode the chip raises an interrupt for every finished transmit. This implementation switches to coalescing mode as soon as an interrupt handled a transmit. For coalescing the watermark level interrupt is used to interrupt exactly after x frames were sent. It switches back into normal mode once there was an interrupt with no finished transmit and the timer being inactive. The timer is shared with receive coalescing. The time for receive and transmit coalescing timers have to be the same for that to work. The benefit is to have only a single running timer. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Implement receive coalescingMarkus Schneider-Pargmann2-6/+76
m_can offers the possibility to set an interrupt on reaching a watermark level in the receive FIFO. This can be used to implement coalescing. Unfortunately there is no hardware timeout available to trigger an interrupt if only a few messages were received within a given time. To solve this I am using a hrtimer to wake up the irq thread after x microseconds. The timer is always started if receive coalescing is enabled and new received frames were available during an interrupt. The timer is stopped if during a interrupt handling no new data was available. If the timer is started the new item interrupt is disabled and the watermark interrupt takes over. If the timer is not started again, the new item interrupt is enabled again, notifying the handler about every new item received. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Write transmit header and data in one transactionMarkus Schneider-Pargmann1-14/+21
Combine header and data before writing to the transmit fifo to reduce the overhead for peripheral chips. Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Move hrtimer init to m_can_class_registerMarkus Schneider-Pargmann2-5/+5
The hrtimer_init() is called in m_can_plat_probe() and the hrtimer function is set in m_can_class_register(). For readability it is better to keep these two together in m_can_class_register(). Cc: Judith Mendez <[email protected]> Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: m_can: Start/Cancel polling timer together with interruptsMarkus Schneider-Pargmann1-11/+12
Interrupts are enabled/disabled in more places than just m_can_start() and m_can_stop(). Couple the polling timer with enabling/disabling of all interrupts to achieve equivalent behavior. Cc: Judith Mendez <[email protected]> Fixes: b382380c0d2d ("can: m_can: Add hrtimer to generate software interrupt") Signed-off-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2024-02-12can: esd: add support for esd GmbH PCIe/402 CAN interface familyStefan Mätje7-0/+1655
This patch adds support for the PCI based PCIe/402 CAN interface family from esd GmbH that is available with various form factors (https://esd.eu/en/products/402-series-can-interfaces). All boards utilize a FPGA based CAN controller solution developed by esd (esdACC). For more information on the esdACC see https://esd.eu/en/products/esdacc. This driver detects all available CAN interface board variants of the family but atm. operates the CAN-FD capable devices in Classic-CAN mode only! A later patch will introduce the CAN-FD functionality in this driver. Co-developed-by: Thomas Körper <[email protected]> Signed-off-by: Thomas Körper <[email protected]> Signed-off-by: Stefan Mätje <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>