[net-next 39/39] can: c_can: add support to 64 message objects

2021-03-30 Thread Marc Kleine-Budde
of 32. Two 32-bit read accesses are in fact required, which however remained at 16-bit for configurations with 32 message objects. Link: https://lore.kernel.org/r/20210302215435.18286-7-dario...@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_c

[net-next 38/39] can: c_can: prepare to up the message objects number

2021-03-30 Thread Marc Kleine-Budde
Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_can/c_can.c | 50 -- drivers/net/can/c_can/c_can.h | 23 ++-- drivers/net/can/c_can/c_can_pci.c | 2 +- drivers/net/can/c_can/c_can_platform.c | 2 +-

[net-next 29/39] can: c_can: remove unnecessary blank lines and add suggested ones

2021-03-30 Thread Marc Kleine-Budde
This patch removes unnecessary blank lines and add suggested ones, so that checkpatch doesn't complain anymore. Link: https://lore.kernel.org/r/20210304154240.2747987-3-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_can/c_can.c | 2 -- drivers/net/can/

[net-next 32/39] can: c_can: replace double assignments by two single ones

2021-03-30 Thread Marc Kleine-Budde
This patch replaces the double assignments by two single ones, to make checkpatch happy. Link: https://lore.kernel.org/r/20210304154240.2747987-6-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_can/c_can.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions

[net-next 34/39] can: c_can: remove unused code

2021-03-30 Thread Marc Kleine-Budde
he removed code also made a comment useless and misleading. Link: https://lore.kernel.org/r/20210302215435.18286-2-dario...@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_can/c_can.c | 3 +-- drivers/net/can/c_can/c_can.h | 4 2 files change

[net-next 33/39] can: c_can: fix remaining checkpatch warnings

2021-03-30 Thread Marc Kleine-Budde
This patch fixes the remaining checkpatch warnings in the driver. Link: https://lore.kernel.org/r/20210304154240.2747987-7-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_can/c_can.c | 3 ++- drivers/net/can/c_can/c_can_pci.c | 2 +- 2 files changed, 3 insertions

[net-next 37/39] can: c_can: use 32-bit write to set arbitration register

2021-03-30 Thread Marc Kleine-Budde
From: Dario Binacchi The arbitration register is already set up with 32-bit writes in the other parts of the code except for this point. Link: https://lore.kernel.org/r/20210302215435.18286-5-dario...@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde --- drivers/net

[net-next 27/39] can: mcp251xfd: add HW timestamp to RX, TX and error CAN frames

2021-03-30 Thread Marc Kleine-Budde
This patch uses the previously added mcp251xfd_skb_set_timestamp() function to convert the timestamp done by the CAN controller into a proper skb hw timestamp. Link: https://lore.kernel.org/r/20210304161209.2754463-1-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- .../net/can/spi

[net-next 36/39] can: c_can: add a comment about IF_RX interface's use

2021-03-30 Thread Marc Kleine-Budde
86-4-dario...@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_can/c_can.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 8212f3d98aa9..980abf6a8609 100644 --- a/drivers/net

Re: [PATCH net-next v1 1/3] net: phy: micrel: KSZ8081: add loopback support

2021-03-30 Thread Marc Kleine-Budde
| Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | signature.asc Description: OpenPGP digital signature

Re: [PATCH net-next v1 2/3] net: phy: at803x: AR8085: add loopback support

2021-03-30 Thread Marc Kleine-Budde
> + * Documentation says nothing about it, so I take time which seems to > + * work on AR8085. > + */ /* Keep in mind the net multi line comment * style. */ Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | h

pull-request: can 2021-04-06

2021-04-06 Thread Marc Kleine-Budde
85f04: can: mcp251x: fix support for half duplex SPI host controllers (2021-04-06 12:31:21 +0200) linux-can-fixes-for-5.12-20210406 ---- Marc Kleine-Budde (1): can:

[net] can: mcp251x: fix support for half duplex SPI host controllers

2021-04-06 Thread Marc Kleine-Budde
ey Tested-By: Tim Harvey Reported-by: Gerhard Bertelsmann Signed-off-by: Marc Kleine-Budde --- drivers/net/can/spi/mcp251x.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c index f6

[net-next 1/6] can: skb: alloc_can{,fd}_skb(): set "cf" to NULL if skb allocation fails

2021-04-07 Thread Marc Kleine-Budde
r/20210402102245.1512583-1-...@pengutronix.de Suggested-by: Vincent MAILHOL Signed-off-by: Marc Kleine-Budde --- drivers/net/can/dev/skb.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/dev/skb.c b/drivers/net/can/dev/skb.c index 387c0bc0fb9c..61660248

