Re: [RFC v3] net: sched: implement TCQ_F_CAN_BYPASS for lockless qdisc

2021-03-22 Thread Ahmad Fatoum
this patch, which has removed the priv->lock added in > RFC v2. Overnight test (10h, 64 mil frames) didn't see any out-of-order frames between 2 FlexCANs on a dual core machine: Tested-by: Ahmad Fatoum No performance measurements taken. > > Ther

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

2021-03-18 Thread Ahmad Fatoum
On 17.03.21 12:49, Marc Kleine-Budde wrote: > On 17.03.2021 09:18:31, Marc Kleine-Budde wrote: >> A fix for this in on its way to net/master: >> >> https://lore.kernel.org/linux-can/20210316082104.4027260-6-...@pengutronix.de/ > > It's already in net/master. Cherry-picked and works for me. Thank

Re: [RFC v2] net: sched: implement TCQ_F_CAN_BYPASS for lockless qdisc

2021-03-18 Thread Ahmad Fatoum
On 18.03.21 08:46, Yunsheng Lin wrote: > On 2021/3/18 15:10, Ahmad Fatoum wrote: >> On 15.03.21 04:10, Yunsheng Lin wrote: >>> Currently pfifo_fast has both TCQ_F_CAN_BYPASS and TCQ_F_NOLOCK >>> flag set, but queue discipline by-pass does not work for lockless >

Re: [RFC v2] net: sched: implement TCQ_F_CAN_BYPASS for lockless qdisc

2021-03-18 Thread Ahmad Fatoum
bout 10% with this > patch. > > Signed-off-by: Yunsheng Lin > --- > RFC V2: fix requeued skb out of order and data race problem. cansequence didn't find any frame reordering with 2 FlexCAN's communicating with each other on a dual core i.MX6. Feel free to add: Tested-

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

2021-03-16 Thread Ahmad Fatoum
Hello Joakim, Marc, On 01.03.21 12:20, Marc Kleine-Budde wrote: > From: Joakim Zhang > > Invoke flexcan_chip_freeze() to enter freeze mode, since need poll > freeze mode acknowledge. > > Fixes: e955cead03117 ("CAN: Add Flexcan CAN controller driver") > Link: https://lore.kernel.org/r/2021021811

Re: [Linux-stm32] [PATCH AUTOSEL 5.10 28/45] net: stmmac: Fixed mtu channged by cache aligned

2021-01-21 Thread Ahmad Fatoum
Hello Sasha, On 20.01.21 15:26, Sasha Levin wrote: > On Tue, Jan 19, 2021 at 10:08:15PM -0800, Jakub Kicinski wrote: >> On Tue, 19 Jan 2021 20:25:45 -0500 Sasha Levin wrote: >>> From: David Wu >>> >>> [ Upstream commit 5b55299eed78538cc4746e50ee97103a1643249c ] >>> >>> Since the original mtu is n

Re: [net-next 15/19] can: tcan4x5x: rework SPI access

