Re: [PATCH] Revert "macb: support the two tx descriptors on at91rm9200"

2021-04-07 Thread Alexandre Belloni
her one here. > > > Anyhow. I'm working on a version of your patch that should work with > > both the at91rm9200 and the MSC313E. > > Cool! Thanks for letting me know. If you need me to run some test, let > me know (just don't expect too short latency these days but I definitely > will test). > Note that I have my rm9200ek home now and I could also run some tests. (I do hope it still boots a recent kernel). -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] dt-bindings: Cleanup standard unit properties

2021-01-28 Thread Alexandre Belloni
t;David S. Miller" > Cc: Jakub Kicinski > Cc: Sebastian Reichel > Cc: Mark Brown > Cc: Alexandre Belloni > Cc: Greg Kroah-Hartman > Cc: Serge Semin > Cc: Wolfram Sang > Cc: linux-hw...@vger.kernel.org > Cc: linux-...@vger.kernel.org > Cc: linux-...@vger

Re: [RFC PATCH net-next 12/16] net: mscc: ocelot: drop the use of the "lags" array

2021-01-15 Thread Alexandre Belloni
as probably the one, the main reason being that this make this function able to fail. Removing the dynamic allocation would ensure it never fails. However, I didn't suggest any other solution so I'm fine if you keep it. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v12 2/4] phy: Add ethernet serdes configuration option

2021-01-14 Thread Alexandre Belloni
; Reviewed-by: Andrew Lunn Reviewed-by: Alexandre Belloni > --- > include/linux/phy/phy-ethernet-serdes.h | 30 + > include/linux/phy/phy.h | 4 > 2 files changed, 34 insertions(+) > create mode 100644 include/linux/phy/phy-ethernet-serd

Re: [PATCH v12 1/4] dt-bindings: phy: Add sparx5-serdes bindings

2021-01-14 Thread Alexandre Belloni
On 07/01/2021 10:19:21+0100, Steen Hegelund wrote: > Document the Sparx5 ethernet serdes phy driver bindings. > > Signed-off-by: Lars Povlsen > Signed-off-by: Steen Hegelund > Reviewed-by: Rob Herring > Reviewed-by: Andrew Lunn Reviewed-by: Alexandre Belloni > --

Re: [PATCH v12 4/4] arm64: dts: sparx5: Add Sparx5 serdes driver node

2021-01-14 Thread Alexandre Belloni
On 07/01/2021 10:19:24+0100, Steen Hegelund wrote: > Add Sparx5 serdes driver node, and enable it generally for all > reference boards. > > Signed-off-by: Lars Povlsen > Signed-off-by: Steen Hegelund > Reviewed-by: Andrew Lunn Reviewed-by: Alexandre Belloni > --- &

Re: (subset) [PATCH 00/10] Remove support for TX49xx

2021-01-12 Thread Alexandre Belloni
emoval into seperate parts for different maintainers. > So if the patch fits your needs, please take it via your tree or > give me an ack so I can apply them the mips-next tree. > > [...] Applied, thanks! [08/10] rtc: tx4939: Remove driver commit: 446667df283002fdda0530523347ffd1cf053373 Best regards, -- Alexandre Belloni

Re: [RFC PATCH v2 3/8] net: sparx5: add hostmode with phylink support

2020-12-23 Thread Alexandre Belloni
ng mostly used for managmement (dhcp, stp, etc...) as opposed to being used to forward traffic to another interface, like WAN or wifi. However, I would think there will be cases where the internal CPU is not use and instead use ths switch in a DSA setting, very much like what is done for Feli

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-22 Thread Alexandre Belloni
you can ensure from the reset controller driver that this is done exactly once, either from the sgpio driver or from the switchdev driver. IIRC, the sgpio from the other SoCs are not affected by the reset. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [resend/standalone PATCH v4] Add auxiliary bus support

2020-12-18 Thread Alexandre Belloni
On 18/12/2020 19:36:08-0400, Jason Gunthorpe wrote: > On Fri, Dec 18, 2020 at 10:16:58PM +0100, Alexandre Belloni wrote: > > > But then again, what about non-enumerable devices on the PCI device? I > > feel this would exactly fit MFD. This is a collection of IPs that exist >

Re: [resend/standalone PATCH v4] Add auxiliary bus support

2020-12-18 Thread Alexandre Belloni
had a quite strong > NAK to that. Let me point to drivers/net/ethernet/cadence/macb_pci.c which is a fairly recent example. It does exactly that and I'm not sure you could do it otherwise while still not having to duplicate most of macb_probe. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [resend/standalone PATCH v4] Add auxiliary bus support

2020-12-18 Thread Alexandre Belloni
rticular SoC, I can disable the CPU and connect it to another SoC using PCIe. In that case it will expose one BAR, with all the HW IPs. The question here is why would I use something different from platform devices to register the SPI and I2C controllers? It seems that by using auxiliary devices, I wou

