Re: [PATCH net] net: macb: Probe MDIO bus before registering netdev

2016-05-03 Thread Nicolas Ferre
this follow-up and the advices you had given to Alexandre during the debug session when you spotted this problem. Acked-by: Nicolas Ferre > --- > Tracking down the exact commit which started doing that was a little > difficult, so I can't really provide a proper Fixes tag yet that d

Re: [PATCH 0/5] net: macb: Checkpatch cleanups

2016-03-18 Thread Nicolas Ferre
ding style error message > net: macb: Fix coding style warnings > net: macb: Address checkpatch 'check' suggestions > net: macb: Use ether_addr_copy over memcpy > net: macb: Fix simple typo. > > drivers/net/ethernet/cadence/macb.c | 153 > +++++--- > 1 file changed, 70 insertions(+), 83 deletions(-) > -- Nicolas Ferre

Re: [PATCH 5/5] net: macb: Fix simple typo.

2016-03-19 Thread Nicolas Ferre
> * descriptor access. >> */ >> static bool hw_is_native_io(void __iomem *addr) >> > > Remove dot at the end of subject and feel free to add my: > Acked-by: Michal Simek Yes, same for me, no dot. But anyway, here is my: Acked-by: Nicolas Ferre Thanks Moritz for the patches and Michal for the reviews. Bye, -- Nicolas Ferre

Re: [PATCH 3/5] net: macb: Address checkpatch 'check' suggestions

2016-03-19 Thread Nicolas Ferre
Le 13/03/2016 20:10, Moritz Fischer a écrit : > This commit deals with a bunch of checkpatch suggestions > that without changing behavior make checkpatch happier. > > Signed-off-by: Moritz Fischer Acked-by: Nicolas Ferre > --- > drivers/net/ethernet/c

Re: [PATCH 4/5] net: macb: Use ether_addr_copy over memcpy

2016-03-19 Thread Nicolas Ferre
Le 13/03/2016 20:10, Moritz Fischer a écrit : > Checkpatch suggests using ether_addr_copy over memcpy > to copy the mac address. > > Signed-off-by: Moritz Fischer Yes: Acked-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb.c | 2 +- > 1 file changed, 1 ins

Re: [PATCH 1/5] net: macb: Fix coding style error message

2016-03-19 Thread Nicolas Ferre
Le 13/03/2016 20:10, Moritz Fischer a écrit : > checkpatch.pl gave the following error: > > ERROR: space required before the open parenthesis '(' > + for(; p < end; p++, offset += 4) > > Signed-off-by: Moritz Fischer Acked-by: Nicolas Ferre > --- >

Re: [PATCH 2/5] net: macb: Fix coding style warnings

2016-03-19 Thread Nicolas Ferre
function comments, to do it in a separate patch (series). > Also splitting this to more patches will be better. Just by categories > but that's just my opinion. Well, yes... but I won't be too picky for such a patch. So here is my: Acked-by: Nicolas Ferre Thank for your feedback, bye, -- Nicolas Ferre

Re: [PATCH] macb: fix PHY reset

2016-03-23 Thread Nicolas Ferre
et in >>> >>> s/wouldn't/may not/, sorry. Do I need to resend? >> >> No need, I fixed it up by hand. >> >> Applied, thanks. > > Oops, forgot another tag: > > Fixes: 270c499f0993 ("net/macb: Update device tree binding for resetting PHY > using GPIO") > >Too late probably... :-( Too late also: Acked-by: Nicolas Ferre Thanks Sergei! Bye, -- Nicolas Ferre

Re: [PATCH 1/1] net: macb: replace macb_writel() call by queue_writel() to update queue ISR

2016-03-24 Thread Nicolas Ferre
nterrupt Disable Register > IMR: Interrupt Mask Register > > Signed-off-by: Cyrille Pitchen > Fixes: bfbb92c44670 ("net: macb: Handle the RXUBR interrupt on all devices") Acked-by: Nicolas Ferre Thanks! > --- > drivers/net/ethernet/cadence/macb.c | 2 +- > 1

Re: [PATCH 1/1] net: macb: remove BUG_ON() and reset the queue to handle RX errors

2016-03-24 Thread Nicolas Ferre
standing for a long time in my backlog ;-). Acked-by: Nicolas Ferre Bye, > --- > drivers/net/ethernet/cadence/macb.c | 59 > ++--- > 1 file changed, 49 insertions(+), 10 deletions(-) > > diff --git a/drivers/net/ethernet/cadence/macb.c >

Re: [PATCH 0/3] net: macb: Fix coding style issues

2016-03-07 Thread Nicolas Ferre
ischer (3): > net: macb: Fix coding style error message > net: macb: Fix more coding style issues > net: macb: Address checkpatch 'check' suggestions > > drivers/net/ethernet/cadence/macb.c | 157 > ++++---- > 1 file changed, 71 insertions(+), 86 deletions(-) > -- Nicolas Ferre

[PATCH] net: macb: fix default configuration for GMAC on AT91

2016-03-10 Thread Nicolas Ferre
terface (GMII or MII). Reported-by: Romain HENRIET Signed-off-by: Nicolas Ferre --- drivers/net/ethernet/cadence/macb.c | 13 +++-- drivers/net/ethernet/cadence/macb.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/eth

Re: [PATCH RFT 2/2] macb: kill PHY reset code

2016-04-12 Thread Nicolas Ferre
to it seems correct to me (I mean, with proper flag specification). > property, i.e. active low. The new code in the previous patch does > however take the flags into account. Did you check if there are any > device trees which have flags, which were never used, but are now > going to be used and thus break... Flag was used and you are saying that it's taken into account in new code... So, what's the issue? I see a difference in the way the "value" of gpiod_* functions is used. There may be a misunderstanding here... Bye, -- Nicolas Ferre