2021-01-11 Thread Ahmad Fatoum
Hello Jakub, On 08.01.21 17:32, Jakub Kicinski wrote: > On Fri, 8 Jan 2021 11:07:26 +0100 Ahmad Fatoum wrote: >>>>> +struct __packed tcan4x5x_map_buf { >>>>> + struct tcan4x5x_buf_cmd cmd; >>>>> + u8 data[256 * sizeof(u32)]; >>>>>

Re: [net-next 15/19] can: tcan4x5x: rework SPI access

2021-01-08 Thread Ahmad Fatoum
On 07.01.21 23:38, Jakub Kicinski wrote: > On Thu, 7 Jan 2021 22:17:15 +0100 Marc Kleine-Budde wrote: >>> +struct __packed tcan4x5x_buf_cmd { >>> + u8 cmd; >>> + __be16 addr; >>> + u8 len; >>> +}; >> >> This has to be packed, as I assume the compiler would add some space after >> the

Re: [PATCH 1/2] net: stmmac: retain PTP-clock at hwtstamp_set

2020-12-17 Thread Ahmad Fatoum
On 17.12.20 18:59, Jakub Kicinski wrote: > On Thu, 17 Dec 2020 09:25:48 +0100 Ahmad Fatoum wrote: >> On 17.12.20 02:13, Jakub Kicinski wrote: >>>> + netdev_warn(priv->dev, "HW Timestamping init failed: >>>> %pe\n", >&

Re: [PATCH 1/2] net: stmmac: retain PTP-clock at hwtstamp_set

2020-12-17 Thread Ahmad Fatoum
Hello, On 17.12.20 02:13, Jakub Kicinski wrote: >> +netdev_warn(priv->dev, "HW Timestamping init failed: >> %pe\n", >> +ERR_PTR(ret)); > > why convert to ERR_PTR and use %pe and not just %d? To get a symbolic error name if support is compi

Re: [PATCH] net: stmmac: fix incorrect merge of patch upstream

2020-11-25 Thread Ahmad Fatoum
ature and should go into net-next like any other. The fix that could be backported is reverting the unintentional change of dwmac4. Cheers, Ahmad > Signed-off-by: Antonio Borneo > Reported-by: Ahmad Fatoum > --- > To: Alexandre Torgue > To: Jose Abreu > To: "David S. Mi

Re: [PATCH] net: stmmac: add flexible PPS to dwmac 4.10a

2020-11-24 Thread Ahmad Fatoum
To += Jakub's new address On 24.11.20 15:15, Ahmad Fatoum wrote: > Hello Jakub, > > On 10.10.19 00:26, Jakub Kicinski wrote: >> On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote: >>> All the registers and the functionalities used in the callback >>&g

Re: [PATCH] net: stmmac: add flexible PPS to dwmac 4.10a

2020-11-24 Thread Ahmad Fatoum
Hello Jakub, On 10.10.19 00:26, Jakub Kicinski wrote: > On Mon, 7 Oct 2019 17:43:06 +0200, Antonio Borneo wrote: >> All the registers and the functionalities used in the callback >> dwmac5_flex_pps_config() are common between dwmac 4.10a [1] and >> 5.00a [2]. >> >> Reuse the same callback for dwma

[PATCH net-next v1] ptp: document struct ptp_clock_request members

2020-11-17 Thread Ahmad Fatoum
It's arguable most people interested in configuring a PPS signal want it as external output, not as kernel input. PTP_CLK_REQ_PPS is for input though. Add documentation to nudge readers into the correct direction. Signed-off-by: Ahmad Fatoum --- Prompted by Richard's comment h

Inconclusive KASAN report on ARM32

2020-11-05 Thread Ahmad Fatoum
Hello, I am looking at an arm32 KernelAddressSanitizer report[1] and trying to make sense of it. According to the report, KASAN chokes on the second line: rt = skb_rtable(skb); if (rt->rt_type == RTN_MULTICAST) { /* rt shouldn't have been dereferenced here */ The log itself do

[PATCH v3 net 1/1] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-21 Thread Ahmad Fatoum
-link before calling mdiobus_register. Fixes: 739de9a1563a ("net: macb: Reorganize macb_mii bringup") Signed-off-by: Ahmad Fatoum --- Notes: Changes since v2: Amend Commit message to address the double GPIO registration s/SPI/RGMII/ in commit message (SPI is o

[PATCH v3 net 0/1] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-21 Thread Ahmad Fatoum
h Message-Id: <20180814141240.9085-1-a.fat...@pengutronix.de>. Changes introduced in v1 and v2 are noted in-line in their respective patches. Ahmad Fatoum (1): net: macb: Fix regression breaking non-MDIO fixed-link PHYs drivers/net/ethernet/cadence/macb_main.c | 27 +++- 1 file changed, 17 insertions(+), 10 deletions(-) -- 2.18.0

Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-21 Thread Ahmad Fatoum
On 08/21/2018 03:34 PM, Andrew Lunn wrote: > I don't see where this is happening. It is looking for a gpio called > 'link-gpios'. First while registering the MDIO bus in __mdiobus_register: gpiod = devm_gpiod_get_optional(&bus->dev, "reset", GPIOD_OUT_LOW); and then again when registerin

Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-21 Thread Ahmad Fatoum
On 08/20/2018 09:06 PM, Andrew Lunn wrote: > I would actually say, this is your real issue here. The warnings are > annoying, but i don't think they are fatal. This -EBUSY is what is > stopping the driver from loading, causing the real regression. My real issue is that a specific commit broke the

Re: [PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-20 Thread Ahmad Fatoum
On 08/20/2018 03:55 PM, Andrew Lunn wrote: > Why is of_phy_register_fixed_link(np) failing? Apparently, the fixed-link's gpio's FLAG_REQUESTED bit remained set causing gpiod_request_commit to return -EBUSY in (v4.18.0): [] (gpiod_request_commit) from [] (gpiod_request+0x64/0x88) []

Re: [PATCH 2/4] of: phy: Warn about unexpected fixed-links in of_mdiobus_register

2018-08-20 Thread Ahmad Fatoum
On 08/20/2018 03:37 PM, Andrew Lunn wrote: > We should be more specific than "device tree". It is actually the "mdio bus > subtree". I wasn't sure if there are more drivers that call of_mdiobus_register for the MAC node. I'll update the message. > Is this patch on its own sufficient to fix your

Re: [PATCH 3/4] net: macb: Support specifying PHYs in a mdio container dts node

2018-08-20 Thread Ahmad Fatoum
On 08/20/2018 03:42 PM, Andrew Lunn wrote: > On Mon, Aug 20, 2018 at 02:12:37PM +0200, Ahmad Fatoum wrote: > This is correct. But i would prefer the more readable > > struct device_node *node = of_get_child_by_name(np, "mdio"); >

Re: [PATCH] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-20 Thread Ahmad Fatoum
On 08/15/2018 03:59 PM, Lad, Prabhakar wrote: > This didn’t happen in v4.9.x something in core has changed ? In my case, it was the macb driver that changed. I found the offending commit with git-bisect, you might want to give it a try.

Re: [PATCH 2/4] of: phy: Warn about unexpected fixed-links in of_mdiobus_register

2018-08-20 Thread Ahmad Fatoum
On 08/20/2018 02:12 PM, Ahmad Fatoum wrote: > /* Loop over the child nodes and register a phy_device for each phy */ > for_each_available_child_of_node(np, child) { > + if (of_phy_is_fixed_link(np)) { > + /* fixed-links are handled in the

Re: [PATCH] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-20 Thread Ahmad Fatoum
On 08/16/2018 04:24 PM, Andrew Lunn wrote: > 1) A regression. We should find a fix for that. Maybe we should >special case a child node called 'fixed-link' in >of_mdiobus_register(). I would suggest adding a single warning if >such node is found. I just sent out a v2, which warns if fi

[PATCH 3/4] net: macb: Support specifying PHYs in a mdio container dts node

2018-08-20 Thread Ahmad Fatoum
To align macb DT entries with those of other MACs. For backwards compatibility, the old way remains supported. Suggested-by: Andrew Lunn Signed-off-by: Ahmad Fatoum --- drivers/net/ethernet/cadence/macb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH 2/4] of: phy: Warn about unexpected fixed-links in of_mdiobus_register

2018-08-20 Thread Ahmad Fatoum
-: scan phy fixed-link at address 0 [snip] mdio_bus f0028000.ethernet-: scan phy fixed-link at address 31 macb f0028000.ethernet: broken fixed-link specification Signed-off-by: Ahmad Fatoum --- drivers/of/of_mdio.c | 7 +++ 1 file changed, 7 insertions

[PATCH 1/4] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-20 Thread Ahmad Fatoum
fixed-link specification Cc: Fixes: 739de9a1563a ("net: macb: Reorganize macb_mii bringup") Signed-off-by: Ahmad Fatoum --- drivers/net/ethernet/cadence/macb_main.c | 27 +++- 1 file changed, 17 insertions(+), 10 deletions(-) Fixes since v1: Added one more

[PATCH 4/4] ARM: dts: macb: wrap macb PHYs in a mdio container

2018-08-20 Thread Ahmad Fatoum
Suggested-by: Andrew Lunn Signed-off-by: Ahmad Fatoum --- .../devicetree/bindings/net/macb.txt | 13 +++-- arch/arm/boot/dts/at91-sam9_l9260.dts | 6 ++- arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 14 ++--- arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 10 ++-- arch/arm

Re: [PATCH] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-15 Thread Ahmad Fatoum
93 @@ +/* + * at91-sama5d3_xplained_ung8087.dts - Device Tree file for the EVB-KSZ9477 board + * + * Copyright (C) 2014 Atmel, + * 2014 Nicolas Ferre + * 2018 Ahmad Fatoum + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d36.dtsi" + +/ { +

[PATCH] net: macb: Fix regression breaking non-MDIO fixed-link PHYs

2018-08-14 Thread Ahmad Fatoum
fixed-link specification Cc: Fixes: 739de9a1563a ("net: macb: Reorganize macb_mii bringup") Signed-off-by: Ahmad Fatoum --- drivers/net/ethernet/cadence/macb_main.c | 26 +++- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethern

[PATCH] e1000: Fix off-by-one in debug message

2017-11-18 Thread Ahmad Fatoum
Signed-off-by: Ahmad Fatoum --- drivers/net/ethernet/intel/e1000/e1000_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c index 8172cf08cc33..ba04a65d8500 100644 --- a/drivers/net

[PATCH] net-next: Fix minor code bug in timestamping.txt

2017-07-08 Thread Ahmad Fatoum
Passing (void*)val instead of &val would make a pointer out of an integer and cause sock_setsockopt to -EFAULT. See tools/testing/selftests/networking/timestamping/timestamping.c for a working example. Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Ahmad Fa