- 22 Jun, 2023 36 commits
-
-
Marc Kleine-Budde authored
Jimmy Assarsson <extja@kvaser.com> says: This patch series contains various non critical fixes and improvements for the kvaser_pciefd driver. Link: https://lore.kernel.org/all/20230529134248.752036-1-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Use the TX FIFO size read from CAN controller register, instead of using hard coded value. Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-15-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Refactor code; - Format code - Rename variables and macros - Remove intermediate variables - Add/remove blank lines - Reduce scope of variables - Add helper functions Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-14-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Add support for the Classical CAN raw DLC functionality to send and receive DLC values from 9 .. 15. Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-13-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Replace opencoded masking and shifting, with GENMASK, FIELD_GET and FIELD_PREP macros. Suggested-by:
Vincent MAILHOL <mailhol.vincent@wanadoo.fr> Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-12-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Sort the registers defines, in the same order as the register bits/fields are defined. Sort register bits/fields in MSB-to-LSB order. Update and add comments. Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-11-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Change return type to void for kvaser_pciefd_transmit_irq(), kvaser_pciefd_receive_irq() and kvaser_pciefd_set_tx_irq(). These functions always return zero. Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-10-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Rename device ID defines to better match the product name of the supported device. Use 16 bit hexadecimal values for device IDs. And format kvaser_pciefd_id_table using clang-format. Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-9-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Sort the includes in alphabetic order. Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-8-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Remove SPI flash parameter read functionality, since it's only used for reading the interface CAN controller count. This information is already read from a register, making the information redundant. Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-7-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Oliver Hartkopp authored
CAN_RAW_FILTER_MAX is only relevant for CAN_RAW sockets and used in linux/can/raw.c or in userspace applications that include the raw.h file anyway. Signed-off-by:
Oliver Hartkopp <socketcan@hartkopp.net> Link: https://lore.kernel.org/all/20230609121051.9631-1-socketcan@hartkopp.netSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Define unsigned constants with type suffix 'U' Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-6-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Set hardware timestamp on transmitted packets. Fixes: 26ad340e ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-5-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
Add new function, kvaser_pciefd_set_skb_timestamp(), to set skb hwtstamps. Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-4-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
The Kvaser KCAN controller got a feature to send error frames on request. The packet KVASER_PCIEFD_PACK_TYPE_EFRAME_ACK signals that the requested error frame was transmitted. Since this feature is not supported by the driver, drop the handler and add KVASER_PCIEFD_PACK_TYPE_EFRAME_ACK to the list of unexpected packet types. Fixes: 26ad340e ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-3-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Jimmy Assarsson authored
The PCI interrupt register, KVASER_PCIEFD_IRQ_REG, is level triggered. Writing to the register doesn't affect it. Fixes: 26ad340e ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Reviewed-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20230529134248.752036-2-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
Vincent Mailhol <mailhol.vincent@wanadoo.fr> says: When created in [1], frames length definitions were added to implement byte queue limits (bql). Because bql expects lengths in bytes, bit length definitions were not considered back then. Recently, a need to refer to the exact frame length in bits, with CAN bit stuffing, appeared in [2]. This series introduces can_frame_bits(): a function-like macro that can calculate the exact size of a CAN(-FD) frame in bits with or without bitsuffing. [1] commit 85d99c3e ("can: length: can_skb_get_frame_len(): introduce function to get data length of frame in data link layer") Link: https://git.kernel.org/torvalds/c/85d99c3e2a13 [2] RE: [PATCH] can: mcp251xfd: Increase poll timeout Link: https://lore.kernel.org/linux-can/BL3PR11MB64846C83ACD04E9330B0FE66FB729@BL3PR11MB6484.namprd11.prod.outlook.com * Changelog * v4 -> v5: * In __can_cc_frame_bits() and __can_fd_frame_bits(), enclose data_len in brackets to prevent operator precedence issues. * Add a note in can_frame_bits() documentation to explain that data_len shall have no side effects. * While at it, make CAN(FD)_FRAME_LEN_MAX definition fit on a single line. * A few typo/grammar small fixes in the commit descriptions. Link: https://lore.kernel.org/linux-can/20230601165625.100040-1-mailhol.vincent@wanadoo.fr v3 -> v4: * No functional changes. * as reported by Simon Horman, fix typo in the documentation of can_bitstuffing_len(): "bitstream_len" -> "destuffed_len". * as reported by Thomas Kopp, fix several other typos: - "indicatior" -> "indicator" - "in on the wire" -> "on the wire" - "bitsuffing" -> "bitstuffing". * in CAN_FRAME_LEN_MAX comment: specify that only the dynamic bitstuffing gets ignored but that the intermission is included. * move the Suggested-by: Thomas Kopp tag from patch 2 to patch 3. * add Reviewed-by: Thomas Kopp tag on the full series. * add an additional line of comment for the @intermission argument of can_frame_bits(). Link: https://lore.kernel.org/linux-can/20230530144637.4746-1-mailhol.vincent@wanadoo.fr v2 -> v3: * turn can_frame_bits() and can_frame_bytes() into function-like macros. The fact that inline functions can not be used to initialize constant struct fields was bothering me. I did my best to make the macro look as less ugly as possible. * as reported by Simon Horman, add missing document for the is_fd argument of can_frame_bits(). Link: https://lore.kernel.org/linux-can/20230523065218.51227-1-mailhol.vincent@wanadoo.fr v1 -> v2: * as suggested by Thomas Kopp, add a new patch to the series to fix the stuff bit count and the fixed stuff bits definitions * and another patch to fix documentation of the Remote Request Substitution (RRS). * refactor the length definition. Instead of using individual macro, rely on an inline function. One reason is to minimize the number of definitions. Another reason is that because the dynamic bit stuff is calculated differently for CAN and CAN-FD, it is just not possible to multiply the existing CANFD_FRAME_OVERHEAD_SFF/EFF by the overhead ratio to get the bitsuffing: for CAN-FD, the CRC field is already stuffed by the fixed stuff bits and is out of scope of the dynamic bitstuffing. Link: https://lore.kernel.org/linux-can/20230507155506.3179711-1-mailhol.vincent@wanadoo.fr Link: https://lore.kernel.org/all/20230611025728.450837-1-mailhol.vincent@wanadoo.frSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
Introduce a method to calculate the exact size in bits of a CAN(-FD) frame with or without dynamic bitstuffing. These are all the possible combinations taken into account: - Classical CAN or CAN-FD - Standard or Extended frame format - CAN-FD CRC17 or CRC21 - Include or not intermission Instead of doing several individual macro definitions, declare the can_frame_bits() function-like macro. To this extent, do a full refactoring of the length definitions. In addition add the can_frame_bytes(). This function-like macro replaces the existing macro: - CAN_FRAME_OVERHEAD_SFF: can_frame_bytes(false, false, 0) - CAN_FRAME_OVERHEAD_EFF: can_frame_bytes(false, true, 0) - CANFD_FRAME_OVERHEAD_SFF: can_frame_bytes(true, false, 0) - CANFD_FRAME_OVERHEAD_EFF: can_frame_bytes(true, true, 0) Function-like macros were chosen over inline functions because they can be used to initialize const struct fields. The different maximum frame lengths (maximum data length, including intermission) are as follow: Frame type bits bytes ------------------------------------------------------- Classic CAN SFF no bitstuffing 111 14 Classic CAN EFF no bitstuffing 131 17 Classic CAN SFF bitstuffing 135 17 Classic CAN EFF bitstuffing 160 20 CAN-FD SFF no bitstuffing 579 73 CAN-FD EFF no bitstuffing 598 75 CAN-FD SFF bitstuffing 712 89 CAN-FD EFF bitstuffing 736 92 The macro CAN_FRAME_LEN_MAX and CANFD_FRAME_LEN_MAX are kept as an alias to, respectively, can_frame_bytes(false, true, CAN_MAX_DLEN) and can_frame_bytes(true, true, CANFD_MAX_DLEN). In addition to the above: - Use ISO 11898-1:2015 definitions for the names of the CAN frame fields. - Include linux/bits.h for use of BITS_PER_BYTE. - Include linux/math.h for use of mult_frac() and DIV_ROUND_UP(). N.B: the use of DIV_ROUND_UP() is not new to this patch, but the include was previously omitted. - Add copyright 2023 for myself. Suggested-by:
Thomas Kopp <Thomas.Kopp@microchip.com> Signed-off-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Reviewed-by:
Thomas Kopp <Thomas.Kopp@microchip.com> Link: https://lore.kernel.org/all/20230611025728.450837-4-mailhol.vincent@wanadoo.frSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
The Stuff Bit Count is always coded on 4 bits [1]. Update the Stuff Bit Count size accordingly. In addition, the CRC fields of CAN FD Frames contain stuff bits at fixed positions called fixed stuff bits [2]. The CRC field starts with a fixed stuff bit and then has another fixed stuff bit after each fourth bit [2], which allows us to derive this formula: FSB count = 1 + round_down(len(CRC field)/4) The length of the CRC field is [1]: len(CRC field) = len(Stuff Bit Count) + len(CRC) = 4 + len(CRC) with len(CRC) either 17 or 21 bits depending of the payload length. In conclusion, for CRC17: FSB count = 1 + round_down((4 + 17)/4) = 6 and for CRC 21: FSB count = 1 + round_down((4 + 21)/4) = 7 Add a Fixed Stuff bits (FSB) field with above values and update CANFD_FRAME_OVERHEAD_SFF and CANFD_FRAME_OVERHEAD_EFF accordingly. [1] ISO 11898-1:2015 section 10.4.2.6 "CRC field": The CRC field shall contain the CRC sequence followed by a recessive CRC delimiter. For FD Frames, the CRC field shall also contain the stuff count. Stuff count If FD Frames, the stuff count shall be at the beginning of the CRC field. It shall consist of the stuff bit count modulo 8 in a 3-bit gray code followed by a parity bit [...] [2] ISO 11898-1:2015 paragraph 10.5 "Frame coding": In the CRC field of FD Frames, the stuff bits shall be inserted at fixed positions; they are called fixed stuff bits. There shall be a fixed stuff bit before the first bit of the stuff count, even if the last bits of the preceding field are a sequence of five consecutive bits of identical value, there shall be only the fixed stuff bit, there shall not be two consecutive stuff bits. A further fixed stuff bit shall be inserted after each fourth bit of the CRC field [...] Fixes: 85d99c3e ("can: length: can_skb_get_frame_len(): introduce function to get data length of frame in data link layer") Suggested-by:
Thomas Kopp <Thomas.Kopp@microchip.com> Signed-off-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Reviewed-by:
Thomas Kopp <Thomas.Kopp@microchip.com> Link: https://lore.kernel.org/all/20230611025728.450837-2-mailhol.vincent@wanadoo.frSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Vincent Mailhol authored
The CAN-FD frames only have one reserved bit. The bit corresponding to Classical CAN frame's RTR bit is called the "Remote Request Substitution (RRS)" [1]. N.B. The RRS is not to be confused with the Substitute Remote Request (SRR). Fix the description in the CANFD_FRAME_OVERHEAD_SFF/EFF macros. The total remains unchanged, so this is just a documentation fix. In addition to the above add myself as copyright owner for 2020 (as coauthor of the initial version, c.f. Fixes tag). [1] ISO 11898-1:2015 paragraph 10.4.2.3 "Arbitration field": RSS bit [only in FD Frames] The RRS bit shall be transmitted in FD Frames at the position of the RTR bit in Classical Frames. The RRS bit shall be transmitted dominant, but receivers shall accept recessive and dominant RRS bits. Fixes: 85d99c3e ("can: length: can_skb_get_frame_len(): introduce function to get data length of frame in data link layer") Signed-off-by:
Vincent Mailhol <mailhol.vincent@wanadoo.fr> Reviewed-by:
Thomas Kopp <Thomas.Kopp@microchip.com> Link: https://lore.kernel.org/all/20230611025728.450837-3-mailhol.vincent@wanadoo.frSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
Marc Kleine-Budde <mkl@pengutronix.de> says: here are 2 coding style fixes for rx-offload and the ti_hecc driver. Link: https://lore.kernel.org/all/20230620131130.240180-1-mkl@pengutronix.deSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
This patch aligns code to match open parenthesis and removes a trailing whitespace. Fixes: eb38c205 ("can: rx-offload: rename can_rx_offload_queue_sorted() -> can_rx_offload_queue_timestamp()") Fixes: f5071d9e ("can: m_can: m_can_handle_bus_errors(): add support for handling DLEC error on CAN-FD frames") Reported-by:
Judith Mendez <jm@ti.com> Link: https://lore.kernel.org/all/20230523062410.1984098-1-mkl@pengutronix.deSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
This patch aligns code to match open parenthesis. Link: https://lore.kernel.org/all/20230620131130.240180-3-mkl@pengutronix.deSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
This patch aligns code to match open parenthesis. Link: https://lore.kernel.org/all/20230620131130.240180-2-mkl@pengutronix.deSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
Miquel Raynal provides a series for the sja1000 driver to work around overrun stalls with a soft reset on Renesas SoCs. Link: https://lore.kernel.org/all/20230616134553.2786391-1-miquel.raynal@bootlin.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Miquel Raynal authored
In their RZN1 SoC, Renesas put a CAN controller supposed to act very similarly to the original Philips sja1000. In practice, while flooding the bus with another device, we discovered that the controller very often after an overrun situation would just refuse any new frame, drop them all and trigger over and over again the overrun interrupt, even though the buffer would have been totally emptied. The controller acts like if its internal buffer offsets (where it writes and where the host reads) where totally screwed-up. Renesas manual mentions a single action to perform in order to resynchronize the read and write offsets within the buffer: performing a soft reset. Performing a soft reset takes a bit of time and involves small delays, so better do that in a threaded handler rather than inside the hard IRQ handler. Add platform data to recognize the platforms which need this workaround, and when the faulty situation is diagnosed, stop what is being performed and request the threaded handler to be executed in order to perform the reset. Tested-by: Jérémie Dautheribes <jeremie.dautheribes@bootlin.com> # 5.10 Signed-off-by:
Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/all/20230616134553.2786391-2-miquel.raynal@bootlin.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Miquel Raynal authored
In order to support a flavor of the sja1000 which sometimes freezes, it will be needed upon certain interrupts to perform a soft reset. The soft reset operation takes a bit of time, so better not do it within the hard interrupt handler but rather in a threaded handler. Let's prepare the possibility for sja1000_err() to request "interrupting" the current flow and request the threaded handler to be run while keeping the interrupt line low. There is no functional change. Signed-off-by:
Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/all/20230616134553.2786391-1-miquel.raynal@bootlin.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
Frank Jungclaus <frank.jungclaus@esd.eu> says: While trying to again merge my code changes for CAN-USB/3, I came across some more places where it could make sense to change them analogous to the previous clean-up patch series [1]. [1] [PATCH v2 0/6] can: esd_usb: More preparation before supporting esd CAN-USB/3 Link: https://lore.kernel.org/all/20230519195600.420644-1-frank.jungclaus@esd.eu Link: https://lore.kernel.org/r/20230523173105.3175086-1-frank.jungclaus@esd.euSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Frank Jungclaus authored
Rename the following macros: - ESD_RTR to ESD_USB_RTR - ESD_EV_CAN_ERROR_EXT to ESD_USB_EV_CAN_ERROR_EXT Additionally remove the double newline trailing to definition of ESD_USB_RTR. Signed-off-by:
Frank Jungclaus <frank.jungclaus@esd.eu> Link: https://lore.kernel.org/r/20230523173105.3175086-3-frank.jungclaus@esd.euSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Frank Jungclaus authored
Make use of kernel macros BIT() and GENMASK(). Signed-off-by:
Frank Jungclaus <frank.jungclaus@esd.eu> Link: https://lore.kernel.org/r/20230523173105.3175086-2-frank.jungclaus@esd.euSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
Frank Jungclaus <frank.jungclaus@esd.eu> says: Apply another small batch of patches as preparation for adding support of the newly available esd CAN-USB/3 to esd_usb.c. v1 -> v2: * Make use of GENMASK() macro for ESD_USB_NO_BAUDRATE and ESD_USB_IDMASK * Also use the BIT() macro for ESD_USB2_3_SAMPLES * Removed comments with redundant hexadecimal values from BIT()-constants * Reworded (shortened) the commit messages * Changed the macro ESD_USB_3_SAMPLES to ESD_USB_TRIPLE_SAMPLES v1: * Link: https://lore.kernel.org/all/20230517192251.2405290-1-frank.jungclaus@esd.eu Link: https://lore.kernel.org/r/20230519195600.420644-1-frank.jungclaus@esd.euSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Frank Jungclaus authored
Replace a netdev_info(), emitting an informational message about the BTR value to be send to the controller, with a debug message by means of netdev_dbg(). Link: https://lore.kernel.org/all/20230509-superglue-hazy-38108aa66bfa-mkl@pengutronix.de/Suggested-by:
Marc Kleine-Budde <mkl@pengutronix.de> Suggested-by:
Vincent MAILHOL <mailhol.vincent@wanadoo.fr> Signed-off-by:
Frank Jungclaus <frank.jungclaus@esd.eu> Link: https://lore.kernel.org/r/20230519195600.420644-7-frank.jungclaus@esd.euSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Frank Jungclaus authored
Replace all hardcoded values supplied to the len element of esd_usb_msg (and its siblings) by more readable expressions, based on sizeof(), offsetof(), etc. Also spend documentation / comments that the len element of esd_usb_msg is in multiples of 32bit words and not in bytes. Link: https://lore.kernel.org/all/CAMZ6RqLaDNy-fZ2G0+QMhUEckkXLL+ZyELVSDFmqpd++aBzZQg@mail.gmail.com/Suggested-by:
Vincent MAILHOL <mailhol.vincent@wanadoo.fr> Signed-off-by:
Frank Jungclaus <frank.jungclaus@esd.eu> Link: https://lore.kernel.org/r/20230519195600.420644-6-frank.jungclaus@esd.euSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Frank Jungclaus authored
Prefix all the structures with the device name. For commonly used structures make use of (the module name) esd_usb_. For esd CAN-USB/2 and CAN-USB/Micro specific structures use esd_usb_2_ and esd_usb_m. Link: https://lore.kernel.org/all/CAMZ6RqLaDNy-fZ2G0+QMhUEckkXLL+ZyELVSDFmqpd++aBzZQg@mail.gmail.com/Suggested-by:
Vincent MAILHOL <mailhol.vincent@wanadoo.fr> Signed-off-by:
Frank Jungclaus <frank.jungclaus@esd.eu> Link: https://lore.kernel.org/r/20230519195600.420644-5-frank.jungclaus@esd.euSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Frank Jungclaus authored
Add the consistent prefix ESD_USB_ to all macros defined within esd_usb.c. For macros specific to esd CAN-USB/2 use ESD_USB_2_ as prefix. For macros specific to esd CAN-USB/Micro use ESD_USB_M_ as prefix. Change the macro ESD_USB_3_SAMPLES to ESD_USB_TRIPLE_SAMPLES to not mix up with the prefix ESD_USB_3_ which will be introduced for the CAN-USB/3 device. Link: https://lore.kernel.org/all/CAMZ6RqLaDNy-fZ2G0+QMhUEckkXLL+ZyELVSDFmqpd++aBzZQg@mail.gmail.com/Suggested-by:
Vincent MAILHOL <mailhol.vincent@wanadoo.fr> Signed-off-by:
Frank Jungclaus <frank.jungclaus@esd.eu> Link: https://lore.kernel.org/r/20230519195600.420644-4-frank.jungclaus@esd.euSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Frank Jungclaus authored
Replace the macros used to initialize the members of struct can_bittiming_const with direct values. Then also use those struct members to do the calculations in esd_usb2_set_bittiming(). Link: https://lore.kernel.org/all/CAMZ6RqLaDNy-fZ2G0+QMhUEckkXLL+ZyELVSDFmqpd++aBzZQg@mail.gmail.com/Suggested-by:
Vincent MAILHOL <mailhol.vincent@wanadoo.fr> Signed-off-by:
Frank Jungclaus <frank.jungclaus@esd.eu> Link: https://lore.kernel.org/r/20230519195600.420644-3-frank.jungclaus@esd.eu [mkl: esd_usb2_set_bittiming() use esd_usb2_bittiming_const instead of priv->can.bittiming_const] Signed-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
- 22 May, 2023 4 commits
-
-
Frank Jungclaus authored
Make use of existing kernel macros: - Use the unit suffixes from linux/units.h for the controller clock frequencies - Use the BIT() and the GENMASK() macro to set specific bits in some constants - Use CAN_MAX_DLEN (instead of directly using the value 8) for the maximum CAN payload length Additionally: - Spend some commenting for the previously changed constants - Add the current year to the copyright notice - While adding the header linux/units.h to the list of include files also sort that list alphabetically Suggested-by:
Vincent MAILHOL <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/CAMZ6RqLaDNy-fZ2G0+QMhUEckkXLL+ZyELVSDFmqpd++aBzZQg@mail.gmail.com/ Link: https://lore.kernel.org/all/CAMZ6RqKdg5YBufa0C+ttzJvoG=9yuti-8AmthCi4jBbd08JEtw@mail.gmail.com/Suggested-by:
Marc Kleine-Budde <mkl@pengutronix.de> Link: https://lore.kernel.org/all/20230518-grower-film-ea8b5f853f3e-mkl@pengutronix.de/Signed-off-by:
Frank Jungclaus <frank.jungclaus@esd.eu> Link: https://lore.kernel.org/r/20230519195600.420644-2-frank.jungclaus@esd.eu [mkl: remove hex constants in comments after BIT()] Signed-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Marcel Hellwig authored
Currently the xilinx_can driver does not support adding a phy like the "ti,tcan1043" to its devicetree. This code makes it possible to add such phy, so that the kernel makes sure that the PHY is in operational state, when the link is set to an "up" state. Signed-off-by:
Marcel Hellwig <git@cookiesoft.de> Link: https://lore.kernel.org/r/20230417085204.179268-1-git@cookiesoft.de [mkl: call phy_power_off() after pm_runtime_put()] [mkl: remove error message for phy_power_on() failure] [mkl: update kernel-doc for struct xcan_priv] Signed-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
Carsten Schmidt authored
Add support for the Classical CAN raw DLC functionality to send and receive DLC values from 9 .. 15. v1: https://lore.kernel.org/all/20230506105529.4023-1-carsten.schmidt-achim@t-online.deSigned-off-by:
Carsten Schmidt <carsten.schmidt-achim@t-online.de> Tested-by:
Jimmy Assarsson <extja@kvaser.com> Signed-off-by:
Jimmy Assarsson <extja@kvaser.com> Link: https://lore.kernel.org/r/20230516125332.82894-1-extja@kvaser.comSigned-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
-
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queueDavid S. Miller authored
Tony Nguyen says: ==================== ice: allow matching on meta data Michal Swiatkowski says: This patchset is intended to improve the usability of the switchdev slow path. Without matching on a meta data values slow path works based on VF's MAC addresses. It causes a problem when the VF wants to use more than one MAC address (e.g. when it is in trusted mode). Parse all meta data in the same place where protocol type fields are parsed. Add description for the currently implemented meta data. It is important to note that depending on DDP not all described meta data can be available. Using not available meta data leads to error returned by function which is looking for correct words in profiles read from DDP. There is also one small improvement, remove of rx field in rule info structure (patch 2). It is redundant. ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-