Message ID | 1330092923-10899-1-git-send-email-christian.riesch@omicron.at |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Hi Christian, On Fri, Feb 24, 2012 at 19:45:23, Christian Riesch wrote: > Hello Sudhakar, > > On Fri, Feb 24, 2012 at 2:02 PM, Rajashekhara, Sudhakar <sudhakar.raj@ti.com> wrote: > > On Thu, Feb 23, 2012 at 14:39:49, Christian Riesch wrote: > >> Hi, > >> I observed this behavior on a Texas Instruments AM1808 SoC (AM1808 > >> experimenter's kit) running the current mainline kernel: > >> [snip] > >> > >> According to the AM1808 Technical Reference Manual (sections 18.2.14.1 > >> and 18.3.3.34 in [1]), writing a 1 to the EMAC_SOFTRESET register > >> resets the EMAC module, but not the MDIO module. However, when I > >> comment out the code above, the MDIO control register is not affected > >> and the warning 'resetting idled controller' disappears. > >> > > > > But this was not the case for me. Even after commenting out the above lines, > > I could still see that MDIO was getting reset. > > Uh, I am sorry. I forgot to mention that there is a second > emac_write(EMAC_SOFTRESET,1); in emac_dev_stop() in davinci_emac.c. > This one must also be commented out to make the resetting idled controller > message go away. > > The patch below shows that changes that I did. May I please ask you to try > again with these changes? > I was able to reproduce the issue. I'll debug this further and get back to you. Regards, Sudhakar -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Christian, On Mon, Feb 27, 2012 at 15:44:54, Rajashekhara, Sudhakar wrote: > Hi Christian, > > On Fri, Feb 24, 2012 at 19:45:23, Christian Riesch wrote: > > Hello Sudhakar, > > > > On Fri, Feb 24, 2012 at 2:02 PM, Rajashekhara, Sudhakar <sudhakar.raj@ti.com> wrote: > > > On Thu, Feb 23, 2012 at 14:39:49, Christian Riesch wrote: > > >> Hi, > > >> I observed this behavior on a Texas Instruments AM1808 SoC (AM1808 > > >> experimenter's kit) running the current mainline kernel: > > >> > > [snip] > > > >> > > >> According to the AM1808 Technical Reference Manual (sections 18.2.14.1 > > >> and 18.3.3.34 in [1]), writing a 1 to the EMAC_SOFTRESET register > > >> resets the EMAC module, but not the MDIO module. However, when I > > >> comment out the code above, the MDIO control register is not affected > > >> and the warning 'resetting idled controller' disappears. > > >> > > > > > > But this was not the case for me. Even after commenting out the above lines, > > > I could still see that MDIO was getting reset. > > > > Uh, I am sorry. I forgot to mention that there is a second > > emac_write(EMAC_SOFTRESET,1); in emac_dev_stop() in davinci_emac.c. > > This one must also be commented out to make the resetting idled controller > > message go away. > > > > The patch below shows that changes that I did. May I please ask you to try > > again with these changes? > > > > I was able to reproduce the issue. I'll debug this further and get back to you. > I was going through the mailing list discussions where a work around for emac soft-reset tie-up to mdio controller has been proposed. I think this was a known issue on TI's da8xx family of devices. Please refer to the thread at http://www.spinics.net/lists/netdev/msg140465.html. Cyril, As you have mentioned in your patch, did you get any confirmation from TI designer regarding emac soft reset behavior? I see that nothing has been mentioned in the EMAC user guide. Thanks, Sudhakar -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c index 4b2f545..733d538 100644 --- a/drivers/net/ethernet/ti/davinci_emac.c +++ b/drivers/net/ethernet/ti/davinci_emac.c @@ -1290,10 +1290,10 @@ static int emac_hw_enable(struct emac_priv *priv) u32 val, mbp_enable, mac_control; /* Soft reset */ - emac_write(EMAC_SOFTRESET, 1); +/* emac_write(EMAC_SOFTRESET, 1); while (emac_read(EMAC_SOFTRESET)) cpu_relax(); - +*/ /* Disable interrupt & Set pacing for more interrupts initially */ emac_int_disable(priv); @@ -1672,7 +1672,7 @@ static int emac_dev_stop(struct net_device *ndev) netif_carrier_off(ndev); emac_int_disable(priv); cpdma_ctlr_stop(priv->dma); - emac_write(EMAC_SOFTRESET, 1); +/* emac_write(EMAC_SOFTRESET, 1);*/ if (priv->phydev) phy_disconnect(priv->phydev);