[PATCH 1/5] phylib: bus reset function

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Sep 21 04:06:58 EDT 2012


On 08:34 Fri 21 Sep     , Sascha Hauer wrote:
> On Thu, Sep 20, 2012 at 08:23:32PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 17:31 Thu 20 Sep     , Renaud Barbier wrote:
> > > Added an entry point for a bus reset function.
> > > 
> > > Signed-off-by: Renaud Barbier <renaud.barbier at ge.com>
> > > ---
> > >  drivers/net/phy/phy.c |    3 +++
> > >  include/miidev.h      |    1 +
> > >  2 files changed, 4 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> > > index 5406ea3..d9f5409 100644
> > > --- a/drivers/net/phy/phy.c
> > > +++ b/drivers/net/phy/phy.c
> > > @@ -129,6 +129,9 @@ int phy_device_connect(struct eth_device *edev, struct mii_device *bus, int addr
> > >  	unsigned int i;
> > >  	int ret = -EINVAL;
> > >  
> > > +	if (bus->reset)
> > > +		bus->reset(bus);
> > > +
> > I do not like this we should not touch the bus at phy connect
> 
> Then please make a suggestion where it should be then. I also have some
> drivers where this function could be used.
I have too the need of a reset

I get a big issue on reset the mii bus at eth open

my only idea was to move the phy detect awqy from the eth_open to the mii bus
probe

but this will increase the boot time as we do not need to probe the phy if we
do not use the network

Best Regards,
J.



More information about the barebox mailing list