Re: [PATCH net-next 3/8] net: mscc: Add MDIO driver

2018-03-29 Thread Andrew Lunn
> > It sounds like the correct fix is for get_phy_id() to look at the > > error code for mdiobus_read(bus, addr, MII_PHYSID1). If it is EIO and > > maybe ENODEV, set *phy_id to 0x and return. The scan code > > should then do the correct thing. > > > > That could work indeed. Do you want m

Re: [PATCH net-next 3/8] net: mscc: Add MDIO driver

2018-03-29 Thread Alexandre Belloni
On 29/03/2018 at 16:40:41 +0200, Andrew Lunn wrote: > > > > + for (i = 0; i < PHY_MAX_ADDR; i++) { > > > > + if (mscc_miim_read(bus, i, MII_PHYSID1) < 0) > > > > + bus->phy_mask |= BIT(i); > > > > + } > > > > > > Why do this? Especially so for the ex

Re: [PATCH net-next 3/8] net: mscc: Add MDIO driver

2018-03-29 Thread Andrew Lunn
On Thu, Mar 29, 2018 at 04:05:44PM +0200, Alexandre Belloni wrote: > On 23/03/2018 at 21:49:39 +0100, Andrew Lunn wrote: > > On Fri, Mar 23, 2018 at 09:11:12PM +0100, Alexandre Belloni wrote: > > > Add a driver for the Microsemi MII Management controller (MIIM) found on > > > Microsemi SoCs. > > >

Re: [PATCH net-next 3/8] net: mscc: Add MDIO driver

2018-03-29 Thread Alexandre Belloni
On 23/03/2018 at 14:51:19 -0700, Florian Fainelli wrote: > > + writel(MSCC_MIIM_CMD_VLD | (mii_id << MSCC_MIIM_CMD_PHYAD_SHIFT) | > > + (regnum << MSCC_MIIM_CMD_REGAD_SHIFT) | MSCC_MIIM_CMD_OPR_READ, > > + miim->regs + MSCC_MIIM_REG_CMD); > > + > > + ret = mscc_miim_wait_ready

Re: [PATCH net-next 3/8] net: mscc: Add MDIO driver

2018-03-29 Thread Alexandre Belloni
On 23/03/2018 at 21:49:39 +0100, Andrew Lunn wrote: > On Fri, Mar 23, 2018 at 09:11:12PM +0100, Alexandre Belloni wrote: > > Add a driver for the Microsemi MII Management controller (MIIM) found on > > Microsemi SoCs. > > On Ocelot, there are two controllers, one is connected to the internal > > PH

Re: [PATCH net-next 3/8] net: mscc: Add MDIO driver

2018-03-23 Thread Florian Fainelli
On 03/23/2018 01:11 PM, Alexandre Belloni wrote: > Add a driver for the Microsemi MII Management controller (MIIM) found on > Microsemi SoCs. > On Ocelot, there are two controllers, one is connected to the internal > PHYs, the other one can communicate with external PHYs. > > Signed-off-by: Alexan

Re: [PATCH net-next 3/8] net: mscc: Add MDIO driver

2018-03-23 Thread Andrew Lunn
On Fri, Mar 23, 2018 at 09:11:12PM +0100, Alexandre Belloni wrote: > Add a driver for the Microsemi MII Management controller (MIIM) found on > Microsemi SoCs. > On Ocelot, there are two controllers, one is connected to the internal > PHYs, the other one can communicate with external PHYs. Hi Alex

[PATCH net-next 3/8] net: mscc: Add MDIO driver

2018-03-23 Thread Alexandre Belloni
Add a driver for the Microsemi MII Management controller (MIIM) found on Microsemi SoCs. On Ocelot, there are two controllers, one is connected to the internal PHYs, the other one can communicate with external PHYs. Signed-off-by: Alexandre Belloni --- drivers/net/ethernet/Kconfig | 1