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: Aymeric Vincent <aymericvincent%free.fr@localhost>
To: Valery Ushakov <uwe%stderr.spb.ru@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: port-evbarm/53317: awge(4) with static address doesn't work
Date: Sun, 27 May 2018 15:27:24 +0200

 Valery Ushakov <uwe%stderr.spb.ru@localhost> writes:
 
 > Thanks for the tip, but I don't think so.  Tried it anyway and it in
 > fact didn't.
 
 Hm, sorry. But I have another patch up my sleeve. :-)
 
 From the datasheet of the Cyclone V (which uses a more recent version of
 the controller), the main mac address is sampled by the ethernet chip
 when writing to the lower bits. I don't know if this applies also to
 "older" revisions of the chip.
 
 I understand it's not the way you're pursuing the analysis of the
 problem, but FWIW, I use awge on the Cyclone V with a static IP address.
 
 diff --git a/sys/dev/ic/dwc_gmac.c b/sys/dev/ic/dwc_gmac.c
 index ce5635db0d3f..29de471d6a45 100644
 --- a/sys/dev/ic/dwc_gmac.c
 +++ b/sys/dev/ic/dwc_gmac.c
 @@ -323,8 +323,9 @@ dwc_gmac_write_hwaddr(struct dwc_gmac_softc *sc,
  	lo = enaddr[0] | (enaddr[1] << 8) | (enaddr[2] << 16)
  	    | (enaddr[3] << 24);
  	hi = enaddr[4] | (enaddr[5] << 8);
 -	bus_space_write_4(sc->sc_bst, sc->sc_bsh, AWIN_GMAC_MAC_ADDR0LO, lo);
  	bus_space_write_4(sc->sc_bst, sc->sc_bsh, AWIN_GMAC_MAC_ADDR0HI, hi);
 +	delay(1);
 +	bus_space_write_4(sc->sc_bst, sc->sc_bsh, AWIN_GMAC_MAC_ADDR0LO, lo);
  }
  
  static int
 
 
 Regards,
  Aymeric
 


Home | Main Index | Thread Index | Old Index