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

2020-07-16 Thread Helmut Grohne
On Thu, Jul 16, 2020 at 09:00:00AM +0200, Helmut Grohne wrote: > I've prepared a patch based one the one-CPU-port assumption. It really > becomes way simpler that way. I'd like to give it a little more testing > before sending it. I'm sorry, but it is not that simple. Testing revealed a fatal flaw

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

2020-07-16 Thread Helmut Grohne
On Wed, Jul 15, 2020 at 03:00:46PM +0200, Andrew Lunn wrote: > On Wed, Jul 15, 2020 at 09:31:12AM +0200, Helmut Grohne wrote: > > You seem to be in favour of more deeply encoding the "there can be only > > one CPU port" assumption. Based on that assumption, the rest of what you > > write makes very

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

2020-07-15 Thread Andrew Lunn
On Wed, Jul 15, 2020 at 09:31:12AM +0200, Helmut Grohne wrote: > You seem to be in favour of more deeply encoding the "there can be only > one CPU port" assumption. Based on that assumption, the rest of what you > write makes very much sense to me. Is that the direction to go? >From what i underst

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

2020-07-15 Thread Helmut Grohne
Hi Andrew, Thank you for the quick reply. On Wed, Jul 15, 2020 at 12:27:16AM +0200, Andrew Lunn wrote: > I think this change is more complex than it needs to be. Only the CPU > port supports different interface modes. So i don't see the need to > handle both dev->interface and p->interface. Just

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

2020-07-14 Thread Andrew Lunn
On Tue, Jul 14, 2020 at 02:08:28PM +0200, Helmut Grohne wrote: > Documentation/devicetree/bindings/net/dsa/dsa.txt says that the phy-mode > property should be specified on port nodes. However, the microchip > drivers read it from the switch node. > > Let the driver use the per-port property and fa