atom feed14 messages in org.freebsd.freebsd-armRe: Guruplug Server Plus working to s...
FromSent OnAttachments
Milan ObuchOct 20, 2010 2:09 pm.guruplugplus, .dts, .guruplugplus
Gary JennejohnOct 21, 2010 1:43 am 
Milan ObuchOct 21, 2010 2:18 am 
Milan ObuchOct 21, 2010 2:12 pm 
Kristof ProvostOct 24, 2010 4:14 am 
Milan ObuchOct 24, 2010 2:22 pm 
Kristof ProvostOct 25, 2010 1:16 pm 
Milan ObuchOct 26, 2010 12:59 pm.dmesg
Kristof ProvostOct 26, 2010 2:19 pm 
Milan ObuchOct 27, 2010 7:55 am 
Rafal JaworowskiOct 27, 2010 9:43 am 
Milan ObuchOct 27, 2010 1:58 pm.h, .c, .c, 1 more
Rafal JaworowskiOct 30, 2010 6:02 am 
Milan ObuchNov 2, 2010 2:42 pm 
Subject:Re: Guruplug Server Plus working to some extent...
From:Kristof Provost (kris@sigsegv.be)
Date:Oct 24, 2010 4:14:15 am
List:org.freebsd.freebsd-arm

On 2010-10-21 23:13:21 (+0200), Milan Obuch <free@dino.sk> wrote:

Also, when I put mge1's ethernet link address (MAC) into .dts file, it is initialised with this value, as expected. But nothing else changed - receiving frames works, sending does not.

Maybe it's time for some mge's source tweaking, but I have absolutelly no idea where to begin.

I suspect the PHY asignment. The current code tries to retrieve the PHY number from the dts but then probes for PHYs and uses the first one.

Can you try the following patch? I unfortunately don't have hardware with two PHYs. Make sure you have the correct phy number set for mge1 (probably just 0x1) in your dts.

It's probably not a final solution though as it relies on the dts for information which can be probed automatically.

Index: dev/mge/if_mge.c =================================================================== --- dev/mge/if_mge.c (revision 214256) +++ dev/mge/if_mge.c (working copy) @@ -626,7 +626,6 @@ mge_attach(device_t dev) { struct mge_softc *sc; - struct mii_softc *miisc; struct ifnet *ifp; uint8_t hwaddr[ETHER_ADDR_LEN]; int i, error, phy; @@ -717,8 +716,7 @@ sc->mii = device_get_softc(sc->miibus);

/* Tell the MAC where to find the PHY so autoneg works */ - miisc = LIST_FIRST(&sc->mii->mii_phys); - MGE_WRITE(sc, MGE_REG_PHYDEV, miisc->mii_phy); + MGE_WRITE(sc, MGE_REG_PHYDEV, phy);

/* Attach interrupt handlers */ for (i = 0; i < 2; ++i) {

Regards, Kristof