Re: [PATCH RFT 2/2] macb: kill PHY reset code

2016-04-12 Thread Nicolas Ferre
ut currently works. > >>> You potentially need to add a new property and deprecate the old one. >> >>I would like to avoid that... > > You will need the agreement from the at91-vinco maintainer. If the at91-vinco has to be modified, you have my agreement that it can be modified. Bye, -- Nicolas Ferre

Re: GMII2RGMII Converter support in macb driver

2016-04-12 Thread Nicolas Ferre
acb_reset_phy(pdev); > >/* IP specific init */ > > @@ -3422,6 +3460,8 @@ static int macb_remove(struct platform_device *pdev) > > bp = netdev_priv(dev); > > if (bp->phy_dev) > >

Re: [PATCH RFT 2/2] macb: kill PHY reset code

2016-04-12 Thread Nicolas Ferre
Le 12/04/2016 15:40, Andrew Lunn a écrit : > On Tue, Apr 12, 2016 at 11:22:10AM +0200, Nicolas Ferre wrote: >> Le 11/04/2016 04:28, Andrew Lunn a écrit : >>> On Sat, Apr 09, 2016 at 01:25:03AM +0300, Sergei Shtylyov wrote: >>>> With the 'phylib' now be

Re: [PATCH RFT 2/2] macb: kill PHY reset code

2016-04-12 Thread Nicolas Ferre
Le 12/04/2016 15:54, Sergei Shtylyov a écrit : > Hello. > > On 4/12/2016 12:22 PM, Nicolas Ferre wrote: > >>>> With the 'phylib' now being aware of the "reset-gpios" PHY node >>>> property, >>>> there should be no need to f

[PATCH] ARM: dts: at91: VInCo: fix phy reset gpio flag

2016-04-26 Thread Nicolas Ferre
Fix gpio active flag for the phy reset-gpios property. The line is active low instead of active high. Actually, this flags was never used by the macb driver. Reported-by: Sergei Shtylyov Cc: Andrew Lunn Cc: David Miller Signed-off-by: Nicolas Ferre --- Hi, Thanks for having reported this bug

Re: [PATCH] ARM: dts: at91: VInCo: fix phy reset gpio flag

2016-04-27 Thread Nicolas Ferre
e and basically maintaining this DT file, I think that I'll be informed if people try an unlikely arrangement of patches on this board. So either way, I'm okay. But I do think it's not worth thinking too much about this case. Bye, -- Nicolas Ferre

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Nicolas Ferre
if (IS_ERR(phydev)) { > - err = PTR_ERR(phydev); > - break; > - } > - } > - > - if (err) > - goto err_out_unregister_bus; > - } > } else { > if (pdata) > bp->mii_bus->phy_mask = pdata->phy_mask; > -- Nicolas Ferre

Re: [PATCH RFT v2 2/2] macb: kill PHY reset code

2016-04-29 Thread Nicolas Ferre
Le 29/04/2016 00:15, Sergei Shtylyov a écrit : > With the 'phylib' now being aware of the "reset-gpios" PHY node property, > there should be no need to frob the PHY reset in this driver anymore... > > Signed-off-by: Sergei Shtylyov Acked-by: Nicolas Ferre

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-29 Thread Nicolas Ferre
struct macb *bp) > dev_set_drvdata(&bp->dev->dev, bp->mii_bus); > > np = bp->pdev->dev.of_node; > - if (np) { > - /* try dt phy registration */ > - err = of_mdiobus_register(bp->mii_bus, np); > - > - /* fallback to standard phy registration if no phy were > - * found during dt phy registration > - */ > - if (!err && !phy_find_first(bp->mii_bus)) { > - for (i = 0; i < PHY_MAX_ADDR; i++) { > - struct phy_device *phydev; > - > - phydev = mdiobus_scan(bp->mii_bus, i); > - if (IS_ERR(phydev)) { > - err = PTR_ERR(phydev); > - break; > - } > - } > - > - if (err) > - goto err_out_unregister_bus; > - } > - } else { > - if (pdata) > - bp->mii_bus->phy_mask = pdata->phy_mask; > - > - err = mdiobus_register(bp->mii_bus); > - } > + if (np) > + err = macb_mii_of_init(bp, np); > + else > + err = macb_mii_pdata_init(bp, pdata); > > if (err) > goto err_out_free_mdiobus; I'm okay with this. Thanks for having taken the initiative to implement it. Bye, -- Nicolas Ferre

Re: [PATCH] macb: fix mdiobus_scan() error check

2016-05-02 Thread Nicolas Ferre
b: don't return NULL from get_phy_device()") > Signed-off-by: Sergei Shtylyov Acked-by: Nicolas Ferre Thanks. > > --- > The patch is against DaveM's 'net-next.git' repo. > > drivers/net/ethernet/cadence/macb.c |3 ++- > 1 file changed, 2 inse

Re: [PATCH net 1/2] net: cadence: macb: Disable USRIO register on some platforms

2015-12-08 Thread Nicolas Ferre
al configuration of the IP: - from the compatibility string - from the configuration registers. I may be sometimes challenging to figure out where the final property comes from but it has proven to be pretty well adapted to any kind of situation. So let's continue with this and not insert additional properties to this binding. Best regards, -- Nicolas Ferre -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 net-next 2/3] net: ethernet: cadence-macb: Add fallback to read DT provided caps

2015-12-08 Thread Nicolas Ferre
ut: "cdns,the_name_of_the_product_that_first_implemented_this_no_usrio_special_case-gem"? Bye, -- Nicolas Ferre -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] net/macb: add proper header file