pull-request: can-next 2021-04-07

2021-04-07 Thread Marc Kleine-Budde
-next-for-5.13-20210407 Marc Kleine-Budde (6): can: skb: alloc_can{,fd}_skb(): set "cf" to NULL if skb allocation fails can: m_can: m_can_receive_skb(): add missing error handling to can_rx_offload_queue_sorted()

[net-next 3/6] can: c_can: remove unused enum BOSCH_C_CAN_PLATFORM

2021-04-07 Thread Marc Kleine-Budde
This patch removes the unused enum BOSCH_C_CAN_PLATFORM. Link: https://lore.kernel.org/r/20210406110617.1865592-2-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_can/c_can.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/can/c_can/c_can.h b/drivers/net

[net-next 2/6] can: m_can: m_can_receive_skb(): add missing error handling to can_rx_offload_queue_sorted() call

2021-04-07 Thread Marc Kleine-Budde
context") Link: https://lore.kernel.org/r/20210401084515.1455013-1-...@pengutronix.de Reported-by: coverity-bot Addresses-Coverity-ID: 1503583 ("Error handling issues") Reviewed-by: Kees Cook Cc: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde --- drivers/net/can/m_can/m_ca

[net-next 5/6] can: mcp251xfd: mcp251xfd_regmap_crc_read_one(): Factor out crc check into separate function

2021-04-07 Thread Marc Kleine-Budde
This patch factors out the crc check into a separate function. This is preparation for the next patch. Link: https://lore.kernel.org/r/20210406110617.1865592-4-...@pengutronix.de Cc: Manivannan Sadhasivam Cc: Thomas Kopp Signed-off-by: Marc Kleine-Budde --- .../net/can/spi/mcp251xfd/mcp251xfd

[net-next 4/6] can: mcp251xfd: add BQL support

2021-04-07 Thread Marc Kleine-Budde
This patch re-adds BQL support to the driver. Support for netdev_xmit_more() will be added in a separate patch series. Link: https://lore.kernel.org/r/20210406110617.1865592-3-...@pengutronix.de Cc: Manivannan Sadhasivam Cc: Thomas Kopp Signed-off-by: Marc Kleine-Budde --- .../net/can/spi

[net-next 6/6] can: mcp251xfd: mcp251xfd_regmap_crc_read(): work around broken CRC on TBC register

2021-04-07 Thread Marc Kleine-Budde
org/r/20210406110617.1865592-5-...@pengutronix.de Cc: Manivannan Sadhasivam Cc: Thomas Kopp Signed-off-by: Marc Kleine-Budde --- .../net/can/spi/mcp251xfd/mcp251xfd-regmap.c | 34 +++ 1 file changed, 34 insertions(+) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c b/drivers/net/ca

Re: flexcan introduced a DIV/0 in kernel

2021-04-09 Thread Marc Kleine-Budde
chip_freeze(): fix chip freeze for missing bitrate Greg, can you pick this up for v4.14? regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-92

Re: flexcan introduced a DIV/0 in kernel

2021-04-09 Thread Marc Kleine-Budde
On 09.04.2021 14:55:59, Koen Vandeputte wrote: > > On 09.04.21 13:21, Marc Kleine-Budde wrote: > > On 4/9/21 12:18 PM, Koen Vandeputte wrote: > > > Hi All, > > > > > > I just updated kernel 4.14 within OpenWRT from 4.14.224 to 4.14.229 > > >

Re: [PATCH v15 0/3] Introducing ETAS ES58X CAN USB interfaces

2021-04-12 Thread Marc Kleine-Budde
x_urb_cmd *urb_cmd) I have applied to linux-can-next/testing with the above spell fix. Thanks for the steady work on this and all the other features. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertre

Re: [PATCH 2/4] phy: phy-can-transceiver: Add support for generic CAN transceiver driver

2021-04-12 Thread Marc Kleine-Budde
phy_set_drvdata(can_transceiver_phy->generic_phy, can_transceiver_phy); > + > + phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); > + > + return PTR_ERR_OR_ZERO(phy_provider); > +} > + > +static struct platform_driver can_transceiver_phy_driver = { > + .probe = can_transceiver_phy_probe, > + .driver = { > + .name = "can-transceiver-phy", > + .of_match_table = can_transceiver_phy_ids, > + }, > +}; > + > +module_platform_driver(can_transceiver_phy_driver); > + > +MODULE_AUTHOR("Faiz Abbas "); > +MODULE_AUTHOR("Aswath Govindraju "); > +MODULE_DESCRIPTION("CAN TRANSCEIVER PHY driver"); > +MODULE_LICENSE("GPL v2"); > marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | signature.asc Description: OpenPGP digital signature