Re: [resend/standalone PATCH v4] Add auxiliary bus support

2020-12-17 Thread Alexandre Belloni
x27;t already be done using platform drivers and platform devices? We already have a bunch of drivers in tree that have to share a state and register other drivers from other subsystems for the same device. How is the auxiliary bus different? -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH net-next 14/16] net: mscc: ocelot: rebalance LAGs on link up/down events

2020-12-16 Thread Alexandre Belloni
if (!ocelot_netdevice_dev_check(dev)) > + break; > + > + return ocelot_netdevice_changelowerstate(dev, > + > info->lower_state_info); > + } > default: > break; > } > diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h > index 0cd45659430f..8a44b9064789 100644 > --- a/include/soc/mscc/ocelot.h > +++ b/include/soc/mscc/ocelot.h > @@ -599,6 +599,7 @@ struct ocelot_port { > u8 *xmit_template; > > struct net_device *bond; > + boollag_tx_active; > }; > > struct ocelot { > -- > 2.25.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH net-next 13/16] net: mscc: ocelot: rename aggr_count to num_ports_in_lag

2020-12-16 Thread Alexandre Belloni
On 08/12/2020 14:07:59+0200, Vladimir Oltean wrote: > It makes it a bit easier to read and understand the code that deals with > balancing the 16 aggregation codes among the ports in a certain LAG. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > dr

Re: [RFC PATCH net-next 12/16] net: mscc: ocelot: drop the use of the "lags" array

2020-12-16 Thread Alexandre Belloni
t; info->upper_dev); > else > - ocelot_port_lag_leave(ocelot, port, > - info->upper_dev); > + err = ocelot_port_lag_leave(ocelot, port, > + info->upper_dev); > } > > return notifier_from_errno(err); > diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h > index b812bdff1da1..0cd45659430f 100644 > --- a/include/soc/mscc/ocelot.h > +++ b/include/soc/mscc/ocelot.h > @@ -639,8 +639,6 @@ struct ocelot { > enum ocelot_tag_prefix inj_prefix; > enum ocelot_tag_prefix xtr_prefix; > > - u32 *lags; > - > struct list_headmulticast; > struct list_headpgids; > > -- > 2.25.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH net-next 11/16] net: mscc: ocelot: set up logical port IDs centrally

2020-12-16 Thread Alexandre Belloni
. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 47 ++ > 1 file changed, 28 insertions(+), 19 deletions(-) > > diff --git a/drivers/net/ethernet/mscc/ocelot.c > b/drivers/net/eth

Re: [RFC PATCH net-next 10/16] net: mscc: ocelot: reapply bridge forwarding mask on bonding join/leave

2020-12-16 Thread Alexandre Belloni
mask so that it could be reused, and call it when a port > starts and stops offloading a bonding interface. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 68 +- > 1 file changed,

Re: [RFC PATCH net-next 08/16] net: mscc: ocelot: avoid unneeded "lp" variable in LAG join

2020-12-15 Thread Alexandre Belloni
_ffs(bond_mask); > ocelot->lags[lp] = 0; > } > > lp was clobbered before, because it was used as a temporary variable to > hold the new smallest port ID from the bond. Now that we don't have "lp" > any longer, we&

Re: [RFC PATCH net-next 09/16] net: mscc: ocelot: use "lag" variable name in ocelot_bridge_stp_state_set

2020-12-15 Thread Alexandre Belloni
On 08/12/2020 14:07:55+0200, Vladimir Oltean wrote: > In anticipation of further simplification, make it more clear what we're > iterating over. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 11 +++--

Re: [RFC PATCH net-next 07/16] net: mscc: ocelot: set up the bonding mask in a way that avoids a net_device

2020-12-15 Thread Alexandre Belloni
rrent "lags" array, but the duplication will be > short-lived, since further patches will remove the latter completely. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 29 ++--- > include/so

Re: [RFC PATCH net-next 06/16] net: mscc: ocelot: use ipv6 in the aggregation code

2020-12-15 Thread Alexandre Belloni
e is 1. > > Integration with the xmit_hash_policy of the bonding interface is TBD. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/

Re: [RFC PATCH net-next 04/16] net: mscc: ocelot: use a switch-case statement in ocelot_netdevice_event

2020-12-15 Thread Alexandre Belloni
On 15/12/2020 16:52:26+0100, Alexandre Belloni wrote: > On 08/12/2020 14:07:50+0200, Vladimir Oltean wrote: > > Make ocelot's net device event handler more streamlined by structuring > > it in a similar way with others. The inspiration here was > > dsa_slave_netdevice_eve

Re: [RFC PATCH net-next 05/16] net: mscc: ocelot: don't refuse bonding interfaces we can't offload

