Re: [PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0]

2017-01-18 Thread David Miller
From: Vivien Didelot Date: Tue, 17 Jan 2017 20:41:39 -0500 > Now that the DSA Ethernet switches are true Linux devices, the CPU > switch is not necessarily the first one. If its address is higher than > the second switch on the same MDIO bus, its index will be 1, not 0. > > Avoid any confusion b

Re: [PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0]

2017-01-18 Thread Florian Fainelli
On 01/18/2017 04:50 AM, Andrew Lunn wrote: > On Tue, Jan 17, 2017 at 08:41:39PM -0500, Vivien Didelot wrote: >> Now that the DSA Ethernet switches are true Linux devices, the CPU >> switch is not necessarily the first one. If its address is higher than >> the second switch on the same MDIO bus, its

Re: [PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0]

2017-01-18 Thread Florian Fainelli
On 01/17/2017 05:41 PM, Vivien Didelot wrote: > Now that the DSA Ethernet switches are true Linux devices, the CPU > switch is not necessarily the first one. If its address is higher than > the second switch on the same MDIO bus, its index will be 1, not 0. > > Avoid any confusion by using dst->cp

Re: [PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0]

2017-01-18 Thread Andrew Lunn
On Tue, Jan 17, 2017 at 08:41:39PM -0500, Vivien Didelot wrote: > Now that the DSA Ethernet switches are true Linux devices, the CPU > switch is not necessarily the first one. If its address is higher than > the second switch on the same MDIO bus, its index will be 1, not 0. > > Avoid any confusio

[PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0]

2017-01-17 Thread Vivien Didelot
Now that the DSA Ethernet switches are true Linux devices, the CPU switch is not necessarily the first one. If its address is higher than the second switch on the same MDIO bus, its index will be 1, not 0. Avoid any confusion by using dst->cpu_switch instead of dst->ds[0]. Signed-off-by: Vivien D