Re: [PATCH 1/4] dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers

2021-04-12 Thread Marc Kleine-Budde
in bps > +minimum: 1 > + > +required: > + - compatible > + - '#phy-cells' > + > +additionalProperties: false > + > +examples: > + - | > +#include > + > +transceiver1: tcan104x-phy { > + compatible = "ti,tcan1043"; > + #phy-cel

Re: [PATCH 4/4] can: m_can_platform: Add support for transceiver as phy

2021-04-12 Thread Marc Kleine-Budde
itrate_max = (transceiver->attrs.max_link_rate) * 100; > + if (!bitrate_max) > + dev_warn(&pdev->dev, "Invalid value for transceiver max > bitrate. Ignoring bitrate limit\n"); Please move this check to the generic transce

Re: [PATCH 1/4] dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers

2021-04-13 Thread Marc Kleine-Budde
On 12.04.2021 12:49:56, Rob Herring wrote: > On Mon, Apr 12, 2021 at 12:19:30PM +0200, Marc Kleine-Budde wrote: > > On 4/9/21 3:40 PM, Aswath Govindraju wrote: > > > Add binding documentation for TI TCAN104x CAN transceivers. > > > > > &

pull-request: can-next 2021-04-13

2021-04-13 Thread Marc Kleine-Budde
) linux-can-next-for-5.13-20210413 Marc Kleine-Budde (10): can: peak_usb: fix checkpatch warnings can: peak_usb: pcan_usb_pro.h: remove double space in indention can: peak_usb: remove unused

[net-next 06/14] can: peak_usb: pcan_usb_pro.h: remove double space in indention

2021-04-13 Thread Marc Kleine-Budde
This patch replaces the double space indention after the u8 with a single space in pcan_usb_pro.h. Link: https://lore.kernel.org/r/20210406111622.1874957-3-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb

[net-next 01/14] dt-bindings: net: can: rcar_can: Document r8a77961 support

2021-04-13 Thread Marc Kleine-Budde
-by: Geert Uytterhoeven Acked-by: Rob Herring Reviewed-by: Wolfram Sang Signed-off-by: Marc Kleine-Budde --- Documentation/devicetree/bindings/net/can/rcar_can.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b

[net-next 02/14] can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces

2021-04-13 Thread Marc Kleine-Budde
...@wanadoo.fr Co-developed-by: Arunachalam Santhanam Signed-off-by: Arunachalam Santhanam Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/Kconfig | 10 + drivers/net/can/usb/Makefile|1 + drivers/net/can/usb/etas_es58x

[net-next 03/14] can: etas_es58x: add support for ETAS ES581.4 CAN USB interface

2021-04-13 Thread Marc Kleine-Budde
Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/etas_es58x/Makefile | 2 +- drivers/net/can/usb/etas_es58x/es581_4.c| 507 drivers/net/can/usb/etas_es58x/es581_4.h| 207 drivers/net/can/usb/etas_es58x/es58x_core.c

[net-next 10/14] can: peak_usb: pcan_usb_{,pro}_get_device_id(): remove unneeded check for device_id

2021-04-13 Thread Marc Kleine-Budde
/20210406111622.1874957-7-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/peak_usb/pcan_usb.c | 4 ++-- drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a

[net-next 07/14] can: peak_usb: remove unused variables from struct peak_usb_device

2021-04-13 Thread Marc Kleine-Budde
This patch removes the unused variables struct peak_usb_device::echo_skb and struct peak_usb_device::bus_load from the driver. Link: https://lore.kernel.org/r/20210406111622.1874957-4-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde

[net-next 08/14] can: peak_usb: remove write only variable struct peak_usb_adapter::ts_period

2021-04-13 Thread Marc Kleine-Budde
The variable struct peak_usb_adapter::ts_period is only ever written to. This patch removes it from the driver. Link: https://lore.kernel.org/r/20210406111622.1874957-5-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde --- drivers/net

[net-next 09/14] can: peak_usb: peak_usb_probe(): make use of driver_info

2021-04-13 Thread Marc Kleine-Budde
24 - -24 | peak_usb_probe 236 136-100 | Total: Before=25263, After=25139, chg -0.49% Link: https://lore.kernel.org/r/20210406111622.1874957-6-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kl

[net-next 14/14] can: peak_usb: pcan_usb: replace open coded endianness conversion of unaligned data

2021-04-13 Thread Marc Kleine-Budde
This patch replaces the open coded endianness conversion of unaligned data by the appropriate get/put_unaligned_leXX() variants. Link: https://lore.kernel.org/r/20210406111622.1874957-11-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde

[net-next 13/14] can: peak_usb: pcan_usb_get_serial(): unconditionally assign serial_number

2021-04-13 Thread Marc Kleine-Budde
The function serial_number is only called from one location with a valid serial_number pointer. Remove not needed NULL pointer check. Link: https://lore.kernel.org/r/20210406111622.1874957-10-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine

[net-next 05/14] can: peak_usb: fix checkpatch warnings

2021-04-13 Thread Marc Kleine-Budde
This patch cleans several checkpatch warnings in the peak_usb driver. Link: https://lore.kernel.org/r/20210406111622.1874957-2-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/peak_usb/pcan_usb.c | 4

[net-next 12/14] can: peak_usb: pcan_usb_get_serial(): make use of le32_to_cpup()

2021-04-13 Thread Marc Kleine-Budde
This patch replaces the memcpy() + le32_to_cpu() by le32_to_cpup(). Link: https://lore.kernel.org/r/20210406111622.1874957-9-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/peak_usb/pcan_usb.c | 8 ++-- 1

[net-next 11/14] can: peak_usb: pcan_usb_get_serial(): remove error message from error path

2021-04-13 Thread Marc Kleine-Budde
The caller of pcan_usb_get_serial() already prints an error message, so remove this one and return immediately. Link: https://lore.kernel.org/r/20210406111622.1874957-8-...@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde --- drivers/net

[net-next 04/14] can: etas_es58x: add support for the ETAS ES58X_FD CAN USB interfaces

2021-04-13 Thread Marc Kleine-Budde
Santhanam Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/etas_es58x/Makefile | 2 +- drivers/net/can/usb/etas_es58x/es58x_core.c | 19 +- drivers/net/can/usb/etas_es58x/es58x_core.h | 6 +- drivers/net/can/usb/etas_es58x/es58x_fd.c | 562

Re: [PATCH v3] dt-bindings: net: can: rcar_can: Document r8a77961 support

2021-04-13 Thread Marc Kleine-Budde
Rob Herring > Reviewed-by: Wolfram Sang Added to latest pull request. Tnx, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht

Re: [PATCH] can: etas_es58x: fix null pointer dereference when handling error frames

2021-04-13 Thread Marc Kleine-Budde
d. You might either cancel the pull request > and squash this to 8537257874e9 ("can: etas_es58x: add core support > for ETAS ES58X CAN USB interfaces") or send it as a separate patch. > > Please let me know if you need me to do anything. I'll send a follo

Re: [PATCH 2/4] phy: phy-can-transceiver: Add support for generic CAN transceiver driver

2021-04-13 Thread Marc Kleine-Budde
On 14.04.2021 11:54:36, Aswath Govindraju wrote: > Hi Marc, > > On 12/04/21 3:48 pm, Marc Kleine-Budde wrote: > > On 4/9/21 3:40 PM, Aswath Govindraju wrote: > >> The driver adds support for generic CAN transceivers. Currently > >> the modes supported by this dr

Re: [PATCH 0/4] CAN TRANSCEIVER: Add support for CAN transceivers

2021-04-14 Thread Marc Kleine-Budde
add it CAN NETWORK DRIVERS. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-555

Re: [PATCH v2 6/6] can: m_can: Add support for transceiver as phy

2021-04-14 Thread Marc Kleine-Budde
t; + else > + priv->cdev.can.bitrate_max = transceiver->attrs.max_link_rate; > + > priv->base = addr; > priv->mram_base = mram_addr; > > @@ -108,6 +122,7 @@ static int m_can_plat_probe(struct platform_device *pdev) > mcan_class->pm_cl

Re: [PATCH v2 3/6] dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers

2021-04-14 Thread Marc Kleine-Budde
mpatible = "ti,tcan1043"; > + #phy-cells = <0>; > + max-bitrate = <500>; > + standby-gpios = <&wakeup_gpio1 16 GPIO_ACTIVE_LOW>; > + enable-gpios = <&main_gpio1 67 GPIO_ACTIVE_LOW>; AFAICS the enable gpio is active high

Re: [PATCH v2 4/6] phy: phy-can-transceiver: Add support for generic CAN transceiver driver

2021-04-14 Thread Marc Kleine-Budde
/devicetree/bindings/net/can/ > F: Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml > +F: drivers/phy/phy-can-transceiver.c > F: drivers/net/can/ please keep this alphabetically sorted Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embed

Re: [PATCH v2 4/6] phy: phy-can-transceiver: Add support for generic CAN transceiver driver

