NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-evbarm/53317: awge(4) with static address doesn't work



The following reply was made to PR port-evbarm/53317; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: Aymeric Vincent <aymericvincent%free.fr@localhost>
Subject: Re: port-evbarm/53317: awge(4) with static address doesn't work
Date: Sun, 27 May 2018 14:36:48 +0300

 On Sun, May 27, 2018 at 09:30:02 +0000, Aymeric Vincent wrote:
 
 >  > If I configure static address, then interface doesn't send/receive
 >  > packets UNTIL the first time you call ifconfig awge0.  At that point
 >  > DAD happens and the interface comes to life.
 >  
 >  I remember needing the following patch to make the awge of the DE0
 >  nanosoc work. Would it help in your situation?
 >  
 >  diff --git a/sys/dev/ic/dwc_gmac.c b/sys/dev/ic/dwc_gmac.c
 >  index ce5635db0d3f..aed5844e2f21 100644
 >  --- a/sys/dev/ic/dwc_gmac.c
 >  +++ b/sys/dev/ic/dwc_gmac.c
 >  @@ -999,6 +999,9 @@ dwc_gmac_queue(struct dwc_gmac_softc *sc, struct mbuf *m0)
 >   	sc->sc_txq.t_desc[first].ddesc_status =
 >   	    htole32(DDESC_STATUS_OWNEDBYDEV);
 >   
 >  +	bus_dmamap_sync(sc->sc_dmat, map, 0, map->dm_mapsize,
 >  +	    BUS_DMASYNC_PREWRITE);
 >  +
 >   	return 0;
 >   }
 
 Thanks for the tip, but I don't think so.  Tried it anyway and it in
 fact didn't.
 
 What happens here I think is that there's a complex interplay between
 generic interface code and the driver code and what happens when -
 start, activate, and whatever else - it's been a while since I looked.
 E.g. our ne(4) driver seems to be now more or less unusable because of
 that.
 
 My guest would be that most arm gizmos are used in a DHCP environment
 so with the way driver is written the right things happen when you
 bring it up with dhcp.  But when you configure the address statically
 some of those driver methods are not called and some initialization
 doesn't happen.  Calling ifconfig probably just prods that lazy init
 and makes the driver operational.
 
 -uwe
 


Home | Main Index | Thread Index | Old Index