2020-12-15 Thread Alexandre Belloni
ad allow the bonding driver to select the egress interface in > software. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot_net.c | 38 ++ > 1 file changed, 15 insertions(+), 23 deletions(-)

Re: [RFC PATCH net-next 04/16] net: mscc: ocelot: use a switch-case statement in ocelot_netdevice_event

2020-12-15 Thread Alexandre Belloni
ocelot_netdevice_lag_changeupper(dev, info); > + > + break; > + } > + default: > + break; > } > > -notify: > - return notifier_from_errno(ret); > + return NOTIFY_DONE; This changes the return value from NOTIFY_OK to NOTIFY_DONE but this is probably what we want. > } > > struct notifier_block ocelot_netdevice_nb __read_mostly = { > -- > 2.25.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH net-next 03/16] net: mscc: ocelot: rename ocelot_netdevice_port_event to ocelot_netdevice_changeupper

2020-12-15 Thread Alexandre Belloni
); > + if (ret) > + goto notify; > + } > + } else { > + ret = ocelot_netdevice_changeupper(dev, event, info); Does that compile? Shouldn't event be dropped? -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH net-next 02/16] net: mscc: ocelot: allow offloading of bridge on top of LAG

2020-12-15 Thread Alexandre Belloni
tain conditions. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot_net.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/mscc/ocelot_net.c > b/drivers/net/etherne

Re: [RFC PATCH net-next 01/16] net: mscc: ocelot: offload bridge port flags to device

2020-12-15 Thread Alexandre Belloni
address learning unless the bridge asks for it. Currently this is > the only bridge port flag we are looking at. The others (flooding etc) > are TBD. > > Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 21

Re: [PATCH] net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function

2020-12-14 Thread Alexandre Belloni
ial Ocelot switch support") > Signed-off-by: Christophe JAILLET Acked-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot_vsc7514.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mscc/ocelot_vsc7514.c >

Re: macb: should we revert 0a4e9ce17ba7 ("macb: support the two tx descriptors on at91rm9200") ?

2020-12-07 Thread Alexandre Belloni
11... > > Let's revert ASAP, 5.10 is going to be LTS, people will definitely > notice. > > Would you mind sending a revert patch with the explanation in the > commit message? FWIW, I went to the office and brought back my rm9200 today. I didn't have the time to set up a test yet though. I'm not sure it will even boot v5.10 so don't bet anyone apart me would notice Ethernet being broken on this SoC. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 net] net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context

2020-12-04 Thread Alexandre Belloni
e? > No, the SoC can also expose its registers as a pcie endpoint or a SPI device. In that case, obviously, the on board MIPS CPU is not enabled. IIRC, you can even access all the registers using MDIO. > > > Also for a reference - there are drivers out there with busy poll > > > timeout of seconds :/ > > > > Yeah, not sure if that tells me anything. I prefer avoiding that from > > atomic context, because our cyclictest numbers are not that great anyway, > > the last thing I want is to make them worse. > > Fair. On that topic, we could certainly play with regmap fast_io, I dont remember if this is enabled by default or even remove regmap locking completely when using MMIO. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 net] net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context

2020-12-04 Thread Alexandre Belloni
that he intends to add support for a switch > managed over a slow bus like SPI, and to use the same regmap infrastructure. > That would mean that this problem would need to be resolved anyway. > This is still on the way but it will not happen this year unfortunately. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net] net: mscc: ocelot: fix dropping of unknown IPv4 multicast on Seville

2020-12-04 Thread Alexandre Belloni
ted. > > Reported-by: Eldar Gasanov > Reported-by: Maxim Kochetkov > Tested-by: Eldar Gasanov > Fixes: 84705fc16552 ("net: dsa: felix: introduce support for Seville VSC9953 > switch") > Fixes: 3c7b51bd39b2 ("net: dsa: felix: allow flooding for all traffic >

Re: [PATCH v8 3/4] phy: Add Sparx5 ethernet serdes PHY driver

2020-12-04 Thread Alexandre Belloni
looks like this is for networking only? So i'm wondering if it > belongs in driver/net/pcs and it should be accessed using > phylink_pcs_ops? > Ocelot had PCie on the phys, doesn't Sparx5 have it? -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v8 3/4] phy: Add Sparx5 ethernet serdes PHY driver

2020-12-03 Thread Alexandre Belloni
c for this patch set as phylink maintainer in >your patch set so I can review your use of phylink. > Note that this series is different from the network (switchdev) driver series and doesn't make use of phylink. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [RFC PATCH 2/3] net: sparx5: Add Sparx5 switchdev driver

2020-11-28 Thread Alexandre Belloni
our search - site:kernel.org >20201127133307.2969817-1-steen.hegel...@microchip.com - did not > match any documents. Suggestions: Make sure that all words are >spelled correctly. Try different keywords. Try more general >keywords. > http://lore.kernel.org/r/20201127133307.2969817-1-steen.hegel...@microchip.com does the right redirect. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next 0/3] macb: support the 2-deep Tx queue on at91

