On Sun, 2014-05-18 at 22:27 +0800, Chen-Yu Tsai wrote:
> Hi,
>
> On Sun, May 18, 2014 at 10:14 PM, Ian Campbell <[email protected]> wrote:
> > My cubieboard2 (which uses the designware GMAC driver) doesn't seem to
> > work with my 100MB netgear hub. From both Linux (3.14.4) and u-boot
>
> IIRC the associated DT and clock drivers were merged in 3.15.
> 3.14 only had stmmac glue layer merged.
>
> Without them, either the driver won't probe, or you're at the mercy of
> whatever u-boot setup.
The Debian kernel has backports of the gmac stuff from 3.15 which I'd
forgotten about, sorry.
v3.15-rc5 is now in Debian experimental so once the buildd catches up
I'll try that too just to check.
> > (either mainline + sunxi upstreaming patches + cb2 bits, or sunxi repo,
> > doesn't matter) it doesn't seem to be able to generate traffic, despite
> > it thinking there is a link.
>
> What is the link speed it thinks it has? Is it correct?
It's reporting:
libphy: stmmac-0:01 - Link is Up - 100/Half
which I think is correct.
Settings for eth0:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half
100baseT/Half
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Half
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000003f (63)
drv probe link timer ifdown ifup
Link detected: yes
When it is working ethtool says:
Settings for eth0:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half
100baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x0000003f (63)
drv probe link timer ifdown ifup
Link detected: yes
The main difference is full vs. half duplex, so maybe that's the issue
rather that 100 vs 1000 mbits.
> Also is the GMAC clock set to the correct setting for MII mode?
How can I check that? Furtling around in some clk cfg register I
suppose? I'll dig into the docs.
> > A cubietruck plugged into the same hub works fine (as do various other
> > bits of non-sunxi kit) and the cubieboard works fine if I plug it
> > directly into the uplink cable which goes to a gigabit cisco switch.
>
> Sounds like an auto-negotiation problem. IIRC we've encountered this
> while working on GMAC support. You must always select PHY_GIGE, even
> if the link/phy can only do 100M. This is to make U-boot's miiphy interface
> be aware of the 1000M flags, and correctly mask them out.
This seems to already be done by sunxi-common.h I u-boot.
> > TBH this hub is probably due an upgrade, but I wondered if anyone had
> > any ideas of things I should try first.
>
> Hope this helps. I didn't leave any notes around.
Thanks.
Ian.
>
>
> Cheers,
> ChenYu
>
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.