2021-04-14 Thread Marc Kleine-Budde
\ > broadcom/\ I'm not sure how the phy framework handles this, but I assume it's alphabetically sorted, too. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengu

Re: [PATCH v2 0/6] CAN TRANSCEIVER: Add support for CAN transceivers

2021-04-14 Thread Marc Kleine-Budde
t CAN transceivers. > > Patches 5 & 6 add support for implementing the transceiver as a phy of > m_can_platform driver. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretun

pull-request: can-next 2021-04-14

2021-04-14 Thread Marc Kleine-Budde
Hello Jakub, hello David, this is a pull request of a single patch for net-next/master. Vincent Mailhol's patch fixes a NULL pointer dereference when handling error frames in the etas_es58x driver, which has been added in the previous PR. regards, Marc --- The following changes since commit 58

[net-next] can: etas_es58x: fix null pointer dereference when handling error frames

2021-04-14 Thread Marc Kleine-Budde
unachalam Santhanam Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/etas_es58x/es58x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c b/drivers/net/can/usb/etas_es58x/es58x_core.c

Re: [PATCH v2 3/6] dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers

2021-04-15 Thread Marc Kleine-Budde
On 15.04.2021 11:57:20, Aswath Govindraju wrote: > Hi Marc, > > On 14/04/21 9:03 pm, Marc Kleine-Budde wrote: > > On 14.04.2021 19:35:18, Aswath Govindraju wrote: > >> Add binding documentation for TI TCAN104x CAN transceivers. > >> >

Re: [PATCH][next] can: etas_es58x: Fix potential null pointer dereference on pointer cf

2021-04-15 Thread Marc Kleine-Budde
net-next/master https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=e2b1e4b532abdd39bfb7313146153815e370d60c Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertr

Re: [PATCH][next] can: etas_es58x: Fix missing null check on netdev pointer

2021-04-15 Thread Marc Kleine-Budde
verity: ("Dereference before null check") > Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN > USB interfaces") > Signed-off-by: Colin Ian King Looks good. Applied to linux-can-next/testing. Tnx, Marc -- Pengutronix e.K.

Re: [PATCH v2 3/6] dt-bindings: phy: Add binding for TI TCAN104x CAN transceivers

2021-04-15 Thread Marc Kleine-Budde
cumentation/devicetree/bindings/phy folder. Also, > scripts/get_maintainer.pl is giving the names of maintainers after > reading the yaml files too. Nice! Clever script. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.p

Re: [PATCH][next] can: etas_es58x: Fix a couple of spelling mistakes

2021-04-15 Thread Marc Kleine-Budde
On 15.04.2021 12:30:50, Colin King wrote: > From: Colin Ian King > > There are spelling mistakes in netdev_dbg and netdev_dbg messages, > fix these. > > Signed-off-by: Colin Ian King Applied to linux-can-next/testing. Tnx, Marc -- Pengutronix e.K. |

Re: [PATCH][next] can: etas_es58x: Fix missing null check on netdev pointer

2021-04-15 Thread Marc Kleine-Budde
On 15.04.2021 20:42:36, Vincent MAILHOL wrote: > On Thu. 15 Apr 2021 at 18:04, Marc Kleine-Budde wrote: > > On 15.04.2021 09:47:23, Colin King wrote: > > > From: Colin Ian King > > > > > > There is an assignment to *netdev tha

Re: [PATCH v2 2/2] can: m_can: Add support for transceiver as phy

2021-04-15 Thread Marc Kleine-Budde
priv->base = addr; > priv->mram_base = mram_addr; > > @@ -108,6 +120,7 @@ static int m_can_plat_probe(struct platform_device *pdev) > mcan_class->pm_clock_support = 1; > mcan_class->can.clock.freq = clk_get_rate(mcan_class->cclk); > mcan_class->dev

Re: [PATCH v2 0/2] MCAN: Add support for implementing transceiver as a phy

2021-04-16 Thread Marc Kleine-Budde
patch hits mainline. Then I'll merge this into linux-can-next. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hil

Re: [PATCH] can: mcba_usb: remove h from printk format specifier

2021-01-26 Thread Marc Kleine-Budde
r promotion is already done and %hx and %hhx is useless > so do not encourage the use of %hh[xudi] or %h[xudi]. > > Signed-off-by: Tom Rix Added to linux-can-next/testing. Thanks, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux |

[net-next 03/12] can: dev: export can_get_state_str() function

2021-01-27 Thread Marc Kleine-Budde
From: Vincent Mailhol The can_get_state_str() function is also relevant to the drivers. Export the symbol and make it visible in the can/dev.h header. Link: https://lore.kernel.org/r/20210119170355.12040-1-mailhol.vinc...@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine

[net-next 02/12] can: flexcan: fix typos

2021-01-27 Thread Marc Kleine-Budde
This patch fixes two typos found by codespell. Fixes: 812f0116c66a ("can: flexcan: add CAN wakeup function for i.MX8QM") Link: https://lore.kernel.org/r/20210127085529.2768537-2-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- drivers/net/can/flexcan.c | 4 ++-- 1 file

[net-next 08/12] can: mcp251xfd: mcp251xfd_tx_obj_from_skb(): clean up padding of CAN-FD frames

2021-01-27 Thread Marc Kleine-Budde
activated). This patch cleans up the pad len calculation. Rounding to full u32 brings no benefit, in case of CRC transfers, the hw_tx_obj->data is not aligned to u32 anyway. Link: https://lore.kernel.org/r/20210114153448.1506901-3-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- drivers/net/

[net-next 12/12] can: mcp251xfd: add BQL support

2021-01-27 Thread Marc Kleine-Budde
This patch adds BQL support to the driver. Support for netdev_xmit_more() will be added in a separate patch series. Link: https://lore.kernel.org/r/20210114153448.1506901-7-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- .../net/can/spi/mcp251xfd/mcp251xfd-core.c| 21

[net-next 11/12] can: mcp251xfd: add len8_dlc support

2021-01-27 Thread Marc Kleine-Budde
This patch adds support for the Classical CAN raw DLC functionality to send and receive DLC values from 9 ... 15 to the mcp251xfd driver. Link: https://lore.kernel.org/r/20210114153448.1506901-6-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- .../net/can/spi/mcp251xfd/mcp251xfd-core.c

[net-next 05/12] can: mcba_usb: remove h from printk format specifier

2021-01-27 Thread Marc Kleine-Budde
f %hh[xudi] or %h[xudi]. Link: https://lore.kernel.org/r/20210124150916.1920434-1-t...@redhat.com Signed-off-by: Tom Rix Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/mcba_usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/usb/mcba_usb.c

[net] can: dev: prevent potential information leak in can_fill_info()

2021-01-27 Thread Marc Kleine-Budde
d counters") Link: https://lore.kernel.org/r/YAkaRdRJncsJO8Ve@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Marc Kleine-Budde --- drivers/net/can/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 8b1ae023cb21..c73e2a65c904 1006

pull-request: can 2021-01-27

2021-01-27 Thread Marc Kleine-Budde
Hello Jakub, hello David, this is a pull request of 1 patch for net/master. The patch is by Dan Carpenter and fixes a potential information leak in can_fill_info(). Note: Sorry to say this again: This patch touches "drivers/net/can/dev.c". In net-next/master this file has been moved to drivers/n

[net-next 09/12] can: mcp251xfd: mcp251xfd_hw_rx_obj_to_skb(): don't copy data for RTR CAN frames in RX-path

2021-01-27 Thread Marc Kleine-Budde
-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c index aa992e71d787..92816be4f3d4

[net-next 04/12] can: length: can_fd_len2dlc(): make legnth calculation readable again

2021-01-27 Thread Marc Kleine-Budde
2562e5ff06 ("can: length: can_fd_len2dlc(): simplify length calculcation") Cc: Vincent MAILHOL Link: https://lore.kernel.org/r/20210118201346.79422-1-socket...@hartkopp.net Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde --- drivers/net/can/dev/length.c | 7 ++

[net-next 06/12] can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap

2021-01-27 Thread Marc Kleine-Budde
off-by: Su Yanjun Signed-off-by: Marc Kleine-Budde --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c index 00e9855c23d1..89

[net-next 07/12] can: mcp251xfd: mcp251xfd_start_xmit(): use mcp251xfd_get_tx_free() to check TX is is full

2021-01-27 Thread Marc Kleine-Budde
This patch replaces an open coded check if the TX ring is full by a check if mcp251xfd_get_tx_free() returns 0. Link: https://lore.kernel.org/r/20210114153448.1506901-2-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 2 +- 1 file changed

pull-request: can-next 2021-01-27

2021-01-27 Thread Marc Kleine-Budde
10:01:47 +0100) linux-can-next-for-5.12-20210127 -------- Marc Kleine-Budde (9): can: gw: fix typo can: flexcan: fix typos can: length: can_fd_len2dlc(): make legnth calcu

[net-next 10/12] can: mcp251xfd: mcp251xfd_tx_obj_from_skb(): don't copy data for RTR CAN frames in TX-path