2015-12-17 Thread Nicolas Ferre
100644 > --- a/drivers/net/ethernet/cadence/macb.c > +++ b/drivers/net/ethernet/cadence/macb.c > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > #include > #include > #include > -- Nicolas Ferre -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC PATCH 2/2] net: macb: Add gmii2rgmii phy converter support

2016-07-01 Thread Nicolas Ferre
ef _MACB_H > #define _MACB_H > > +#include No, put it in the macb.c. > + > #define MACB_GREGS_NBR 16 > #define MACB_GREGS_VERSION 2 > #define MACB_MAX_QUEUES 8 > @@ -846,6 +848,7 @@ struct macb { > unsigned intjumbo_max_len; > > u32 wol; > + struct gmii2rgmii converter_phy; > }; > > static inline bool macb_is_gem(struct macb *bp) If Florian and phy guys are okay with the approach, I'm fine with this patch, once corrected. Thanks, bye, -- Nicolas Ferre

Re: [RFC PATCH 2/2] net: macb: Add gmii2rgmii phy converter support

2016-07-01 Thread Nicolas Ferre
Le 01/07/2016 11:02, Appana Durga Kedareswara Rao a écrit : > Hi Nicolas Ferre, > > Thanks for the quick review... > >> >> Le 01/07/2016 08:20, Kedareswara rao Appana a écrit : >>> This patch adds support for gmii2rgmii phy converter in the macb >

Re: [RFC PATCH v2 2/4] net: ethernet: xilinx: Add gmii2rgmii converter support

2016-07-04 Thread Nicolas Ferre
struct phy_device *gmii2rgmii_phy_dev; > + void *platform_data; > + int (*mdio_write)(struct mii_bus *bus, int mii_id, int reg, > + u16 val); > + void (*fix_mac_speed)(struct gmii2rgmii *xphy, unsigned int speed); > +}; > + > +extern int gmii2rgmii_phyprobe(struct gmii2rgmii *xphy); > +#endif I see a compilation issue here: You should provide a way to have this function even if the NET_VENDOR_XILINX config option is not selected (test to compile with the sama5_defconfig and you'll see). What about making this function void in case of !XILINX? (so, NACK for the series as it is). Bye, -- Nicolas Ferre

Re: [RFC PATCH v2 2/4] net: ethernet: xilinx: Add gmii2rgmii converter support

2016-07-04 Thread Nicolas Ferre
fig check around phyprobe api in the macb driver. > #ifdef CONFIG_XILINX_GMII2RGMII >gmii2rgmii_phyprobe(&bp->converter_phy); > #endif Nope! > 2) Select NET_VENDOR_XILINX in the macb Kconfig > @ -22,6 +22,7 @@ config MACB > tristate "Cadence MACB/GEM support" > depends on HAS_DMA > select PHYLIB > + select NET_VENDOR_XILINX > Please let me know which one you prefer will fix that and will post v3... First one with my changes is the best. But maybe wait for more feedback... Bye, -- Nicolas Ferre

Re: [PATCH v3 net-next] net: ethernet: cadence-macb: Add disabled usrio caps

2016-01-04 Thread Nicolas Ferre
cadence/macb.h > b/drivers/net/ethernet/cadence/macb.h > index 5c03e81..0d4ecfc 100644 > --- a/drivers/net/ethernet/cadence/macb.h > +++ b/drivers/net/ethernet/cadence/macb.h > @@ -400,6 +400,7 @@ > #define MACB_CAPS_USRIO_HAS_CLKEN0x0002 > #define MACB_CAPS_USRIO_DEFA

Re: [PATCH v4 net-next 2/3] net: macb: Add NPx macb config using USRIO_DISABLED cap

2016-01-04 Thread Nicolas Ferre
at has this configuration and you'll be able to make the NP(x+1) compatible with it. It has proven to be much more future proof and even if in the early days of DT on ARM we accepted some binding with generic strings like this one below, It has proven to be a mistake. > { .co

Re: [PATCH v4 net-next 2/3] net: macb: Add NPx macb config using USRIO_DISABLED cap

