Re: [PATCH] net: macb: do not disable MDIO bus when closing interface

2018-08-13 Thread Claudiu Beznea
On 10.08.2018 09:22, Anssi Hannula wrote: > On 9.8.2018 18:14, Andrew Lunn wrote: >> Hi Anssi > > Hi! > >>> macb_reset_hw() is called in init path too, I only see it in macb_close() and macb_open() called from macb_init_hw(). though, so maybe clearing >>> all bits is intentional / wanted to

Re: [PATCH] net: macb: do not disable MDIO bus when closing interface

2018-08-09 Thread Anssi Hannula
On 9.8.2018 18:14, Andrew Lunn wrote: > Hi Anssi Hi! >> macb_reset_hw() is called in init path too, though, so maybe clearing >> all bits is intentional / wanted to get the controller to a known state, >> even though the comment only mentions TX/RX? > You need to be careful here. Once of_mdiobus_

Re: [PATCH] net: macb: do not disable MDIO bus when closing interface

2018-08-09 Thread Andrew Lunn
Hi Anssi > macb_reset_hw() is called in init path too, though, so maybe clearing > all bits is intentional / wanted to get the controller to a known state, > even though the comment only mentions TX/RX? You need to be careful here. Once of_mdiobus_register() is called, the MDIO should be usable.

Re: [PATCH] net: macb: do not disable MDIO bus when closing interface

2018-08-09 Thread Anssi Hannula
On 9.8.2018 11:26, Claudiu Beznea wrote: > On 08.08.2018 15:19, Anssi Hannula wrote: >> macb_close() calls macb_reset_hw() which zeroes NCR register, including >> the MPE (Management Port Enable) bit. >> >> This will prevent accessing any other PHYs for other Ethernet MACs on >> the MDIO bus which

Re: [PATCH] net: macb: do not disable MDIO bus when closing interface

2018-08-09 Thread Claudiu Beznea
On 08.08.2018 15:19, Anssi Hannula wrote: > macb_close() calls macb_reset_hw() which zeroes NCR register, including > the MPE (Management Port Enable) bit. > > This will prevent accessing any other PHYs for other Ethernet MACs on > the MDIO bus which is still registered. > > Fix that by keepin

[PATCH] net: macb: do not disable MDIO bus when closing interface

2018-08-08 Thread Anssi Hannula
macb_close() calls macb_reset_hw() which zeroes NCR register, including the MPE (Management Port Enable) bit. This will prevent accessing any other PHYs for other Ethernet MACs on the MDIO bus which is still registered. Fix that by keeping the MPE bit set. Signed-off-by: Anssi Hannula --- driv