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

2017-07-08 Thread Ahmad Fatoum
Passing (void*)val instead of 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 <da...@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Ahmad

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

2017-11-18 Thread Ahmad Fatoum
Signed-off-by: Ahmad Fatoum <ah...@a3f.at> --- 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

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

2018-08-16 Thread Ahmad Fatoum
t91-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" + +/ { + model = &quo

[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

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 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-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(>dev, "reset", GPIOD_OUT_LOW); and then again when registering

[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

[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 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

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

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 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

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"); >

[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
14141240.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