2016-01-05 Thread Nicolas Ferre
Le 05/01/2016 13:20, Neil Armstrong a écrit : > On 01/04/2016 11:38 AM, Nicolas Ferre wrote: >> Le 04/01/2016 10:42, Neil Armstrong a écrit : >>> static const struct macb_config zynqmp_config = { >>> .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO, >&

Re: [PATCH v5 net-next 1/3] net: ethernet: cadence-macb: Add disabled usrio caps

2016-01-05 Thread Nicolas Ferre
to the USRIO > register can trigger some Imprecise External Aborts on ARM platforms. > > Signed-off-by: Neil Armstrong Acked-by: Nicolas Ferre Thanks! > --- > drivers/net/ethernet/cadence/macb.c | 27 +++ > drivers/net/ethernet/cadence/macb.h | 1 + >

Re: [PATCH v5 net-next 2/3] net: macb: Add NP4 macb config using USRIO_DISABLED

2016-01-05 Thread Nicolas Ferre
Le 05/01/2016 14:39, Neil Armstrong a écrit : > Declare a new NP4 SoC variant having USRIO_DISABLED as capability bit. > > Signed-off-by: Neil Armstrong Acked-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb.c | 6 ++ > 1 file changed, 6 insertions(+)

Re: [PATCH v5 net-next 3/3] dt-bindings: net: macb: Add NP4 macb variant

2016-01-05 Thread Nicolas Ferre
Le 05/01/2016 14:39, Neil Armstrong a écrit : > Add NP4 macb SoC variant. > > Signed-off-by: Neil Armstrong Acked-by: Nicolas Ferre Neil, thanks for your understanding and reactivity concerning this patch series. Bye, > --- > Documentation/devicetree/bindings/net/macb.txt

Re: [PATCH 2/3] net: macb: fix build warning

2016-01-25 Thread Nicolas Ferre
they are not used uninitialized as clk_init() will initialize > them, this patch will just silence the warning. > > Signed-off-by: Sudip Mukherjee Acked-by: Nicolas Ferre Thanks for your patch. Bye, > --- > drivers/net/ethernet/cadence/macb.c | 2 +- > 1 file changed, 1 inse

Re: [PATCH 7/9] net: macb: avoid uninitialized variables

2016-01-27 Thread Nicolas Ferre
clk *pclk, *hclk, *tx_clk; > ^ > > This shuts up the misleading warnings by ensuring that the > macb_clk_init() always stores something into all three pointers. > > Signed-off-by: Arnd Bergmann Okay Arnd, thanks! Acked-by: Nicolas Ferre > --- > driver

Re: [PATCH 7/9] net: macb: avoid uninitialized variables

2016-01-27 Thread Nicolas Ferre
Le 27/01/2016 16:51, Nicolas Ferre a écrit : > Le 27/01/2016 15:04, Arnd Bergmann a écrit : >> The macb_clk_init function returns three clock pointers, unless >> the it fails to get the first ones. We correctly handle the >> failure case by propagating the error from macb_p

Re: [NET-NEXT PATCH] net: macb: Change capability mask for jumbo support

2015-07-23 Thread Nicolas Ferre
Le 23/07/2015 12:14, Harini Katakam a écrit : > JUMBO and NO_GIGABIT_HALF have the same capability masks. > Change one of them. > > Signed-off-by: Harini Katakam Yes, indeed: Acked-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb.h |2 +- > 1 file chang

Re: [RFC PATCH 0/2] net: macb: Add mdio driver for accessing multiple phy devices

2015-07-27 Thread Nicolas Ferre
>> drivers/net/ethernet/cadence/macb.c | 93 +- >> drivers/net/ethernet/cadence/macb.h |3 +- >> drivers/net/ethernet/cadence/macb_mdio.c | 204 >> ++ >> 4 files changed, 211 insertions(+), 91 deletions(-) >> create mode 100644 drivers/net/ethernet/cadence/macb_mdio.c >> > > > -- Nicolas Ferre -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v1 0/6] net/macb: fix for AVR32 and clean up

2015-07-27 Thread Nicolas Ferre
avid, I would have liked to have more time to go through this series: can you hold on a little bit? Bye, -- Nicolas Ferre -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] net/macb: add config for Atmel sama5d2 SoCs

2015-06-18 Thread Nicolas Ferre
From: Cyrille Pitchen Add the compatible string for Atmel sama5d2 SoC family as the configuration options differ from other instances of the GEM. Signed-off-by: Cyrille Pitchen Signed-off-by: Nicolas Ferre --- drivers/net/ethernet/cadence/macb.c | 8 1 file changed, 8 insertions

Re: [PATCH] net/macb: add config for Atmel sama5d2 SoCs

2015-06-18 Thread Nicolas Ferre
Le 18/06/2015 15:30, Alexandre Belloni a écrit : > On 18/06/2015 at 12:18:19 +0200, Nicolas Ferre wrote : >> From: Cyrille Pitchen >> >> Add the compatible string for Atmel sama5d2 SoC family as the configuration >> options differ from other instances of the GEM. &

[PATCH v2 0/4] net/macb: add sama5d2 support

2015-06-18 Thread Nicolas Ferre
binding documentation Cyrille Pitchen (1): net/macb: add config for Atmel sama5d2 SoCs Nicolas Ferre (3): net/macb: bindings doc: fix compatibility string net/macb: bindings doc/trivial: fix sama5d4 comment net/macb: bindings doc: add sama5d2 compatibility sting Documentation/devicetree

[PATCH v2 1/4] net/macb: bindings doc: fix compatibility string

2015-06-18 Thread Nicolas Ferre
In the driver and the DT bindings we use the "atmel" prefix. Fix it in the binding documentation. Signed-off-by: Nicolas Ferre --- Documentation/devicetree/bindings/net/macb.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bi

[PATCH v2 2/4] net/macb: bindings doc/trivial: fix sama5d4 comment

2015-06-18 Thread Nicolas Ferre
On sama5d4, we only have a GEM IP that is configured to do 10/100 Mbits. So the use of "Gigabit" can be confusing. Signed-off-by: Nicolas Ferre --- Documentation/devicetree/bindings/net/macb.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/

[PATCH v2 4/4] net/macb: add config for Atmel sama5d2 SoCs

2015-06-18 Thread Nicolas Ferre
From: Cyrille Pitchen Add the compatible string for Atmel sama5d2 SoC family as the configuration options differ from other instances of the GEM. Signed-off-by: Cyrille Pitchen Signed-off-by: Nicolas Ferre --- drivers/net/ethernet/cadence/macb.c | 8 1 file changed, 8 insertions

[PATCH v2 3/4] net/macb: bindings doc: add sama5d2 compatibility sting

2015-06-18 Thread Nicolas Ferre
Add sama5d2 to the biding documentation for this use of the GEM IP. Signed-off-by: Nicolas Ferre --- Documentation/devicetree/bindings/net/macb.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net

Re: [PATCH net-next] net: macb: replace literal constant with NET_IP_ALIGN

2015-07-01 Thread Nicolas Ferre
Le 30/06/2015 19:25, Nicolae Rosia a écrit : > > Signed-off-by: Nicolae Rosia Acked-by: Nicolas Ferre Thanks, bye. > --- > drivers/net/ethernet/cadence/macb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/cadence/ma

Re: macb: zynq: why is SG disabled?