2020-11-13 Thread Alexandre Belloni
the tests. I initially wanted to get my old SAM9G20 board > to boot until I noticed that it doesn't even use the same set of > functions, so the potential victims are extremely limited :-) > I think I'm the only one booting recent linux kernels on at91rm9200 and I'm currently stuck home while the board is at the office. I'll try to test as soon as possible, which may not be before 2021... At least I'll know who is the culprit ;) -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next 1/7] net: mscc: ocelot: use the pvid of zero when bridged with vlan_filtering=0

2020-11-02 Thread Alexandre Belloni
sistent with the standalone mode now. > IIRC, we are using pvid 1 because else bridging breaks when CONFIG_VLAN_8021Q is not enabled. Did you test that configuration? -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

[PATCH net-next] net: macb: move pdata to private header

2020-09-30 Thread Alexandre Belloni
struct macb_platform_data is only used by macb_pci to register the platform device, move its definition to cadence/macb.h and remove platform_data/macb.h Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/cadence/macb.h | 11 +++ drivers/net/ethernet/cadence/macb_main.c | 1

Re: [RFC PATCH net-next 07/14] net: mscc: ocelot: introduce conversion helpers between port and netdev

2020-09-25 Thread Alexandre Belloni
hat the flower > offload core has the ability to translate between a net_device and a > port index properly. > > Signed-off-by: Vladimir Oltean Acked-by: Alexandre Belloni > --- > drivers/net/dsa/ocelot/felix.c | 22 > drivers/net/dsa/oce

Re: [RFC PATCH net-next 01/14] net: mscc: ocelot: introduce a new ocelot_target_{read,write} API

2020-09-25 Thread Alexandre Belloni
not actually modified to use this new API as of > this patch. They will be modified in the next one. > > Signed-off-by: Vladimir Oltean Acked-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot_io.c | 17 + > include/soc/mscc/ocelot.h

Re: [net] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3

2020-09-24 Thread Alexandre Belloni
ns this was generated automatically from the cml file for felix. Did that change? Seeing that bits in this register are not packed, I would believe your change is correct. > #define ANA_SG_GCL_GS_CONFIG_RSZ 0x4 > > -- > 2.17.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next 05/11] net: dsa: seville: remove unused defines for the mdio controller

2020-09-18 Thread Alexandre Belloni
On 18/09/2020 21:59:50+0300, Vladimir Oltean wrote: > On Fri, Sep 18, 2020 at 07:37:19PM +0200, Alexandre Belloni wrote: > > On 18/09/2020 18:54:42+0300, Vladimir Oltean wrote: > > > On Fri, Sep 18, 2020 at 05:46:45PM +0200, Alexandre Belloni wrote: > > > > On 18/0

Re: [PATCH net-next 05/11] net: dsa: seville: remove unused defines for the mdio controller

2020-09-18 Thread Alexandre Belloni
On 18/09/2020 18:54:42+0300, Vladimir Oltean wrote: > On Fri, Sep 18, 2020 at 05:46:45PM +0200, Alexandre Belloni wrote: > > On 18/09/2020 13:57:47+0300, Vladimir Oltean wrote: > > > From: Vladimir Oltean > > > > > > Some definitions were likely copied from >

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
The skb should be > added to the queue before the IRQ can fire. > > Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni >

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
The skb should be > added to the queue before the IRQ can fire. > > Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni >

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
The skb should be > added to the queue before the IRQ can fire. > > Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni >

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
On 18/09/2020 17:26:03+0200, Alexandre Belloni wrote: > On 18/09/2020 04:07:23+0300, Vladimir Oltean wrote: > > From: Vladimir Oltean > > > > The TX-timestampable skb is added late to the ocelot_port->tx_skbs. It > > is in a race with the TX timestamp IRQ, which c

Re: [PATCH v2 net 4/8] net: mscc: ocelot: check for errors on memory allocation of ports

2020-09-18 Thread Alexandre Belloni
On 18/09/2020 04:07:26+0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > Do not proceed probing if we couldn't allocate memory for the ports > array, just error out. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Bello

Re: [PATCH v2 net 2/8] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-18 Thread Alexandre Belloni
actual skb, but for felix, it is called for the skb's > clone. That is something which will also be changed in the future. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni > --- > Changes i

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
The skb should be > added to the queue before the IRQ can fire. > > Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni >

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
The skb should be > added to the queue before the IRQ can fire. > > Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni >

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
The skb should be > added to the queue before the IRQ can fire. > > Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni >

Re: [PATCH v2 net 5/8] net: mscc: ocelot: error checking when calling ocelot_init()

