Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-05-02 Thread Josh Cartwright
On Mon, May 02, 2016 at 12:08:50PM -0700, Florian Fainelli wrote: > On 02/05/16 11:36, Josh Cartwright wrote: > > On Fri, Apr 29, 2016 at 02:40:53PM +0200, Nicolas Ferre wrote: > > [..] > >>> static int macb_mii_init(struct macb *bp) > >>> { > >>> struct macb_platform_data *pdata; > >>>

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-05-02 Thread Florian Fainelli
On 02/05/16 11:36, Josh Cartwright wrote: > On Fri, Apr 29, 2016 at 02:40:53PM +0200, Nicolas Ferre wrote: > [..] >>> static int macb_mii_init(struct macb *bp) >>> { >>> struct macb_platform_data *pdata; >>> struct device_node *np; >>> - int err = -ENXIO, i; >>> + int err = -ENXIO;

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-05-02 Thread Josh Cartwright
On Fri, Apr 29, 2016 at 02:40:53PM +0200, Nicolas Ferre wrote: [..] > > static int macb_mii_init(struct macb *bp) > > { > > struct macb_platform_data *pdata; > > struct device_node *np; > > - int err = -ENXIO, i; > > + int err = -ENXIO; > > > > /* Enable management port */ > >

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-29 Thread Andrew Lunn
> > +static int macb_mii_of_init(struct macb *bp, struct device_node *np) > > +{ > > + struct device_node *mdio; > > + int err, i; > > + > > + mdio = of_get_child_by_name(np, "mdio"); > > + if (mdio) > > + return of_mdiobus_register(bp->mii_bus, mdio); > > + > > +

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-29 Thread Andrew Lunn
> diff --git a/drivers/net/ethernet/cadence/macb.c > b/drivers/net/ethernet/cadence/macb.c > index eec3200..d843bc9 100644 > --- a/drivers/net/ethernet/cadence/macb.c > +++ b/drivers/net/ethernet/cadence/macb.c > @@ -419,11 +419,62 @@ static int macb_mii_probe(struct net_device *dev) >

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-29 Thread Nicolas Ferre
Le 29/04/2016 14:25, Josh Cartwright a écrit : > On Thu, Apr 28, 2016 at 07:34:59PM -0500, Josh Cartwright wrote: >> On Thu, Apr 28, 2016 at 11:23:15PM +0200, Andrew Lunn wrote: >>> On Thu, Apr 28, 2016 at 04:03:57PM -0500, Josh Cartwright wrote: On Thu, Apr 28, 2016 at 08:59:32PM +0200,

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-29 Thread Josh Cartwright
On Thu, Apr 28, 2016 at 07:34:59PM -0500, Josh Cartwright wrote: > On Thu, Apr 28, 2016 at 11:23:15PM +0200, Andrew Lunn wrote: > > On Thu, Apr 28, 2016 at 04:03:57PM -0500, Josh Cartwright wrote: > > > On Thu, Apr 28, 2016 at 08:59:32PM +0200, Andrew Lunn wrote: > > > > On Thu, Apr 28, 2016 at

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Josh Cartwright
On Thu, Apr 28, 2016 at 11:23:15PM +0200, Andrew Lunn wrote: > On Thu, Apr 28, 2016 at 04:03:57PM -0500, Josh Cartwright wrote: > > On Thu, Apr 28, 2016 at 08:59:32PM +0200, Andrew Lunn wrote: > > > On Thu, Apr 28, 2016 at 01:55:27PM -0500, Nathan Sullivan wrote: > > > > On Thu, Apr 28, 2016 at

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Andrew Lunn
On Thu, Apr 28, 2016 at 04:03:57PM -0500, Josh Cartwright wrote: > On Thu, Apr 28, 2016 at 08:59:32PM +0200, Andrew Lunn wrote: > > On Thu, Apr 28, 2016 at 01:55:27PM -0500, Nathan Sullivan wrote: > > > On Thu, Apr 28, 2016 at 08:43:03PM +0200, Andrew Lunn wrote: > > > > > I agree that is a valid

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Josh Cartwright
On Thu, Apr 28, 2016 at 08:59:32PM +0200, Andrew Lunn wrote: > On Thu, Apr 28, 2016 at 01:55:27PM -0500, Nathan Sullivan wrote: > > On Thu, Apr 28, 2016 at 08:43:03PM +0200, Andrew Lunn wrote: > > > > I agree that is a valid fix for AT91, however it won't solve our > > > > problem, since > > > >

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Andrew Lunn
On Thu, Apr 28, 2016 at 01:03:15PM -0700, Florian Fainelli wrote: > On 28/04/16 11:59, Andrew Lunn wrote: > > On Thu, Apr 28, 2016 at 01:55:27PM -0500, Nathan Sullivan wrote: > >> On Thu, Apr 28, 2016 at 08:43:03PM +0200, Andrew Lunn wrote: > I agree that is a valid fix for AT91, however it

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Florian Fainelli
On 28/04/16 11:59, Andrew Lunn wrote: > On Thu, Apr 28, 2016 at 01:55:27PM -0500, Nathan Sullivan wrote: >> On Thu, Apr 28, 2016 at 08:43:03PM +0200, Andrew Lunn wrote: I agree that is a valid fix for AT91, however it won't solve our problem, since we have no children on the second

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Andrew Lunn
On Thu, Apr 28, 2016 at 01:55:27PM -0500, Nathan Sullivan wrote: > On Thu, Apr 28, 2016 at 08:43:03PM +0200, Andrew Lunn wrote: > > > I agree that is a valid fix for AT91, however it won't solve our problem, > > > since > > > we have no children on the second ethernet MAC in our devices' device

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Nathan Sullivan
On Thu, Apr 28, 2016 at 08:43:03PM +0200, Andrew Lunn wrote: > > I agree that is a valid fix for AT91, however it won't solve our problem, > > since > > we have no children on the second ethernet MAC in our devices' device > > trees. I'm > > starting to feel like our second MAC shouldn't even

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Andrew Lunn
> I agree that is a valid fix for AT91, however it won't solve our problem, > since > we have no children on the second ethernet MAC in our devices' device trees. > I'm > starting to feel like our second MAC shouldn't even really register the MDIO > bus > since it isn't being used - maybe

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Nathan Sullivan
On Thu, Apr 28, 2016 at 06:32:07PM +0200, Andrew Lunn wrote: > > Hmm, are AT91 platforms special in this regard? As far as I can tell, this > > driver (macb) and Marvell PXA are the only ethernet drivers that call > > mdiobus_scan directly, and PXA does it on a known address. I do see that > >

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Andrew Lunn
> Hmm, are AT91 platforms special in this regard? As far as I can tell, this > driver (macb) and Marvell PXA are the only ethernet drivers that call > mdiobus_scan directly, and PXA does it on a known address. I do see that there > are trees that use macb and don't have a phy listed, which is

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Nathan Sullivan
On Thu, Apr 28, 2016 at 05:44:14PM +0200, Nicolas Ferre wrote: > Le 28/04/2016 16:46, Nathan Sullivan a écrit : > > Since of_mdiobus_register and mdiobus_register will scan automatically, > > do not manually scan for PHY devices in the macb ethernet driver. Doing > > so will result in many

Re: [PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Nicolas Ferre
Le 28/04/2016 16:46, Nathan Sullivan a écrit : > Since of_mdiobus_register and mdiobus_register will scan automatically, > do not manually scan for PHY devices in the macb ethernet driver. Doing > so will result in many nonexistent PHYs on the MDIO bus if the MDIO > lines are floating or grounded,

[PATCH v2] net: macb: do not scan PHYs manually

2016-04-28 Thread Nathan Sullivan
Since of_mdiobus_register and mdiobus_register will scan automatically, do not manually scan for PHY devices in the macb ethernet driver. Doing so will result in many nonexistent PHYs on the MDIO bus if the MDIO lines are floating or grounded, such as when they are not used. Signed-off-by: Nathan