All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: Linux-MIPS <linux-mips@linux-mips.org>, Netdev@vger.kernel.org
Subject: Re: alchemy/gpr: au1000_eth regression with v2.6.37rc2
Date: Fri, 19 Nov 2010 11:29:45 +0100	[thread overview]
Message-ID: <4CE65199.7030007@grandegger.com> (raw)
In-Reply-To: <201011182330.08488.florian@openwrt.org>

Hello Florian,

On 11/18/2010 11:30 PM, Florian Fainelli wrote:
> Hello Wolfgang,
> 
> Le Thursday 18 November 2010 20:59:15, Wolfgang Grandegger a écrit :
>> Hello,
>>
>> I just realized that the v2.6.37-rc2 kernel does not boot any more on
>> the Alchemy GPR board. It works fine with v2.6.36. It hangs in the
>> probe function of the au1000_eth driver when probing the second
>> ethernet port (eth1):
>>
>>   au1000_eth_mii: probed
>>   au1000-eth au1000-eth.0: (unregistered net_device): attached PHY driver
>> [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1) au1000-eth au1000-eth.0:
>> eth0: Au1xx0 Ethernet found at 0x10500000, irq 35 au1000_eth: au1000_eth
>> version 1.7 Pete Popov <ppopov@embeddedalley.com> ... hangs ...
>>
>> Similar messages should follow for eth1. I narrowed down (bisect'ed) the
>> problem to commit:
>>
>>   commit d0e7cb5d401695809ba8c980124ab1d8c66efc8b
>>   Author: Florian Fainelli <florian@openwrt.org>
>>   Date:   Wed Sep 8 11:15:13 2010 +0000
>>
>>     au1000-eth: remove volatiles, switch to I/O accessors
>>
>>     Remove all the volatile keywords where they were used, switch to using
>> the proper readl/writel accessors.
>>
>>     Signed-off-by: Florian Fainelli <florian@openwrt.org>
>>     Signed-off-by: David S. Miller <davem@davemloft.net>
>>
>> The kernel actually hangs when accessing "&aup->mac->mii_control" in
>> au1000_mdio_read(), but only for eth1. Any idea what does go wrong?
> 
> I do not understand so far while it hangs only for eth1. My device only has 
> one ethernet MAC, so I could not notice the problem. Looking at this close, 
> there are a couple of u32 const* usages in au1000_mdio_{read,write} which are 
> looking wrong to me now. Can you try to remove these?

That did not help.

>> In principle, I do not want to access the MII regs of the MAC because
>> eth0 and eth1 are connected to switches. But that's not possible, even
>> with "aup->phy_static_config=1" and "aup->phy_addr=0".
> 
> If you think this is another issue, I will fix it in another patch.

Accessing the MII registers of the MAC should not hang the system even
if I do not need to. First I want to  understand why. Looks like a wired
optimizer issue.

BTW: why do you use readl() and writel() instead of the usual au_readl()
and au_writel() to access memory mapped cpu registers? It did not help,
anyway.

Wolfgang

  reply	other threads:[~2010-11-19 10:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 19:59 alchemy/gpr: au1000_eth regression with v2.6.37rc2 Wolfgang Grandegger
2010-11-18 22:30 ` Florian Fainelli
2010-11-19 10:29   ` Wolfgang Grandegger [this message]
2010-11-19 10:46     ` Florian Fainelli
2010-11-23 15:01       ` Wolfgang Grandegger
2010-11-23 15:33         ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE65199.7030007@grandegger.com \
    --to=wg@grandegger.com \
    --cc=Netdev@vger.kernel.org \
    --cc=florian@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.