2015-07-02 Thread Nicolas Ferre
osia; Michal Simek; Punnaiah Choudary Kalluri; >> netdev@vger.kernel.org; Nicolas Ferre; linux-arm-ker...@lists.infradead.org >> Subject: Re: macb: zynq: why is SG disabled? >> >> Le 01/07/2015 17:14, Nicolae Rosia a écrit : >>> Hello, >>> >>> After reading

Re: [PATCH] net: macb: Add SG support for Zynq SOC family

2015-07-06 Thread Nicolas Ferre
Le 06/07/2015 06:32, Punnaiah Choudary Kalluri a écrit : > Enable SG support for Zynq SOC family devices. > > Signed-off-by: Punnaiah Choudary Kalluri Acked-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb.c |6 ++ > 1 files changed, 2 insertio

Re: [PATCH v2 1/3] net: macb: Document zynq gem dt binding

2015-05-22 Thread Nicolas Ferre
Le 22/05/2015 16:22, Nathan Sullivan a écrit : > Signed-off-by: Nathan Sullivan Acked-by: Nicolas Ferre > --- > Documentation/devicetree/bindings/net/cdns-emac.txt |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree

Re: [PATCH v2 2/3] net: macb: Disable half duplex gigabit on Zynq

2015-05-22 Thread Nicolas Ferre
Le 22/05/2015 16:22, Nathan Sullivan a écrit : > According to the Zynq TRM, gigabit half duplex is not supported. Add a > new cap and compatible string so Zynq can avoid advertising that mode. > > Signed-off-by: Nathan Sullivan Acked-by: Nicolas Ferre > --- > drivers/ne

Re: [PATCH v3 2/2] net: macb: Try to retrieve MAC addess from nvmem provider

2018-03-28 Thread Nicolas Ferre
: Nicolas Ferre --- drivers/net/ethernet/cadence/macb_main.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index e84afcf..eabe14f 100644 --- a/drivers/net/ethernet/cadence

Re: [RFC PATCH 0/2] net: macb: Disable TX checksum offloading on all Zynq