2020-09-18 Thread Alexandre Belloni
f-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni > --- > Changes in v2: > Stopped leaking the 'ports' OF node in the VSC7514 driver. > > drivers/net/dsa/ocelot/felix.c | 5 - > drive

Re: [PATCH v2 net 3/8] net: dsa: seville: fix buffer size of the queue system

2020-09-18 Thread Alexandre Belloni
On 18/09/2020 04:07:25+0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > The VSC9953 Seville switch has 2 megabits of buffer split into 4360 > words of 60 bytes each. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni R

Re: [PATCH net-next 05/11] net: dsa: seville: remove unused defines for the mdio controller

2020-09-18 Thread Alexandre Belloni
-#define PHY_CFG_PHY_RESET (BIT(5) | BIT(6) | BIT(7) | > BIT(8)) > -#define MSCC_PHY_REG_PHY_STATUS 0x4 > > static const u32 vsc9953_ana_regmap[] = { > REG(ANA_ADVLEARN, 0x00b500), > -- > 2.25.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
The skb should be > added to the queue before the IRQ can fire. > > Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni >

Re: [PATCH v2 net 1/8] net: mscc: ocelot: fix race condition with TX timestamping

2020-09-18 Thread Alexandre Belloni
The skb should be > added to the queue before the IRQ can fire. > > Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni >

Re: [PATCH net-next 09/11] net: mscc: ocelot: make ocelot_init_timestamp take a const struct ptp_clock_info

2020-09-18 Thread Alexandre Belloni
Oltean Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot_ptp.c | 3 ++- > include/soc/mscc/ocelot_ptp.h | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/mscc/ocelot_ptp.c > b/drivers/net/ether

Re: [PATCH v2 net 8/8] net: mscc: ocelot: deinitialize only initialized ports

2020-09-18 Thread Alexandre Belloni
ng down the driver, and add > a new function ocelot_deinit_port() to the switch library, mirror of > ocelot_init_port(), which needs to be called by the driver for all ports > it has initialized. > > Signed-off-by: Vladimir Oltean Tested-by: Alexandre Belloni Reviewed-by: Ale

Re: [PATCH v2 net 7/8] net: mscc: ocelot: unregister net devices on unbind

2020-09-18 Thread Alexandre Belloni
On 18/09/2020 04:07:29+0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > This driver was not unregistering its network interfaces on unbind. > Now it is. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-

Re: [PATCH v2 net 6/8] net: mscc: ocelot: refactor ports parsing code into a dedicated function

2020-09-18 Thread Alexandre Belloni
ot_release_ports from the error path of mscc_ocelot_init_ports. > > Signed-off-by: Vladimir Oltean > Reviewed-by: Horatiu Vultur Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni > --- > Changes in v2: > Keep a reference to the 'ports' OF node at caller

Re: [PATCH net 2/7] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-16 Thread Alexandre Belloni
gt; rew_op = ocelot_port->ptp_cmd; > - if (ocelot_port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP) { > - rew_op |= (ocelot_port->ts_id % 4) << 3; > - ocelot_port->ts_id++; > - } > + /* Retrieve timestamp ID populated inside skb->cb[0] of the > + * clone by ocelot_port_add_txtstamp_skb > + */ > + if (ocelot_port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP) > + rew_op |= clone->cb[0] << 3; > > packing(injection, &rew_op, 125, 117, OCELOT_TAG_LEN, PACK, 0); > } > -- > 2.25.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net 0/7] Bugfixes in Microsemi Ocelot switch driver

2020-09-16 Thread Alexandre Belloni
gt; include/soc/mscc/ocelot.h | 1 + > net/dsa/tag_ocelot.c | 11 +- > 7 files changed, 168 insertions(+), 110 deletions(-) > This series is leading to multiple crashes on my vc7524 board. I'm trying to pinpoint the problematic commits -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2] net: dsa: microchip: look for phy-mode in port nodes

2020-09-04 Thread Alexandre Belloni
nd fall back to the old > location with a warning. > > Fix in-tree users. > > Signed-off-by: Helmut Grohne Acked-by: Alexandre Belloni > Link: https://lore.kernel.org/netdev/20200617082235.GA1523@laureti-dev/ > --- > arch/arm/boot/dts/at91-sama5d2_icp.dts | 2 +- > d

Re: [PATCH net-next 2/7] macb: bindings doc: use an MDIO node as a container for PHY nodes

