[PATCH net-next 1/4] net: dsa: mv88e6xxx: Group cmode ops together

2018-11-10 Thread Andrew Lunn
Move .port_set_cmode next to .port_get_cmode. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index e05d4eddc935..13c6d76d9150 100644

[PATCH net-next 3/4] net: dsa: mv88e6xxx: Default ports 9/10 6390X CMODE to 1000BaseX

2018-11-10 Thread Andrew Lunn
. They can steal them back if they need them. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/port.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index e718404a5e03..ebd26b6a93e6 100644

[PATCH net-next 2/4] net: dsa: mv88e6xxx: Differentiate between 6390 and 6390X cmodes

2018-11-10 Thread Andrew Lunn
The X family variants support additional ports modes, for 10G operation, which the non-X variants don't have. Add a port_set_cmode() for non-X variants to enforce this. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 7 +-- drivers/net/dsa/mv88e6xxx/port.c | 15

[PATCH net-next 5/5] net: phy: Add support for resolving 5G and 2.5G autoneg

2018-11-10 Thread Andrew Lunn
Now that 2.5G and 5G can be represented in phydev->advertising and phydev->lp_advertising, add these two links modes as possible resolutions to auto negotiation. Signed-off-by: Andrew Lunn --- drivers/net/phy/phy-core.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/n

[PATCH net-next 4/5] net: phy: Add more link modes to the settings table

2018-11-10 Thread Andrew Lunn
Now that PHYs and MAC can support more than 32 bit masks, add link modes which are > 31 to the PHY settings table. Signed-off-by: Andrew Lunn --- drivers/net/phy/phy-core.c | 162 - 1 file changed, 158 insertions(+), 4 deletions(-) diff --git a/drivers/

[PATCH net-next 3/5] net: phy: Fixup kerneldoc markup.

2018-11-10 Thread Andrew Lunn
Add missing markup for function parameters Signed-off-by: Andrew Lunn --- include/linux/mii.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mii.h b/include/linux/mii.h index e7112e878bb0..fb7ae4ae8ce3 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h

[PATCH net-next 1/5] net: ethernet: Convert phydev advertize and supported from u32 to link mode

2018-11-10 Thread Andrew Lunn
rt all the currently devices link modes, and is future proof as more modes are added. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mt7530.c | 3 +- drivers/net/ethernet/aeroflex/greth.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 41 ++-- drivers/net/et

[PATCH net-next 0/5] net: phy: convert advertise and supported to linkmode

2018-11-10 Thread Andrew Lunn
r some architectures i did not test. I will fixup the breakage as fast as i can. Andrew Lunn (5): net: ethernet: Convert phydev advertize and supported from u32 to link mode net: phy: Convert u32 phydev->lp_advertising to linkmode net: phy: Fixup kerneldoc markup. net: phy: Add more l

[PATCH net-next 2/5] net: phy: Convert u32 phydev->lp_advertising to linkmode

2018-11-10 Thread Andrew Lunn
Convert phy drivers to report the link partner advertised modes using a linkmode bitmap. This allows them to report the higher speeds which don't fit in a u32. Signed-off-by: Andrew Lunn --- drivers/net/phy/lxt.c| 4 ++-- drivers/net/phy/marvell.c| 26

Re: [PATCH net-next v2 1/2] dpaa2-eth: defer probe on object allocate

2018-11-09 Thread Andrew Lunn
> --- > Changes in v2: > - proper handling of IS_ERR_OR_NULL Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 net-next] net: phy: improve struct phy_device member interrupts handling

2018-11-09 Thread Andrew Lunn
code dealing with this member in a way that it's clear we're > dealing with a bool value. > > Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net-next 1/2] dpaa2-eth: defer probe on object allocate

2018-11-09 Thread Andrew Lunn
Hi Ioana > I will send a v2 changing the return value to -ENODEV in case no > cpus with an affine DPIO is found. It would be good to review all the cases where IS_ERR_OR_NULL() is used. It is very easy to get wrong. In fact, it has been suggested this macro is removed, because it is used wrongly

Should the bridge learn from frames with link local destination MAC address?

2018-11-08 Thread Andrew Lunn
Hi Roopa, Nikolay br_handle_frame() looks out for frames with a destination MAC addresses with is Ethernet link local, those which fit 01-80-C2-00-00-XX. It does not normally forward these, but it will deliver them locally. Should the bridge perform learning on such frames? I've got a setup

Re: [RFC PATCH 0/3] acpi: Add acpi mdio support code

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 03:21:29PM +0800, Wang Dongsheng wrote: > Originally I just push "phy-handle" support for ACPI on the QCOM QDF2400 > platform. After some discussion and following Andrew's advice, I send > out with a generic version of ACPI. > > Current there is no clear documentation