2018-06-04 Thread Nicolas Ferre
eird things with TX CSUM in the code 2/ the hw is unable to handle these particular cases. Best regards, Nicolas ``` Jennifer Dahm (1): net/macb: Disable TX checksum offloading on all Zynq-7000 drivers/net/ethernet/cadence/macb.h | 1 + drivers/net/ethernet/cadence/macb_main.c | 11 --- 2 files changed, 9 insertions(+), 3 deletions(-) -- Nicolas Ferre

Re: [RFC PATCH 2/2] net: macb: Disable TX checksum offloading on all Zynq

2018-06-04 Thread Nicolas Ferre
fig = { - .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_NO_GIGABIT_HALF, + .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_NO_GIGABIT_HALF + | MACB_CAPS_DISABLE_TX_HW_CSUM, .dma_burst_length = 16, .clk_init = macb_clk_init, .init = macb_init, -- Nico

Re: [RFC PATCH 1/2] net: macb: Add CAP to disable hardware TX checksum offloading

2018-06-04 Thread Nicolas Ferre
dev->hw_features |= NETIF_F_RXCSUM; + } if (bp->caps & MACB_CAPS_SG_DISABLED) dev->hw_features &= ~NETIF_F_SG; dev->features = dev->hw_features; -- Nicolas Ferre

Re: [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()

2016-09-12 Thread Nicolas Ferre
; Signed-off-by: Wei Yongjun Yes, Acked-by: Nicolas Ferre Thanks. Best regards, > --- > drivers/net/ethernet/cadence/macb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/cadence/macb.c > b/drivers/net/ethernet/cadence/macb.c

Re: [PATCH] net: phy: Ensure the state machine is called when phy is UP

2016-09-19 Thread Nicolas Ferre
s in NAND flash so, no NFS rootfs for me. >> I've looked at the code and i still don't see how it gets to READY. >> What i do see is that when you connect the phy to the MAC, the >> interrupt handler is installed. So maybe there are some PHY interrupts >> before the interface

Re: [PATCH] net: macb: Increase DMA buffer size

2016-08-24 Thread Nicolas Ferre
acb_dma_desc) * > TX_RING_SIZE) > > /* level of occupied TX descriptors under which we wake up TX process */ > -- Nicolas Ferre

Re: [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()

2016-09-29 Thread Nicolas Ferre
ry I missed that obvious point and for > causing any inconveniences. > > BTW, I see there are obviously quite a few users of MACB > implementations. I'm just curious if anybody else ever encountered the > checksum problem or if this a matter of Zynq implementation only. I've just verified that we are affected by this issue as well on sama5d2 (Microchip / Atmel cortex-A5 MPUs). Thanks for the fix, -- Nicolas Ferre

Re: [PATCH] net: macb: NULL out phydev after removing mdio bus

2016-10-07 Thread Nicolas Ferre
unregister_netdev > will end up calling macb_close. > > Signed-off-by: Xander Huff > Signed-off-by: Nathan Sullivan > Signed-off-by: Brad Mouring Acked-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb.c | 1 + > 1 file changed, 1 insertion(+) > > diff

Re: [PATCH 1/1] net: macb: ensure ordering write to re-enable RX smoothly

2016-11-28 Thread Nicolas Ferre
exactly the same pattern in function at91ether_interrupt() can you fix both locations in your patch please? Thanks, best regards, -- Nicolas Ferre

Re: [PATCH] net: macb: Write only necessary bits in NCR in macb reset

2016-11-28 Thread Nicolas Ferre
> + macb_writel(bp, NCR, ctrl); > > /* Clear all status flags */ > macb_writel(bp, TSR, -1); > -- Nicolas Ferre

Re: [PATCH v2 1/1] net: macb: ensure ordering write to re-enable RX smoothly

2016-11-28 Thread Nicolas Ferre
t; to ensure an flip from 0 to 1 for NCR. > > Signed-off-by: Zumeng Chen Acked-by: Nicolas Ferre Thanks, best regards, > --- > > V2 changes: > > Add the same wmb for at91ether as well based on reviewer's suggestion. > > Cheers, > drivers/net/ethernet/cade

Re: [PATCH v2] net: macb: Write only necessary bits in NCR in macb reset

2016-11-29 Thread Nicolas Ferre
ter to use read-modify-write. > Use the same method for clearing statistics as well. > > Signed-off-by: Harini Katakam Acked-by: Nicolas Ferre > --- > > v2: > Make ctrl type as u32 > Improve commit description > > --- > drivers/net/ethernet/cadence/macb.c |

Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings

2016-12-05 Thread Nicolas Ferre
t; or "cdns,sama5d2-gem-mdio" compatibility string. On the other hand, if it's strictly the same, we can use the "xlnx,zynq-gem-mdio" compatibility without any problem... > I'll take care of the other comments in the next version. > > Regards, > Harini > -- Nicolas Ferre

Re: [RFC PATCH net-next v3 1/2] macb: Add 1588 support in Cadence GEM.

2016-12-08 Thread Nicolas Ferre
e the one that you propose, with the test in it, the branch prediction can play his role without breaking the processor pipeline as the accessors function will be inlined by the compiler: Am I right? So, yes, makes sense. Thanks for the hint. Regards, -- Nicolas Ferre

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-02 Thread Nicolas Ferre
lready as v4 (thanks to your fruitful contributions BTW) for this series and will try to add features for other IP options & revisions incrementally. I suspect that Rafal tend to jump too quickly to the latest IP revisions and add more options to this series: let's not try to pour too much things into this code right now. FYI, Andrei will be back online next week. Regards, -- Nicolas Ferre

Re: Bug in cadence macb driver

2016-10-27 Thread Nicolas Ferre
gt; µWeb: Embedded Web Framework - http://uweb.workware.net.au/ > WorkWare Systems Pty Ltd > W: www.workware.net.au P: +61 434 921 300 > E: ste...@workware.net.au > > > > > > -- Nicolas Ferre

Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM

2016-11-17 Thread Nicolas Ferre
sed on this runtime > check. > For this reason, all the static changes were placed under this check. We have quite a bunch of options in this driver to determinate what is the real capacity of the underlying hardware. If HW configuration registers are not appropriate, and it seems they are not, I would advice to simply use the DT compatibility string. Best regards, -- Nicolas Ferre

Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM

2016-11-18 Thread Nicolas Ferre
Le 18/11/2016 à 09:59, Rafal Ozieblo a écrit : > Hello, > >> From: Harini Katakam [mailto:harinikatakamli...@gmail.com] >> Sent: 18 listopada 2016 05:30 >> To: Rafal Ozieblo >> Cc: Nicolas Ferre; harini.kata...@xilinx.com; netdev@vger.kernel.org; >> linux-k

Re: [RFC PATCH 2/2] net: macb: Add 64 bit addressing support for GEM

2016-11-18 Thread Nicolas Ferre
>> To: Rafal Ozieblo >> Cc: Nicolas Ferre; Andrei Pistirica; harini.kata...@xilinx.com; >> netdev@vger.kernel.org; linux-ker...@vger.kernel.org >>

Re: [PATCH net-next] cadence: Add hardware PTP support.

2016-11-18 Thread Nicolas Ferre
evicetree/bindings/net/macb.txt | 1 + > drivers/net/ethernet/cadence/macb.c| 742 > - > drivers/net/ethernet/cadence/macb.h| 217 +++- > 3 files changed, 950 insertions(+), 10 deletions(-) [..] -- Nicolas Ferre

Re: [PATCH 1/1] net: macb: fix the RX queue reset in macb_rx()

2016-11-25 Thread Nicolas Ferre
> > Without this fix, the rx queue is not reset properly to recover from > queue corruption and connection drop may occur. > > Signed-off-by: Cyrille Pitchen > Fixes: 9ba723b081a2 ("net: macb: remove BUG_ON() and reset the queue to > handle RX errors") Acked-

Re: [RFC PATCH 1/2] net: macb: Correct CAPS mask

2016-08-04 Thread Nicolas Ferre
define MACB_CAPS_GIGABIT_MODE_AVAILABLE 0x2000 > #define MACB_CAPS_SG_DISABLED0x4000 > #define MACB_CAPS_MACB_IS_GEM0x8000 > -#define MACB_CAPS_JUMBO 0x0010 Acked-by: Nicolas Ferre Can you please send

Re: [PATCH] net: macb: Add 64 bit addressing support for GEM

2016-08-09 Thread Nicolas Ferre
0 + ((hw_q) << 2)) > +#define GEM_TBQPH(hw_q) (0x04C8) > #define GEM_RBQP(hw_q) (0x0480 + ((hw_q) << 2)) > #define GEM_IER(hw_q)(0x0600 + ((hw_q) << 2)) > #define GEM_IDR(hw_q)(0x0620 + ((hw_q) << 2)) > @@ -249,6 +252,8 @@ > #define GEM_RXBS_SIZE8 > #define GEM_DDRP_OFFSET 24 /* disc_when_no_ahb */ > #define GEM_DDRP_SIZE1 > +#define GEM_ADDR64_OFFSET30 /* Address bus width - 64b or 32b */ > +#define GEM_ADDR64_SIZE 1 > > > /* Bitfields in NSR */ > @@ -474,6 +479,10 @@ > struct macb_dma_desc { > u32 addr; > u32 ctrl; > +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT > + u32 addrh; > + u32 resvd; > +#endif > }; > > /* DMA descriptor bitfields */ > @@ -777,6 +786,7 @@ struct macb_queue { > unsigned intIDR; > unsigned intIMR; > unsigned intTBQP; > + unsigned intTBQPH; > > unsigned inttx_head, tx_tail; > struct macb_dma_desc*tx_ring; > -- Nicolas Ferre

Re: [RFC PATCH 2/3] net: macb: Add support for 1588 for Zynq Ultrascale+ MPSoC

2016-08-09 Thread Nicolas Ferre
some work done on his side before I recall your email. So, could you please re-send your original 1588 patch with Andrei in copy so that we can all (re-)start the discussion and progress for adding this feature. We must also note that some hardware differences between our platforms may have an impact on the code and how we implement things (as highlighted on this forum: http://www.at91.com/discussions/viewtopic.php/f,12/t,25462.html). Anyway, we'll overcome this and have a widely tested solution at the end of the day! Thanks for your patience, bye! PS: for some reason, I only have this "ping" part of your email but not the original one -- Nicolas Ferre

Re: [PATCHv3] net: ethernet: macb: Add support for rx_clk

2016-08-16 Thread Nicolas Ferre
Le 15/08/2016 à 21:44, Shubhrajyoti Datta a écrit : > Some of the platforms like zynqmp ultrascale+ has a > separate clock gate for the rx clock. Add an optional > rx_clk so that the clock can be enabled. > > Signed-off-by: Shubhrajyoti Datta Fine with me: Acked-by: Nicolas Ferr

Re: [PATCH][-next] net: macb: remove extraneous return when MACB_EXT_DESC is defined

2017-07-05 Thread Nicolas Ferre
ead code") > > Signed-off-by: Colin Ian King Acked-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb_main.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/ethernet/cadence/macb_main.c > b/drivers/net/ethernet/cadence/macb_main.c &g

[PATCH] net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3

2017-07-05 Thread Nicolas Ferre
value greater than 1500, it threw error: sudo ifconfig eth1 mtu 9000 SIOCSIFMTU: Invalid argument Add this support to driver so that it works as expected and designed. Signed-off-by: vishnuvardhan [nicolas.fe...@microchip.com: modify slightly commit msg] Signed-off-by: Nicolas Ferre

Re: [PATCH 1/2] net: macb: reduce scope of rx_fs_lock-protected regions

2017-12-05 Thread Nicolas Ferre
nerated patch fixes the problem, the right > solution is to obviate the problem altogether. > > Thanks, >The Other Julia Julia, Thanks for your patch, it seems good indeed. Here is my: Acked-by: Nicolas Ferre As the patch by Julia L. is already in net-next, I suspect that you would ne

Re: [PATCH 2/2] net: macb: kill useless use of list_empty()

2017-12-05 Thread Nicolas Ferre
ff-by: Julia Cartwright > --- > This is an additional cleanup patch found when looking at this code. > >Julia Acked-by: Nicolas Ferre Thanks > > drivers/net/ethernet/cadence/macb_main.c | 34 > > 1 file changed, 13 insertions(+)

Re: [PATCH v2] net: macb: add fixed-link node support

2017-11-06 Thread Nicolas Ferre
lse { > for (i = 0; i < PHY_MAX_ADDR; i++) > @@ -3438,6 +3457,7 @@ static int macb_remove(struct platform_device *pdev) > clk_disable_unprepare(bp->hclk); > clk_disable_unprepare(bp->pclk); > clk_disable_unprepare(bp->rx_clk); > + of_node_put(bp->phy_node); > free_netdev(dev); > } > > diff --git a/drivers/net/ethernet/cadence/macb.h > b/drivers/net/ethernet/cadence/macb.h > index ec037b0fa2a4d..2510661102bad 100644 > --- a/drivers/net/ethernet/cadence/macb.h > +++ b/drivers/net/ethernet/cadence/macb.h > @@ -930,6 +930,7 @@ struct macb { > struct macb_or_gem_ops macbgem_ops; > > struct mii_bus *mii_bus; > + struct device_node *phy_node; > int link; > int speed; > int duplex; > -- Nicolas Ferre

Re: [PATCH 1/2] net: macb: add of_phy_deregister_fixed_link to error paths

2017-11-06 Thread Nicolas Ferre
On 06/11/2017 at 12:10, Michael Grzeschik wrote: > We add the call of_phy_deregister_fixed_link to all associated > error paths for memory clean up. > > Signed-off-by: Michael Grzeschik Acked-by: Nicolas Ferre Thanks a lot for your quick answer! Best regards, Nicolas > ---

Re: [PATCH 2/2] net: macb: add of_node_put to error paths

2017-11-07 Thread Nicolas Ferre
ect(dev->phydev); > mdiobus_unregister(bp->mii_bus); > + of_node_put(bp->phy_node); Isn't this call already done some lines below, just before "free_netdev(dev);"? > if ((np) && (of_phy_is_fixed_link(np))) > of_phy_deregister_fixed_link(np); > dev->phydev = NULL; > Thanks for your patch. Regards, -- Nicolas Ferre

Re: [PATCH v2] net: macb: add of_node_put to error paths

2017-11-07 Thread Nicolas Ferre
On 07/11/2017 at 10:59, Michael Grzeschik wrote: > We add the call of_node_put(bp->phy_node) to all associated error > paths for memory clean up. > > Signed-off-by: Michael Grzeschik Thanks for your quick update: Acked-by: Nicolas Ferre Best regards, Nicolas > --- &

Re: [PATCH v2 1/2] net: macb: add of_phy_deregister_fixed_link to error paths

2017-11-08 Thread Nicolas Ferre
On 08/11/2017 at 09:56, Michael Grzeschik wrote: > We add the call of_phy_deregister_fixed_link to all associated > error paths for memory clean up. > > Signed-off-by: Michael Grzeschik Acked-by: Nicolas Ferre > --- > v2: removed extra parenthesis > > drivers/net/ethe

Re: [PATCH v2 2/2] net: macb: add of_node_put to error paths

2017-11-08 Thread Nicolas Ferre
On 08/11/2017 at 09:56, Michael Grzeschik wrote: > We add the call of_node_put(bp->phy_node) to all associated error > paths for memory clean up. > > Signed-off-by: Michael Grzeschik Acked-by: Nicolas Ferre > --- > v2: removed extra of_node_put from macb_remove >

Re: [RFC PATCH net-next v4 1/2] macb: Add 1588 support in Cadence GEM.

2017-01-03 Thread Nicolas Ferre
>> On Mon, Jan 2, 2017 at 9:43 PM, Richard Cochran >> wrote: >>> On Mon, Jan 02, 2017 at 03:47:07PM +0100, Nicolas Ferre wrote: >>>> Le 02/01/2017 à 12:31, Richard Cochran a écrit : >>>>> This Cadence IP core is a complete disaster. >>>> >&

Re: [PATCH] net: macb: add fixed-link node support

2017-06-19 Thread Nicolas Ferre
> struct macb_or_gem_ops macbgem_ops; > - Nit: no need to remove the empty line. > + struct device_node *phy_node; > struct mii_bus *mii_bus; > int link; > int speed; > Thanks for your patch. Best regards, -- Nicolas Ferre

Re: [PATCH net-next 05/14] net: macb: Use net_device_stats from struct net_device

2017-04-07 Thread Nicolas Ferre
ch was left as a legacy, use rtnl_link_stats64 instead Is it still permitted to use it? Would it be to directly move to the most up-to-date code? Regards, > Cc: Nicolas Ferre > Signed-off-by: Tobias Klauser > --- > drivers/net/ethernet/c

Re: [PATCH net-next] macb: Common code to enable ptp support for SAMA5Dx platforms.

2017-01-18 Thread Nicolas Ferre
dma_burst_length; > @@ -874,6 +941,8 @@ struct macb { > unsigned intjumbo_max_len; > > u32 wol; > + > + struct macb_ptp_info*ptp_info; /* macb-ptp interface */ > }; > > static inline bool macb_is_gem(struct macb *bp) > @@ -881,4 +950,9 @@ static inline bool macb_is_gem(struct macb *bp) > return !!(bp->caps & MACB_CAPS_MACB_IS_GEM); > } > > +static inline bool gem_has_ptp(struct macb *bp) > +{ > + return !!(bp->caps & MACB_CAPS_GEM_HAS_PTP); > +} > + > #endif /* _MACB_H */ Otherwise, I'm okay with the rest. I suggest to people that will keep the ball rolling on this topic to take advantage of the chunks of code that Andrei developed with the help of Richard and the best practices discussed. I think particularly, if it makes sense with HW, about: - gem_ptp_do_[rt]xstamp(bp, skb) dereference scheme - gem_ptp_adjfine() rationale - gem_get_ptp_peer() if needed Regards, -- Nicolas Ferre

Re: [PATCH net-next v2] macb: Common code to enable ptp support for MACB/GEM

2017-01-19 Thread Nicolas Ferre
Le 19/01/2017 à 08:56, Andrei Pistirica a écrit : > This patch does the following: > - MACB/GEM-PTP interface > - registers and bitfields for TSU > - capability flags to enable PTP per platform basis > > Signed-off-by: Andrei Pistirica Acked-by: Nicolas Ferre Thanks, regar

Re: [PATCH net-next v2] macb: Common code to enable ptp support for MACB/GEM

2017-01-25 Thread Nicolas Ferre
Le 19/01/2017 à 17:07, Nicolas Ferre a écrit : > Le 19/01/2017 à 08:56, Andrei Pistirica a écrit : >> This patch does the following: >> - MACB/GEM-PTP interface >> - registers and bitfields for TSU >> - capability flags to enable PTP per platform basis >> &

Re: [PATCH net-next v2] macb: Common code to enable ptp support for MACB/GEM

2017-01-27 Thread Nicolas Ferre
and whether the PTP support was adequate. > I think the capability approach gives better control and > it is not really much to add. Yes, absolutely. In fact we already had this discussion and decided that this capability scheme was giving much more control at low cost. Regards, -- Nicolas Ferre

Re: [PATCH net-next v2] macb: Common code to enable ptp support for MACB/GEM

2017-01-27 Thread Nicolas Ferre
tive of the SoC capability >> and whether the PTP support was adequate. >> I think the capability approach gives better control and >> it is not really much to add. >> >> Regards, >> Harini >> > Yes, I'm referring to TSU bit. > What if SoC contains multiple Cadence GEMs, some with PTP support and others > without? Simply define different DT compatibility strings and we're good. > Relevant will be checking both, hardware capabilities and SoC capabilities > from "caps" field. > -- Nicolas Ferre

Re: [PATCH 4.10-rc3 03/13] net: macb: fix build errors when linux/phy*.h is removed from net/dsa.h

2017-02-01 Thread Nicolas Ferre
et/cadence/macb.h:862:2: error: unknown type name > 'phy_interface_t' > phy_interface_t phy_interface; > ^~~ > > Add linux/phy.h to macb.h > > Signed-off-by: Russell King Acked-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb.h

Re: [PATCH] net: macb: fix phy interrupt parsing

2017-04-27 Thread Nicolas Ferre
: macb: Added PCI wrapper for Platform Driver.") Means 4.10+ > Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre Seems a good candidate for net stable. Bye, > --- > drivers/net/ethernet/cadence/macb.c | 18 ++ > 1 file changed, 10 insertions(+), 8

  1   2   >