2020-07-21 Thread Alexandre Belloni
ethernet-phy@1 { > - reg = <0x1>; > - reset-gpios = <&pioE 6 1>; > + mdio { > + #address-cells = <1>; > + #size-cells = <0>; > + ether

[PATCH net] net: macb: use phy_interface_mode_is_rgmii everywhere

2020-07-17 Thread Alexandre Belloni
the phy-mode has to be set to rgmii-rxid. Fixes: bcf3440c6dd78bfe ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/cadence/macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ne

Re: [PATCH net-next v3] net: phy: micrel: add phy-mode support for the KSZ9031 PHY

2020-07-10 Thread Alexandre Belloni
On 11/07/2020 00:54:53+0200, Andrew Lunn wrote: > On Sat, Jul 11, 2020 at 12:36:10AM +0200, Alexandre Belloni wrote: > > Hi Oleksij, > > > > This patch breaks Ethernet on the sama5d3 Xplained and I have not been > > able to unbreak it. > > Hi Alexandre &

Re: [PATCH net-next v3] net: phy: micrel: add phy-mode support for the KSZ9031 PHY

2020-07-10 Thread Alexandre Belloni
4, > - rx_data_skews, 4); > + rx_data_skews, 4, &update); > > ksz9031_of_load_skew_values(phydev, of_node, > MII_KSZ9031RN_TX_DATA_PAD_SKEW, 4, > - tx_data_skews, 4); > + tx_data_skews, 4, &update); > + > + if (update && phydev->interface != PHY_INTERFACE_MODE_RGMII) > + phydev_warn(phydev, > + "*-skew-ps values should be used only with > phy-mode = \"rgmii\"\n"); > > /* Silicon Errata Sheet (DS8691D or DS8692D): >* When the device links in the 1000BASE-T slave mode only, > -- > 2.26.0.rc2 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v3 net-next 01/13] regmap: add helper for per-port regfield initialization

2020-06-01 Thread Alexandre Belloni
l requests. No, this would make you commit appear twice in the history with different hashes. If you want to have what you suggest, Dave needs to first take Mark's PR so both PR will have the same commit hash. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next 11/11] net: dsa: ocelot: introduce driver for Seville VSC9953 switch

2020-05-29 Thread Alexandre Belloni
On 29/05/2020 18:42:47+0300, Vladimir Oltean wrote: > On Fri, 29 May 2020 at 12:03, Alexandre Belloni > wrote: > > > > On 29/05/2020 11:30:43+0300, Vladimir Oltean wrote: > > > > As ocelot can be used in a DSA configuration (even if it is not > > > > imp

Re: [PATCH net-next 11/11] net: dsa: ocelot: introduce driver for Seville VSC9953 switch

2020-05-29 Thread Alexandre Belloni
ocelot.c from the beginning but honestly, it doesn't matter that much. BTW, maybe we should merge the VITESSE FELIX ETHERNET SWITCH DRIVER and MICROSEMI ETHERNET SWITCH DRIVER entries in MAINTAINERS. You do much more work in drivers/net/ethernet/mscc/ than I currently do. -- Alexandre Bel

Re: [PATCH net-next 11/11] net: dsa: ocelot: introduce driver for Seville VSC9953 switch

2020-05-29 Thread Alexandre Belloni
-level seville_vsc9953.c > that deals with platform integration specific stuff (probing, internal > MDIO, register map, etc), and the felix_switch_ops would call into > ocelot for the common functionalities. > What do you think? > > -Vladimir -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next 3/4] net: phy: mscc-miim: improve waiting logic

2020-05-26 Thread Alexandre Belloni
, and by adjusting where we should wait for the > bus to not be busy or to not be pending. > > Signed-off-by: Antoine Tenart Reviewed-by: Alexandre Belloni > --- > drivers/net/phy/mdio-mscc-miim.c | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) >

Re: [PATCH net-next 2/4] net: phy: mscc-miim: remove redundant timeout check

2020-05-26 Thread Alexandre Belloni
!(val & MSCC_MIIM_STATUS_STAT_BUSY), 50, > 10000); > } > > static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum) > -- > 2.26.2 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next 1/4] net: phy: mscc-miim: use more reasonable delays

2020-05-26 Thread Alexandre Belloni
p is reduced from 100us to 50us which in almost all cases is a > good value to succeed at the first retry. The overall delay is also > lowered as the prior value was really way to high, 1us is large > enough. > > Signed-off-by: Antoine Tenart Reviewed-by: Alexandre Belloni > --

Re: stable/linux-4.4.y bisection: baseline.login on at91-sama5d4_xplained

2020-05-12 Thread Alexandre Belloni
5371a3790f2] Revert "ACPI / LPSS: > > allow to use specific PM domain during ->probe()" > > git bisect good 25e8aad6f491da6ae330148da09585371a3790f2 > > # good: [2f3e56e4b6020812350190f1cada230d790ce0e8] powerpc/tm: Fix stack > > pointer corruption in __tm_recheckpoint() > > git bisect good 2f3e56e4b6020812350190f1cada230d790ce0e8 > > # bad: [0d1951fa23ba0d35a4c5498ff28d1c5206d6fcdd] net: phy: Avoid polling > > PHY with PHY_IGNORE_INTERRUPTS > > git bisect bad 0d1951fa23ba0d35a4c5498ff28d1c5206d6fcdd > > # good: [4ebef63e925e37f5de2f9da8fc86a545e4e0b945] sctp: fix the transports > > round robin issue when init is retransmitted > > git bisect good 4ebef63e925e37f5de2f9da8fc86a545e4e0b945 > > # good: [c175435fdf50c81ca2b6576f090cba31c3489209] NFC: nci: memory leak in > > nci_core_conn_create() > > git bisect good c175435fdf50c81ca2b6576f090cba31c3489209 > > # first bad commit: [0d1951fa23ba0d35a4c5498ff28d1c5206d6fcdd] net: phy: > > Avoid polling PHY with PHY_IGNORE_INTERRUPTS > > --- > > > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next] net: macb: convert to phylink

2019-10-22 Thread Alexandre Belloni
first goal was to get access to phylink_ethtool_get_pauseparam/phylink_ethtool_set_pauseparam and the flow control logic instead of having to open code it. There are also boards with a zynqmp and SFP cages. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next] net: macb: convert to phylink

2019-10-18 Thread Alexandre Belloni
d-by: Alexandre Belloni -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net] ocelot: Cancel delayed work before wq destruction

2019-07-25 Thread Alexandre Belloni
pport") > > Signed-off-by: Claudiu Manoil Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/mscc/ocelot.c > b/drivers/net/ethernet/mscc/ocelot.c > index b71e4ec

Re: [PATCH net] ocelot: Dont allocate another multicast list, use __dev_mc_sync

2019-05-22 Thread Alexandre Belloni
etter choice of kernel API for these operations > avoiding the considerable overhead of maintaining a duplicated > list in the driver. > > Signed-off-by: Claudiu Manoil Tested-by: Alexandre Belloni Acked-by: Alexandre Belloni > --- > Maybe this should go to net, since there

Re: [PATCH] can: mark expected switch fall-throughs

2019-02-14 Thread Alexandre Belloni
you are missing the relevant part of the patch. > Right, I misread the patch and though you were moving the comment after the case statement. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] can: mark expected switch fall-throughs

2019-02-14 Thread Alexandre Belloni
On 14/02/2019 17:04:03-0600, Gustavo A. R. Silva wrote: > > > On 2/14/19 4:17 PM, Alexandre Belloni wrote: > > Hi, > > > > On 14/02/2019 15:37:26-0600, Gustavo A. R. Silva wrote: > >> > >> > >> On 1/30/19 2:11 AM, nicolas.fe...@microchip

Re: [PATCH] can: mark expected switch fall-throughs

2019-02-14 Thread Alexandre Belloni
91_irq_err_state(struct net_device *dev, > >>netdev_dbg(dev, "Error Active\n"); > >>cf->can_id |= CAN_ERR_PROT; > >>cf->data[2] = CAN_ERR_PROT_ACTIVE; > >> - case CAN_STATE_ERROR_WARNING: /* fallthrough */ Seriously, for that one, you should fix the compiler. The fall through is not implicit, it is actually quite explicit and the warning is simply wrong. Also, the gcc documentation says that -Wimplicit-fallthrough=3 recognizes /* fallthrough */ as a proper fall through comment (and I tested with gcc 8.2). The matching regex is [ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )? fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)? -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net] mscc: Register poll timeout should be wall time not attempts