2021-01-27 Thread Marc Kleine-Budde
In Classical CAN there are RTR frames. RTR frames have the RTR bit set, may have a dlc != 0, but contain no data. This patch optimizes the TX-path to not copy any data for RTR frames. Link: https://lore.kernel.org/r/20210114153448.1506901-5-...@pengutronix.de Signed-off-by: Marc Kleine-Budde

[net-next 01/12] can: gw: fix typo

2021-01-27 Thread Marc Kleine-Budde
This patch fixes a typo found by codespell. Fixes: 94c23097f991 ("can: gw: support modification of Classical CAN DLCs") Link: https://lore.kernel.org/r/20210127085529.2768537-3-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- net/can/gw.c | 2 +- 1 file changed, 1 inser

Re: [PATCH linux-can] can: flexcan: enable RX FIFO after FRZ/HALT valid

2021-02-01 Thread Marc Kleine-Budde
_HALT | > - FLEXCAN_MCR_FEN | FLEXCAN_MCR_SUPV; > + reg |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_HALT; > + priv->write(reg, ®s->mcr); > + > + while (timeout-- && !(priv->read(®s->mcr) & FLEXCAN_MCR_FRZ_ACK)) > + udelay(100); Please

Re: [PATCH linux-can] can: flexcan: enable RX FIFO after FRZ/HALT valid

2021-02-02 Thread Marc Kleine-Budde
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | signature.asc Description: OpenPGP digital signature

pull-request: can 2021-03-01

2021-03-01 Thread Marc Kleine-Budde
n: assert FRZ bit in flexcan_chip_freeze() can: flexcan: enable RX FIFO after FRZ/HALT valid can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode Marc Kleine-Budde (1): can: mcp251xfd: revert "can: mcp251xfd: add BQL support" Oleksij Rempel (1): can: skb: can_skb

[net 1/6] can: flexcan: assert FRZ bit in flexcan_chip_freeze()

2021-03-01 Thread Marc Kleine-Budde
lling freeze mode acknowledge. Fixes: b1aa1c7a2165b ("can: flexcan: fix transition from and to freeze mode in chip_{,un}freeze") Link: https://lore.kernel.org/r/20210218110037.16591-2-qiangqing.zh...@nxp.com Signed-off-by: Joakim Zhang Signed-off-by: Marc Kleine-Budde --- drivers/net/ca

[net 2/6] can: flexcan: enable RX FIFO after FRZ/HALT valid

2021-03-01 Thread Marc Kleine-Budde
angqing.zh...@nxp.com Signed-off-by: Joakim Zhang Signed-off-by: Marc Kleine-Budde --- drivers/net/can/flexcan.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index ee2d4967d66a..e66a51dbea0a 100644 --- a/drivers/net/can

[net 6/6] can: tcan4x5x: tcan4x5x_init(): fix initialization - clear MRAM before entering Normal Mode

2021-03-01 Thread Marc Kleine-Budde
by first initializing the MRAM, then bringing the device into Normale Mode. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Link: https://lore.kernel.org/r/20210226163440.313628-1-to...@maxiluxsystems.com Suggested-by: Marc Kleine-Budde Signed-off-by: Torin Coo

[net 4/6] can: mcp251xfd: revert "can: mcp251xfd: add BQL support"

2021-03-01 Thread Marc Kleine-Budde
ink: https://lore.kernel.org/r/20210228083347.28580-1-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- .../net/can/spi/mcp251xfd/mcp251xfd-core.c| 21 --- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drive

[net 5/6] can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-03-01 Thread Marc Kleine-Budde
ef count > 0. Fixes: 0ae89beb283a ("can: add destructor for self generated skbs") Cc: Oliver Hartkopp Cc: Andre Naujoks Link: https://lore.kernel.org/r/20210226092456.27126-1-o.rem...@pengutronix.de Suggested-by: Eric Dumazet Signed-off-by: Oleksij Rempel Reviewed-by: Oliver Hartkopp Signed-off-

[net 3/6] can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode

2021-03-01 Thread Marc Kleine-Budde
Signed-off-by: Marc Kleine-Budde --- drivers/net/can/flexcan.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index e66a51dbea0a..134c05757a3b 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can

Re: [PATCH v2 3/6] can: c_can: fix control interface used by c_can_do_tx

2021-03-01 Thread Marc Kleine-Budde
my analysis is correct, please update the patch and add a comment to clarify why IF_RX is used instead of changing it to IF_TX. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dort

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-01 Thread Marc Kleine-Budde
gt; /* Clear the bits in the tx_active mask */ > atomic_sub(clr, &priv->tx_active); > > - if (clr & (1 << (C_CAN_MSG_OBJ_TX_NUM - 1))) > + if (clr & (1 << (priv->msg_obj_tx_num - 1))) Do we need 1UL here, too? Marc -- Pengutronix e.

