RE: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while using mdio bus

2015-06-22 Thread Duan Andy
From: Andrew Lunn Sent: Tuesday, June 23, 2015 11:44 AM > To: Duan Fugang-B38611 > Cc: Florian Fainelli; David Miller; Cory Tusar; netdev > Subject: Re: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while > using mdio bus > > On Tue, Jun 23, 2015 at 03:12:15AM +000

Re: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while using mdio bus

2015-06-22 Thread Florian Fainelli
2015-06-22 19:52 GMT-07:00 Andrew Lunn : >> > int mii_id, int regnum) { >> > struct fec_enet_private *fep = bus->priv; >> > unsigned long time_left; >> > + int ret; >> > + >> > + ret = clk_prepare_enable(fep->clk_ipg); >> > + if (ret) >> > + return ret; >> > >> > fep->m

Re: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while using mdio bus

2015-06-22 Thread Andrew Lunn
On Tue, Jun 23, 2015 at 03:12:15AM +, Duan Andy wrote: > From: Andrew Lunn Sent: Tuesday, June 23, 2015 10:52 AM > > To: Duan Fugang-B38611; Florian Fainelli > > Cc: David Miller; Cory Tusar; netdev > > Subject: Re: [PATCHv3 net-next] net: fec: Ensure clocks are enabled

RE: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while using mdio bus

2015-06-22 Thread Duan Andy
From: Andrew Lunn Sent: Tuesday, June 23, 2015 10:52 AM > To: Duan Fugang-B38611; Florian Fainelli > Cc: David Miller; Cory Tusar; netdev > Subject: Re: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while > using mdio bus > > > > int mii_id, int r

Re: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while using mdio bus

2015-06-22 Thread Andrew Lunn
> > int mii_id, int regnum) { > > struct fec_enet_private *fep = bus->priv; > > unsigned long time_left; > > + int ret; > > + > > + ret = clk_prepare_enable(fep->clk_ipg); > > + if (ret) > > + return ret; > > > > fep->mii_timeout = 0; > > init_completion(&fep->mdio

RE: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while using mdio bus

2015-06-22 Thread Duan Andy
From: Andrew Lunn Sent: Sunday, June 21, 2015 2:38 AM > To: David Miller > Cc: Duan Fugang-B38611; Duan Fugang-B38611; Cory Tusar; netdev; Andrew > Lunn > Subject: [PATCHv3 net-next] net: fec: Ensure clocks are enabled while > using mdio bus > > When a switch is attached to the mdio bus, the mdio