2018-12-20 Thread Alexandre Belloni
ess attempts. > > Signed-off-by: Steen Hegelund Acked-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot.c | 55 +++--- > 1 file changed, 27 insertions(+), 28 deletions(-) > > diff --git a/drivers/net/ethernet/mscc/ocelot.c > b/driver

[PATCH net-next] MAINTAINERS: Add a maintainer for Microsemi switches

2018-12-18 Thread Alexandre Belloni
Microsemi has been bought by Microchip and Microchip is supporting those switches. Signed-off-by: Alexandre Belloni --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 50223cba6ddb..48abe982aed6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

Re: [PATCH net-next v3 1/6] net: phy: mscc: migrate to phy_select/restore_page functions

2018-11-19 Thread Alexandre Belloni
27;s where it hangs. > > So you never said it hangs. The stacktrace helps, but a description of > what actually happens also helps. And i expect Quentin has booted this > code lots of times and not had a hang. So some hits how to reproduce > it would also help. Maybe your kernel config? > > I'm interested because he is using the core mdio locking > primitives. If those are broken, i want to know. > My first intuition is that he mac driver quentin is using does phy_connect when the interface is opened while macb is doing it at probe time. I didn't investigate but maybe this can help :) -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH net-next] net: mscc: simplify retrieving the tag type from the frame header