Re: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 03:00:01PM -0800, Florian Fainelli wrote: > On 11/8/18 2:58 PM, David Miller wrote: > > From: Heiner Kallweit > > Date: Wed, 7 Nov 2018 20:41:52 +0100 > > > >> This patch series is based on two axioms: > >> > >> - During autoneg a PHY always reports the link being down >

Re: [PATCH net-next 0/2] net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 10:54:50PM +0100, Heiner Kallweit wrote: > Flag PHY_HAS_INTERRUPT is used only here for this small check. I think > using interrupts isn't possible if a driver defines neither > config_intr nor ack_interrupts callback. So we can replace checking > flag PHY_HAS_INTERRUPT

Re: [PATCH net-next] net: phy: improve struct phy_device member interrupts handling

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 10:36:33PM +0100, Heiner Kallweit wrote: > As a heritage from the very early days of phylib member interrupts is > defined as u32 even though it's just a flag whether interrupts are > enabled. So we can change it to a bitfield member. In addition change > the code dealing

Re: [PATCH net-next 1/2] net: phy: use phy_id_mask value zero for exact match

2018-11-08 Thread Andrew Lunn
> > Maybe we can find a clever way with a macro to specify only the PHY OUI > > and compute a suitable mask automatically? > > > I don't think so. For Realtek each driver is specific even to a model > revision (therefore mask 0x). Same applies to intel-xway. > In broadcom.c we have masks

Re: [PATCH net-next 2/2] net: phy: realtek: remove boilerplate code from driver configs