Re: [PATCH v2 5/6] can: c_can: prepare to up the message objects number

2021-03-01 Thread Marc Kleine-Budde
API is another option. > > > > Do you know if any of the hardware managed by Linux use a D_CAN controller > with 128 message objects? Even the am437x only uses 64 message objects. Ok let's stay with 64 as max for now. regards, Marc -- Pengutronix e.K. | Mar

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-01 Thread Marc Kleine-Budde
On 01.03.2021 12:38:05, Marc Kleine-Budde wrote: > On 28.02.2021 11:38:54, Dario Binacchi wrote: > [...] > > > @@ -730,7 +728,7 @@ static void c_can_do_tx(struct net_device *dev) > > while ((idx = ffs(pend))) { > > idx--; > > pend &a

Re: [PATCH] can: c_can_pci: fix use-after-free

2021-03-01 Thread Marc Kleine-Budde
n/c_can/c_can_pci.c > +++ b/drivers/net/can/c_can/c_can_pci.c > @@ -239,12 +239,13 @@ static void c_can_pci_remove(struct pci_dev *pdev) > { > struct net_device *dev = pci_get_drvdata(pdev); > struct c_can_priv *priv = netdev_priv(dev); > - > + void __iomem *ad

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-01 Thread Marc Kleine-Budde
On 01.03.2021 18:24:31, Dario Binacchi wrote: > Hi Marc, > > > Il 01/03/2021 14:08 Marc Kleine-Budde ha scritto: > > > > > > On 01.03.2021 12:38:05, Marc Kleine-Budde wrote: > > > On 28.02.2021 11:38:54, Dario Binacchi wrote: > > > [...

Re: [PATCH] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-01 Thread Marc Kleine-Budde
flags |= IFF_ECHO; /* we support local echo */ > dev->netdev_ops = &c_can_netdev_ops; > > err = register_candev(dev); > - if (err) > - c_can_pm_runtime_disable(priv); > - else > - devm_can_led_init(dev); > - > + if (!err) > + dev

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-01 Thread Marc Kleine-Budde
; (priv->msg_obj_tx_num - 1))) > > > > Do we need 1UL here, too? > > Do you agree if I use the BIT macro ? No, please use GENMASK(priv->msg_obj_tx_num, 0) here. regrads, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-01 Thread Marc Kleine-Budde
On 01.03.2021 14:08:45, Marc Kleine-Budde wrote: > On 01.03.2021 12:38:05, Marc Kleine-Budde wrote: > > On 28.02.2021 11:38:54, Dario Binacchi wrote: > > [...] > > > > > @@ -730,7 +728,7 @@ static void c_can_do_tx(struct net_device *dev) > > > while ((

Re: [PATCH v2] can: c_can: move runtime PM enable/disable to c_can_platform

2021-03-02 Thread Marc Kleine-Budde
enable/disable code to > c_can_platform. > > Signed-off-by: Tong Zhang Applied to linux-can/testing. Thanks, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-02 Thread Marc Kleine-Budde
On 3/2/21 11:50 AM, Dario Binacchi wrote: > Hi Marc, > >> Il 01/03/2021 20:45 Marc Kleine-Budde ha scritto: >> >> >> On 01.03.2021 18:21:42, Dario Binacchi wrote: >>>>> @@ -730,7 +728,7 @@ static void c_can_do_tx(struct net_device *dev) >>&g

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-03 Thread Marc Kleine-Budde
ixir.bootlin.com/linux/v5.11/source/drivers/net/can/flexcan.c#L904 This should to IMHO into patch 6. Adding the ethtool support and making the rings configurable would be a separate patch. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux

Re: [PATCH v3 5/6] can: c_can: prepare to up the message objects number

2021-03-03 Thread Marc Kleine-Budde
On 03.03.2021 11:31:10, Dario Binacchi wrote: > I think these features need to be developed in a later series. > I would stay with the extension to 64 messages equally divided > between reception and transmission. Fine with me. Marc -- Pengutronix e.K. | Marc Kle

Re: [PATCH net] can: dev: Move device back to init netns on owning netns delete

2021-03-03 Thread Marc Kleine-Budde
issue was introduced in the commit mentioned below, as at that time > CAN devices did not have a dellink() operation. > > Fixes: e008b5fc8dc7 ("net: Simplfy default_device_exit and improve batching.") > Signed-off-by: Martin Willi Acked-by: Marc Kleine-Budde David, Jakub

<    1   2   3   4   5   6   7   8   9   10   >