2018-07-16 Thread Alexandre Belloni
f-by: Antoine Tenart Reviewed-by: Alexandre Belloni > --- > drivers/net/ethernet/mscc/ocelot_board.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mscc/ocelot_board.c > b/drivers/net/ethernet/mscc/ocelot_board.c > index 18df7d934e81

Re: [PATCH net-next ] net: mscc: Add SPDX identifier

2018-05-18 Thread Alexandre Belloni
om the SPDX identifier. > The MIT license does allow sublicensing, so > it does seem you can choose what additional > license restrictions you can assert as long > as the original MIT license is also followed. > Then all is good. -- Alexandre Belloni, Bootlin (formerly Free

Re: [PATCH net-next ] net: mscc: Add SPDX identifier

2018-05-18 Thread Alexandre Belloni
On 17/05/2018 18:13:25-0700, Joe Perches wrote: > On Thu, 2018-05-17 at 21:39 +0200, Alexandre Belloni wrote: > > On 17/05/2018 12:28:59-0700, Joe Perches wrote: > > > On Thu, 2018-05-17 at 21:23 +0200, Alexandre Belloni wrote: > > > > ocelot_qsys.h is missin

[PATCH net-next 1/2] net: mscc: ocelot: add bonding support

2018-05-17 Thread Alexandre Belloni
Add link aggregation hardware offload support for Ocelot. ocelot_get_link_ksettings() is not great but it does work until the driver is reworked to switch to phylink. Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/mscc/ocelot.c | 177 + drivers/net

[PATCH net-next 2/2] net: mscc: ocelot: add VLAN filtering

2018-05-17 Thread Alexandre Belloni
From: Antoine Tenart Add hardware VLAN filtering offloading on ocelot. Signed-off-by: Antoine Tenart Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/mscc/ocelot.c | 285 - 1 file changed, 283 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH net-next 0/2] net: mscc; ocelot: add more features

2018-05-17 Thread Alexandre Belloni
Hi, This series adds link aggregation and VLAN filtering hardware offload support to the ocelot driver. PTP is also on the list of features but it will probably not be submitted this cycle. Alexandre Belloni (1): net: mscc: ocelot: add bonding support Antoine Tenart (1): net: mscc: ocelot

Re: [PATCH net-next ] net: mscc: Add SPDX identifier

2018-05-17 Thread Alexandre Belloni
On 17/05/2018 12:28:59-0700, Joe Perches wrote: > On Thu, 2018-05-17 at 21:23 +0200, Alexandre Belloni wrote: > > ocelot_qsys.h is missing the SPDX identfier, fix that. > > > > Signed-off-by: Alexandre Belloni > > Only the copyright holders should ideally be modifyin

[PATCH net-next ] net: mscc: Add SPDX identifier

2018-05-17 Thread Alexandre Belloni
ocelot_qsys.h is missing the SPDX identfier, fix that. Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/mscc/ocelot_qsys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc/ocelot_qsys.h b/drivers/net/ethernet/mscc/ocelot_qsys.h index

Re: [PATCH net-next v3 0/7] Microsemi Ocelot Ethernet switch support

2018-05-16 Thread Alexandre Belloni
me if you want me to resend. Anyway, I'll probably send another patch to enable the driver in board-ocelot.config -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

[PATCH net-next v3 0/7] Microsemi Ocelot Ethernet switch support

2018-05-14 Thread Alexandre Belloni
27;ve tried switching to NAPI but this is not working well, mainly because the only way to disable interrupts is to actually mask them in the interrupt controller (it is not possible to tell the switch to stop generating interrupts). Cc: James Hogan Alexandre Belloni (7): dt-bindings: net: a

[PATCH net-next v3 3/7] dt-bindings: net: add DT bindings for Microsemi Ocelot Switch

2018-05-14 Thread Alexandre Belloni
DT bindings for the Ethernet switch found on Microsemi Ocelot platforms. Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni --- .../devicetree/bindings/net/mscc-ocelot.txt | 82 +++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH net-next v3 5/7] MIPS: mscc: Add switch to ocelot

2018-05-14 Thread Alexandre Belloni
Ocelot has an integrated switch, add support for it. Cc: James Hogan Signed-off-by: Alexandre Belloni --- arch/mips/boot/dts/mscc/ocelot.dtsi | 88 + 1 file changed, 88 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot.dtsi b/arch/mips/boot/dts/mscc

[PATCH net-next v3 6/7] MIPS: mscc: connect phys to ports on ocelot_pcb123

2018-05-14 Thread Alexandre Belloni
Add phy to switch port connections for PCB123 for internal PHYs. Cc: James Hogan Signed-off-by: Alexandre Belloni --- arch/mips/boot/dts/mscc/ocelot_pcb123.dts | 20 1 file changed, 20 insertions(+) diff --git a/arch/mips/boot/dts/mscc/ocelot_pcb123.dts b/arch/mips/boot

  1   2   >