2018-11-08 Thread Andrew Lunn
> { > .phy_id = 0x8201, > .name = "RTL8201CP Ethernet", > - .phy_id_mask= 0x, > .features = PHY_BASIC_FEATURES, > .flags = PHY_HAS_INTERRUPT, > }, { >

Re: [PATCH net-next 1/2] net: phy: use phy_id_mask value zero for exact match

2018-11-08 Thread Andrew Lunn
On Wed, Nov 07, 2018 at 09:53:32PM +0100, Heiner Kallweit wrote: > @@ -500,7 +500,7 @@ struct phy_driver { > struct mdio_driver_common mdiodrv; > u32 phy_id; > char *name; > - u32 phy_id_mask; > + u32 phy_id_mask; /* value 0 means exact match */ Hi Heiner Please make

Re: [PATCH net-next 1/2] dpaa2-eth: defer probe on object allocate

2018-11-08 Thread Andrew Lunn
On Thu, Nov 08, 2018 at 01:17:47PM +, Ioana Ciornei wrote: > The fsl_mc_object_allocate function can fail because not all allocatable > objects are probed by the fsl_mc_allocator at the call time. Defer the > dpaa2-eth probe when this happens. > > Signed-off-by: Ioana Ciornei > --- >

Re: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine

2018-11-07 Thread Andrew Lunn
On Wed, Nov 07, 2018 at 09:05:49PM +0100, Heiner Kallweit wrote: > On 07.11.2018 20:48, Andrew Lunn wrote: > > On Wed, Nov 07, 2018 at 08:41:52PM +0100, Heiner Kallweit wrote: > >> This patch series is based on two axioms: > >> > >> - During autoneg a PH

Re: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine

2018-11-07 Thread Andrew Lunn
On Wed, Nov 07, 2018 at 08:41:52PM +0100, Heiner Kallweit wrote: > This patch series is based on two axioms: > > - During autoneg a PHY always reports the link being down Hi Heiner I think that is a risky assumption to make. What happens if this assumption is incorrect? Andrew

Re: [PATCH net-next] net: phy: bcm7xxx: Add entry for BCM7255

2018-11-07 Thread Andrew Lunn
On Tue, Nov 06, 2018 at 04:37:44PM -0800, Florian Fainelli wrote: > From: Justin Chen > > Add support for BCM7255 EPHY. > > Signed-off-by: Justin Chen > Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Andrew

Re: [PATCH RFC net-next 0/3] net: phy: sfp: Warn when using generic PHY driver

2018-11-06 Thread Andrew Lunn
> Another approach could be to maintain a list of modules that do not work > with the generic PHY driver and therefore require a specialized driver, > in that case we could even go as far as not letting sfp_sm_probe_phy() > return success. Not sure how well things would scale, probably not too >

Re: [PATCH] net: phy: realtek: fix RTL8201F sysfs name

2018-11-04 Thread Andrew Lunn
On Sun, Nov 04, 2018 at 07:02:42PM +0100, Holger Hoffstätte wrote: > Since 4.19 the following error in sysfs has appeared when using the > r8169 NIC driver: > > $cd /sys/module/realtek/drivers > $ls -l > ls: cannot access 'mdio_bus:RTL8201F 10/100Mbps Ethernet': No such file or > directory >

Re: [PATCH] net: phy: realtek: fix RTL8201F sysfs name

2018-11-04 Thread Andrew Lunn
ns"). > > Fix this by removing the offending slash in the driver name. > > Other drivers in net/phy seem to have the same problem, but I cannot > test/verify them. > > Signed-off-by: Holger Hoffstätte Fixes:513588dd44b ("net: phy: realtek: add RTL8201F phy-id and functions"). Reviewed-by: Andrew Lunn David, please apply to net. Andrew

Re: [PATCH v1 net] net: dsa: microchip: initialize mutex before use

2018-11-01 Thread Andrew Lunn
KSZ9477") > Signed-off-by: Tristram Ha Reviewed-by: Andrew Lunn Andrew

Re: [PATCH net] net: dsa: microchip: initialize mutex before use

2018-10-30 Thread Andrew Lunn
On Tue, Oct 30, 2018 at 04:45:49PM -0700, tristram...@microchip.com wrote: > From: Tristram Ha > > Initialize mutex before use. Avoid kernel complaint when > CONFIG_DEBUG_LOCK_ALLOC is enabled. > > Fixes: b987e98e50ab90e5 ("dsa: add DSA switch driver for Microchip KSZ9477") > Signed-off-by:

Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-29 Thread Andrew Lunn
On Mon, Oct 29, 2018 at 02:39:36AM +, Wang, Dongsheng wrote: > On 2018/10/26 21:12, Andrew Lunn wrote: > > On Fri, Oct 26, 2018 at 03:04:25AM +, Wang, Dongsheng wrote: > >> On 2018/10/26 10:37, Timur Tabi wrote: > >>> On 10/25/18 9:18 PM, Wang, Dong

Re: checksumming on non-local forward path

2018-10-27 Thread Andrew Lunn
> What would you think of a flag on the receiving end like, > "CHECKSUM_INVALID_BUT_UNNECESSARY"? It would be treated as > CHECKSUM_UNNECESSARY in the case that the the packet is locally > received. But if the packet is going to be forwarded instead, then > skb_checksum_help is called on it before

Re: [PATCH v2 00/17] octeontx2-af: NPC parser and NIX blocks initialization

2018-10-26 Thread Andrew Lunn
> No there is no need for any userspace tools. Cool. The problem with the Freescale architecture is that you seem to need to provision the hardware. Tell it how many instances of various things to create, and how to logically connect them together. They have a user space tool to do this, in an

Re: [PATCH v2 00/17] octeontx2-af: NPC parser and NIX blocks initialization

2018-10-26 Thread Andrew Lunn
> I fear that setting a precedent of using the mbox for user-level > configuration management would mean that we would have to > treat each of these interfaces as an ABI, which in turn requires > much deeper review as well as raising the fundamental question > on how this should be done across

Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-26 Thread Andrew Lunn
On Fri, Oct 26, 2018 at 03:04:25AM +, Wang, Dongsheng wrote: > On 2018/10/26 10:37, Timur Tabi wrote: > > On 10/25/18 9:18 PM, Wang, Dongsheng wrote: > >> But when I was reading Documentation/acpi/DSD-properties-rules.txt, my > >> understanding is we should try to conform to DT bindings. So

Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-25 Thread Andrew Lunn
On Thu, Oct 25, 2018 at 06:09:15PM +0800, Wang Dongsheng wrote: > Use "phy-handle" to porint an internal MDIO device port. Hi Dongsheng You are basically defining how all future ACPI based MAC drivers get access to their PHY. This needs to become part of the ACPI standard, etc. This code should

[PATCH net] net: phy: genphy_10g_driver: Avoid NULL pointer dereference

2018-10-25 Thread Andrew Lunn
_mode bitmap") Reported-by: Jose Abreu Signed-off-by: Andrew Lunn --- drivers/net/phy/phy-c45.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index e1225545362d..d7636ff03bc7 100644 --- a/drivers/net/phy/phy-c45.c +++

Re: Regression in 4.19 net/phy/realtek: garbled sysfs output

2018-10-24 Thread Andrew Lunn
On Wed, Oct 24, 2018 at 09:36:02PM +0200, Holger Hoffstätte wrote: > Hi, > > Since 4.19 r8169 depends on phylib: > > $lsmod | grep r8169 > r8169 81920 0 > libphy 57344 2 r8169,realtek > > Unfortunately this now gives me the following sysfs error: > > $cd

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-24 Thread Andrew Lunn
> Since 719655a14971 ("net: phy: Replace phy driver features u32 > with link_mode bitmap"), phy_probe() calls > ethtool_convert_link_mode_to_legacy_u32() with phydrv->features > as argument. Since features are NULL, we will get NULL pointer > dereference. Hi Jose Thanks for pointing that out. I

Re: [PATCH v3 net-next 03/11] net: dsa: microchip: Initialize mutex before use

2018-10-23 Thread Andrew Lunn
On Mon, Oct 22, 2018 at 07:26:07PM -0700, tristram...@microchip.com wrote: > From: Tristram Ha > > Initialize mutex before use. Hi Tristram This seems like a fix for the driver, not simple refactoring. Please could you rebase this on net, add a fixes: tag, and send it to netdev for merging.

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-23 Thread Andrew Lunn
> If it's okay for Generic 10G driver I can submit only this and > manually reset PHY in stmmac driver so that I don't need to > implement custom PHY driver ... Hi Jose That is a bad idea. What happens when somebody uses a different PHY which uses a different reset sequence? Please keep with the

Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks

2018-10-22 Thread Andrew Lunn
> EXPORT_SYMBOL_GPL(gen10g_resume); > @@ -327,7 +381,7 @@ struct phy_driver genphy_10g_driver = { > .phy_id = 0x, > .phy_id_mask= 0x, > .name = "Generic 10G PHY", > - .soft_reset = gen10g_no_soft_reset, > + .soft_reset =

Re: [PATCH net-next 2/4] net: phy-c45: Populate autoneg_done callback

2018-10-22 Thread Andrew Lunn
On Mon, Oct 22, 2018 at 11:32:47AM +0100, Jose Abreu wrote: > We already have this callback implemented. Use it in driver structure. > > Signed-off-by: Jose Abreu > Cc: Andrew Lunn > Cc: Florian Fainelli > Cc: "David S. Miller" > Cc: Joao Pinto > --- >

[PATCH] net: ethernet:fec: Consistently use SPEED_ prefix

2018-10-20 Thread Andrew Lunn
All other calls to phy_set_max_speed() use the SPEED_ prefix. Make the FEC driver follow this common pattern. This makes no different to generated code since SPEED_1000 is 1000, and SPEED_100 is 100. Reported-by: Corentin Labbe Signed-off-by: Andrew Lunn --- drivers/net/ethernet/freescale

[PATCH net-next] net: phy: phy_support_sym_pause: Clear Asym Pause

2018-10-20 Thread Andrew Lunn
When indicating the MAC supports Symmetric Pause, clear the Asymmetric Pause bit, which could of been already set is the PHY supports it. Reported-by: Labbe Corentin Fixes: c306ad36184f ("net: ethernet: Add helper for MACs which support pause") Signed-off-by: Andrew Lunn --- drive

Re: [PATCH net-next 2/9] net/ipv4: Plumb support for filtering route dumps

2018-10-11 Thread Andrew Lunn
On Thu, Oct 11, 2018 at 10:44:04AM -0600, David Ahern wrote: > On 10/11/18 9:56 AM, Andrew Lunn wrote: > >> @@ -866,10 +866,13 @@ static int inet_dump_fib(struct sk_buff *skb, struct > >> netlink_callback *cb) > >>hlist_for_eac

Re: [PATCH net-next 2/9] net/ipv4: Plumb support for filtering route dumps

2018-10-11 Thread Andrew Lunn
> @@ -866,10 +866,13 @@ static int inet_dump_fib(struct sk_buff *skb, struct > netlink_callback *cb) > hlist_for_each_entry_rcu(tb, head, tb_hlist) { > if (e < s_e) > goto next; > + if (filter.table_id &&

Re: [PATCH] net: phy: sfp: remove sfp_mutex's definition

2018-10-11 Thread Andrew Lunn
On Thu, Oct 11, 2018 at 05:06:21PM +0200, Sebastian Andrzej Siewior wrote: > The sfp_mutex variable is defined but never used in this file. Not even > in the commit that introduced that variable. > > Remove sfp_mutex, it has no purpose. Reviewed-by: Andrew Lunn Andrew

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-08 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 07:04:39PM -0700, Richard Cochran wrote: > On Sun, Oct 07, 2018 at 09:54:00PM +0200, Andrew Lunn wrote: > > Sure, but things have moved on since then. > > I was curious about this. Based on your uses cases, I guess that you > mean phylib? But not much

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-07 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 02:07:28PM -0700, Richard Cochran wrote: > On Sun, Oct 07, 2018 at 01:59:06PM -0700, Richard Cochran wrote: > > On Sun, Oct 07, 2018 at 09:54:00PM +0200, Andrew Lunn wrote: > > > 1) phylink, not phdev. We have been pushing some MAC drivers towards > &g

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-07 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 01:59:06PM -0700, Richard Cochran wrote: > On Sun, Oct 07, 2018 at 09:54:00PM +0200, Andrew Lunn wrote: > > Sure, but things have moved on since then. > > If you have a specific suggestion on how to better implement this, > please tell us what it is. &g

Re: [PATCH V2 net-next 4/5] net: mdio: of: Register discovered MII time stampers.

2018-10-07 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 12:26:27PM -0700, Richard Cochran wrote: > On Sun, Oct 07, 2018 at 08:17:54PM +0200, Andrew Lunn wrote: > > > > + if (err == -ENOENT) > > > > + return NULL; > > > > + else if (err) >

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-07 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 12:15:51PM -0700, Richard Cochran wrote: > On Sun, Oct 07, 2018 at 08:27:51PM +0200, Andrew Lunn wrote: > > The mii_timestamper is generic, in the same why hwmon is generic. It > > does not matter where the time stamper is. So i'm wondering if we &g

Re: [PATCH V2 net-next 2/5] net: Introduce a new MII time stamping interface.

2018-10-07 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 10:38:20AM -0700, Richard Cochran wrote: > Currently the stack supports time stamping in PHY devices. However, > there are newer, non-PHY devices that can snoop an MII bus and provide > time stamps. In order to support such devices, this patch introduces > a new interface

Re: [PATCH V2 net-next 4/5] net: mdio: of: Register discovered MII time stampers.

2018-10-07 Thread Andrew Lunn
On Sun, Oct 07, 2018 at 10:38:22AM -0700, Richard Cochran wrote: > When parsing a PHY node, register its time stamper, if any, and attach > the instance to the PHY device. Hi Richard This does look a lot better. Thanks for making the changes. Andrew

Re: [PATCH V2 net-next 4/5] net: mdio: of: Register discovered MII time stampers.

2018-10-07 Thread Andrew Lunn
> > + if (err == -ENOENT) > > + return NULL; > > + else if (err) > > + return ERR_PTR(err); > > + > > + if (args.args_count >= 1) > > + port = args.args[0]; > > If it's greater than one, than it is an error, and it should be flagged > as such. > > The idea

Re: [PATCH net-next] net: dsa: mc88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed

2018-10-06 Thread Andrew Lunn
On Sat, Oct 06, 2018 at 02:38:10AM +0200, Marek Behun wrote: > > Hi Marek > > > > I'm confused. > > > > The alt bit is used for configuring 2500. You say 2500 is only > > supported on port 5. But !port is only true for port 0? > > > > Andrew > > On Topaz alt_bit is used only for port 0

Re: [PATCH net-next] net: dsa: mc88e6xxx: Fix 88E6141/6341 2500mbps SERDES speed

2018-10-05 Thread Andrew Lunn
On Fri, Oct 05, 2018 at 04:42:27PM +0200, Marek Behún wrote: > The port_set_speed method for the Topaz family must not be the same > as for Peridot family, since on Topaz port 5 is the SERDES port and it > can be set to 2500mbps speed mode. > > This patch adds a new method for the Topaz family,

Re: [PATCH 2/2] netdev/phy: add MDIO bus multiplexer driven by a regmap

2018-10-05 Thread Andrew Lunn
> > > + ret = regmap_update_bits_check(s->regmap, > > > +s->mux_reg, > > > +s->mask, > > > +desired_child, > > > +); > > > > When getting the mask from DT, you use

Re: [PATCH ethtool v2] ethtool: Fix uninitialized variable use at qsfp dump

2018-10-02 Thread Andrew Lunn
ing initialized at > sff8472_parse_eeprom function, to avoid the same issue here. > > Fixes: a5e73bb05ee4 ("ethtool:QSFP Plus/QSFP28 Diagnostics Information > Support") > Signed-off-by: Eran Ben Elisha Hi Eran Thanks for fixing both cases. Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v2 net-next 7/8] net: ethernet: xgbe: expand PHY_GBIT_FEAUTRES

2018-10-01 Thread Andrew Lunn
On Sun, Sep 30, 2018 at 11:41:00AM +0300, Sergei Shtylyov wrote: > Hello! > > On 9/30/2018 12:04 AM, Andrew Lunn wrote: > > >The macro PHY_GBIT_FEAUTRES needs to change into a bitmap in order to > >support link_modes. Remove its use from xgde by replacing i

[PATCH v2 net-next 4/8] net: phy: Add helper to convert MII ADV register to a linkmode

2018-09-29 Thread Andrew Lunn
The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE register in the PHY. Since this changes the state of the PHY, we need to make the same change to phydev->advertising. Add a helper which can convert the register value to a linkmode. Signed-off-by: Andrew Lunn Revie

[PATCH v2 net-next 5/8] net: phy: Add helper for advertise to lcl value

2018-09-29 Thread Andrew Lunn
Add a helper to convert the local advertising to an LCL capabilities, which is then used to resolve pause flow control settings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Maxime Chevallier --- drivers/net/dsa/mt7530.c | 6 +- drivers/net

[PATCH v2 net-next 6/8] net: phy: Add limkmode equivalents to some of the MII ethtool helpers

2018-09-29 Thread Andrew Lunn
Add helpers which take a linkmode rather than a u32 ethtool for advertising settings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Maxime Chevallier --- include/linux/mii.h | 50 + 1 file changed, 50 insertions(+) diff

[PATCH v2 net-next 3/8] net: phy: Add phydev_info()

2018-09-29 Thread Andrew Lunn
Add phydev_info() and make use of it within the phy drivers and core code. Signed-off-by: Andrew Lunn --- drivers/net/phy/dp83640.c| 11 ++- drivers/net/phy/phy_device.c | 4 ++-- include/linux/phy.h | 3 +++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git

[PATCH v2 net-next 8/8] net: phy: Replace phy driver features u32 with link_mode bitmap

2018-09-29 Thread Andrew Lunn
-by: Andrew Lunn --- drivers/net/ethernet/marvell/pxa168_eth.c | 4 +- drivers/net/phy/aquantia.c| 12 +- drivers/net/phy/bcm63xx.c | 9 +- drivers/net/phy/marvell.c | 2 +- drivers/net/phy/marvell10g.c | 11 +- drivers/net/phy

[PATCH v2 net-next 7/8] net: ethernet: xgbe: expand PHY_GBIT_FEAUTRES

2018-09-29 Thread Andrew Lunn
The macro PHY_GBIT_FEAUTRES needs to change into a bitmap in order to support link_modes. Remove its use from xgde by replacing it with its definition. Probably, the current behavior is wrong. It probably should be ANDing not assigning. Signed-off-by: Andrew Lunn --- v2 Remove unneeded

[PATCH v2 net-next 1/8] net: phy: Move linkmode helpers to somewhere public

2018-09-29 Thread Andrew Lunn
phylink has some useful helpers to working with linkmode bitmaps. Move them to there own header so other code can use them. Signed-off-by: Andrew Lunn Acked-by: Florian Fainelli Reviewed-by: Maxime Chevallier --- v2: It was suggested to make include/linux/ethernet-phy and move some

[PATCH v2 net-next 2/8] net: phy: Add phydev_warn()

2018-09-29 Thread Andrew Lunn
Not all new style LINK_MODE bits can be converted into old style SUPPORTED bits. We need to warn when such a conversion is attempted. Add a helper for this. Convert all pr_warn() calls to phydev_warn() where possible. Signed-off-by: Andrew Lunn Reviewed-by: Maxime Chevallier --- v2: Make use

[PATCH v2 net-next 0/8] Continue towards using linkmode in phylib

2018-09-29 Thread Andrew Lunn
These patches contain some further cleanup and helpers, and the first real patch towards using linkmode bitmaps in phylink. The macro magic in the RFC version has been replaced with run time initialisation. Andrew Lunn (8): net: phy: Move linkmode helpers to somewhere public net: phy: Add

[PATCH net-next] MAINTAINERS: Fix wrong include file path

2018-09-29 Thread Andrew Lunn
Fix the patch for the mv88e6xxx.h header file in MAINTAINERS Reported-by: Joe Perches Signed-off-by: Andrew Lunn --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 15565de091af..12d1da4a9653 100644 --- a/MAINTAINERS +++ b

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-28 Thread Andrew Lunn
> I see where you're coming from, but if people start needing to manually >  configure FEC on their consumer devices, possibly we have bigger >  problems. Yes, i agree with that. For the consumer market, SFPs needs to grow up and start doing full and reliable auto-neg, just like copper Ethernet.

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-28 Thread Andrew Lunn
> For us, those semantics make sense (our HW has a notion of 'supported' >  and 'requested' bits for each FEC type for each of local-device, cable >  and link-partner, and uses the strongest FEC mode that's supported by >  everyone and requested by anyone); but if something else is a better fit >  

Re: [PATCH v2 net-next 2/2] dt-bindings: net: add support for Microchip KSZ9131 Ethernet PHY

2018-09-27 Thread Andrew Lunn
On Thu, Sep 27, 2018 at 04:16:55PM -0400, Yuiko Oshino wrote: > Add support for Microchip Technology KSZ9131 10/100/1000 Ethernet PHY > > Signed-off-by: Yuiko Oshino > --- > .../devicetree/bindings/net/micrel-ksz90x1.txt | 29 > +- > 1 file changed, 28 insertions(+), 1

Re: bug: 'ethtool -m' reports spurious alarm & warning threshold values for QSFP28 transceivers

2018-09-27 Thread Andrew Lunn
On Thu, Sep 27, 2018 at 04:08:24PM +, Chris Preimesberger wrote: > Please correct me if I'm wrong, but... > It looks like Eran's proposed fix would remove all warning and > alarm indications from ethtool's output. It's worth mentioning > that for me, the following fields always reported

Re: [PATCH ethtool] ethtool: Fix uninitialized variable use at qsfp dump

2018-09-27 Thread Andrew Lunn
On Thu, Sep 27, 2018 at 04:48:35PM +0300, Eran Ben Elisha wrote: > Struct sff_diags can be used uninitialized at sff8636_show_dom, this > caused the tool to show unreported fields (supports_alarms) by the lower > level driver. > > Fixes: a5e73bb05ee4 ("ethtool:QSFP Plus/QSFP28 Diagnostics

Re: bug: 'ethtool -m' reports spurious alarm & warning threshold values for QSFP28 transceivers

2018-09-27 Thread Andrew Lunn
> Driver return 256 bytes (reading it correctly, I verified it, no overruns), > however the extra bytes are presented due to this bug (expecting to parse > 640 bytes). > > Do you see another bug here? Am I missing something? Hi Erin Please could you try ethtool -m raw on so you get a binary

Re: bug: 'ethtool -m' reports spurious alarm & warning threshold values for QSFP28 transceivers

2018-09-27 Thread Andrew Lunn
> Both drivers read up to 256 bytes. 0-127 (from page 0). and 128-256 (from > page 0). Driver is not capable of reading over 256 bytes currently. Hi Erin There should not be any need to read more than 256 bytes. For older SFP devices, two addresses on the i2c bus are used, each with 256 bytes.

Re: [PATCH 1/2] net: dpaa2: move DPAA2 PTP driver out of staging/

2018-09-27 Thread Andrew Lunn
On Thu, Sep 27, 2018 at 07:12:27PM +0800, Yangbo Lu wrote: > This patch is to move DPAA2 PTP driver out of staging/ > since the dpaa2-eth had been moved out. > > Signed-off-by: Yangbo Lu > --- > drivers/net/ethernet/freescale/Kconfig |9 + >

Re: bug: 'ethtool -m' reports spurious alarm & warning threshold values for QSFP28 transceivers

2018-09-26 Thread Andrew Lunn
> When you run ethtool -m on this driver, the kernel calls > mlx4_en_get_module_info > to determine the length of the eeprom, and that value will be either 256 or > 512 > bytes. So it sounds like QSFP modules using 8636 are not supported. You would expect a size to be one of 256, 384, 512 or

Re: bug: 'ethtool -m' reports spurious alarm & warning threshold values for QSFP28 transceivers

2018-09-26 Thread Andrew Lunn
On Wed, Sep 26, 2018 at 08:47:34PM +, Chris Preimesberger wrote: > Hello Andrew, > > Thank you for the quick response!! > Apologies in advance for my use of outlook and top-posting, etc... > > I've run the raw option and the hex option, and pasted the results below. > Since the raw option

Re: bug: 'ethtool -m' reports spurious alarm & warning threshold values for QSFP28 transceivers

2018-09-26 Thread Andrew Lunn
On Wed, Sep 26, 2018 at 07:29:23PM +, Chris Preimesberger wrote: > Hello, > > I'm re-sending in plain text per the auto-reply from a spam filter. Yep. no html obfustication accepted here. Please ASCII only please :-) Please can you also wrap your lines at about 75 characters. > I have

Re: Marvell phy errata origins?

2018-09-25 Thread Andrew Lunn
> I hope this this thread isn't too old to bring back to life. So it seems > that Harini found that m88e did not need this errata, and Cisco > previously found that Harini's patch fixed m88e1112, we included it > internally for that reason > > Now I'm getting reports that this errata fixes

Re: Marvell phy errata origins?

2018-09-25 Thread Andrew Lunn
> I've added Gokul who reported the issue to me. Is it possible that Harini > and Cisco have different m88e phys? Maybe there's an issue with how they > are hooked up ? Hi Daniel The lower 4 bits of the ID registers normally indicate the revision of the PHY. It might be worth checking if

[PATCH v2 net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Andrew Lunn
("net: phy: sfp: Add HWMON support for module sensors") Signed-off-by: Andrew Lunn --- drivers/net/phy/sfp.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 52fffb98fde9..6e13b8832bc7 100644 --- a/drivers/net

Re: [PATCH net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Andrew Lunn
On Mon, Sep 24, 2018 at 03:43:33PM -0700, Florian Fainelli wrote: > On 09/24/2018 03:38 PM, Andrew Lunn wrote: > > A HWMON device is only registered is the SFP module supports the > > diagnostic page and is complient to SFF8472. Don't unconditionally > > unregister the hwmo

[PATCH net] net: phy: sfp: Fix unregistering of HWMON SFP device

2018-09-24 Thread Andrew Lunn
("net: phy: sfp: Add HWMON support for module sensors") Signed-off-by: Andrew Lunn --- drivers/net/phy/sfp.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 52fffb98fde9..23705ffae6bb 100644 --- a/drivers/net

Re: [PATCH net-next] mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement

2018-09-23 Thread Andrew Lunn
On Mon, Sep 24, 2018 at 12:51:00AM +0300, Ido Schimmel wrote: > On Sun, Sep 23, 2018 at 10:58:09PM +0200, Andrew Lunn wrote: > > > Therefore tweak the check to accept any FW version that is: > > > > > > - on the same branch as the preferred version, and >

Re: [PATCH net-next] mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement

2018-09-23 Thread Andrew Lunn
> Therefore tweak the check to accept any FW version that is: > > - on the same branch as the preferred version, and > - the same as or newer than the preferred version. Hi Ido Do you print this information out? If the check fails, it would be useful to know what the minimal version is.

Re: [PATCH RFT net-next 0/2] net: phy: Eliminate unnecessary soft

2018-09-22 Thread Andrew Lunn
; Sorry for this long email list, I wanted to make sure I reached out to > all people who made changes to the Marvell PHY driver. I got around to testing this at last. Not too much testing, just booting it on five different systems using Marvell and Micrel PHYs. They all got link as expected.

Re: [PATCH net] net: phy: fix WoL handling when suspending the PHY

2018-09-22 Thread Andrew Lunn
On Sat, Sep 22, 2018 at 01:32:55AM +0200, Heiner Kallweit wrote: > Actually there's nothing wrong with the two changes, they just > revealed a problem which has been existing before. Hi Heiner This is missing a bit of context. Which two changes? I assume you mean the two Fixes: > > Core of the

[PATCH net-next] ravb: Disable Pause Advertisement

2018-09-21 Thread Andrew Lunn
a64d4b ("net: ethernet: Add helper to remove a supported link mode") Signed-off-by: Andrew Lunn --- I reworded the commit message from what Simon tested. --- drivers/net/ethernet/renesas/ravb_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethern

Re: [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-21 Thread Andrew Lunn
> Thanks Andrew, > > it seems that removing Aysm Pause does the trick. Great. I will submit the patch today. I see two possible followups: 1) Figure out why auto-neg does not complete when Pause is advertised. Is this a problem with the local PHY or the link partner? The Micrel we have some

Re: [PATCH RFT net-next 0/2] net: phy: Eliminate unnecessary soft

2018-09-20 Thread Andrew Lunn
On Tue, Sep 18, 2018 at 06:35:03PM -0700, Florian Fainelli wrote: > Hi all, > > This patch series eliminates unnecessary software resets of the PHY. > This should hopefully not break anybody's hardware; but I would > appreciate testing to make sure this is is the case. > > Sorry for this long

Re: [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-20 Thread Andrew Lunn
case, the status register indicates auto-neg has not completed. Anyway, please can you try this patch, which also removes Aysm Pause. Thanks Andrew >From 00a061304af51831ca1dc86bf6ce23d01f724229 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Tue, 18 Sep 2018 18:12:54 -0500 Subject:

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-19 Thread Andrew Lunn
> One loosely related question: how sure can we be that we are never going > to need more than 32 bits for FEC encodings? Is it something completely > hypothetical or is it something that could happen in the future? > Hi Michal Hopefully we have moved to a netlink socket by that time :-) I

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-19 Thread Andrew Lunn
> The focus of any patches for the EMAC should be ACPI, not DT. If anything, > ACPI support should come first. No one should be writing or reviewing DT > code before ACPI code. I suspect that is not going to be easy. Last time i looked, the ACPI standard had nothing about MDIO busses or PHYs.

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-19 Thread Andrew Lunn
On Wed, Sep 19, 2018 at 09:19:19AM +, Wang, Dongsheng wrote: > On 2018/9/18 20:35, Andrew Lunn wrote: > >>> If you want to describe the MDIO controller, then you embed a mdio > >>> subnode into your Ethernet MAC node: > >>> > &g

Re: [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-18 Thread Andrew Lunn
> Hi Andrew, Hi Simon Thanks for the dumps > 1. net-next: cf7d97e1e54d ("net: mdio: remove duplicated include from > mdio_bus.c") > > basic status: no link > capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD > 10baseT-FD 10baseT-HD > advertising: 100baseTx-FD

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-18 Thread Andrew Lunn
> > If you want to describe the MDIO controller, then you embed a mdio > > subnode into your Ethernet MAC node: > > > > emac0: ethernet@feb2 { > > mdio { > > #address-cells = <1>; > > #size-cells = <0>; > > > > phy0: ethernet-phy@0 { > >

Re: [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode

2018-09-17 Thread Andrew Lunn
On Mon, Sep 17, 2018 at 05:13:07PM +0200, Simon Horman wrote: > On Wed, Sep 12, 2018 at 01:53:14AM +0200, Andrew Lunn wrote: > > Some MAC hardware cannot support a subset of link modes. e.g. often > > 1Gbps Full duplex is supported, but Half duplex is not. Add a helper > >

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