Date: Tue, 7 Nov 2006 22:07:54 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 109488 for review Message-ID: <200611072207.kA7M7slo065950@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109488 Change 109488 by cognet@cognet on 2006/11/07 22:07:40 Backout previous submit, ixpnpe and npe have different mutexes so it won't work Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#12 edit .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_npe.c#6 edit .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_npevar.h#5 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#12 (text+ko) ==== @@ -655,7 +655,9 @@ NPE_ASSERT_LOCKED(sc); + NPE_UNLOCK(sc); /* XXX */ npe_updatestats(sc); /* update + clear stats */ + NPE_LOCK(sc); bus_dmamap_sync(sc->sc_stats_tag, sc->sc_stats_map, BUS_DMASYNC_POSTREAD); @@ -1236,7 +1238,7 @@ msg[0] = NPE_RESETSTATS << NPE_MAC_MSGID_SHL; msg[1] = sc->sc_stats_phys; /* physical address of stat block */ - return ixpnpe_sendandrecvmsg_locked(sc->sc_npe, msg, msg); + return ixpnpe_sendandrecvmsg(sc->sc_npe, msg, msg); } #if 0 ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_npe.c#6 (text+ko) ==== @@ -1352,26 +1352,16 @@ * make other locking confusing. */ int -ixpnpe_sendandrecvmsg_locked(struct ixpnpe_softc *sc, +ixpnpe_sendandrecvmsg(struct ixpnpe_softc *sc, const uint32_t send[2], uint32_t recv[2]) { int error; + mtx_lock(&sc->sc_mtx); error = ixpnpe_sendmsg_locked(sc, send); if (error == 0) error = ixpnpe_recvmsg_locked(sc, recv); + mtx_unlock(&sc->sc_mtx); return error; } - -int -ixpnpe_sendandrecvmsg(struct ixpnpe_softc *sc, - const uint32_t send[2], uint32_t recv[2]) -{ - int error; - - mtx_lock(&sc->sc_mtx); - error = ixpnpe_sendandrecvmsg_locked(sc, send, recv); - mtx_unlock(&sc->sc_mtx); - return (error); -} ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_npevar.h#5 (text+ko) ==== @@ -89,6 +89,4 @@ int ixpnpe_sendandrecvmsg(struct ixpnpe_softc *, const uint32_t send[2], uint32_t recv[2]); -int ixpnpe_sendandrecvmsg_locked(struct ixpnpe_softc *, - const uint32_t send[2], uint32_t recv[2]); #endif /* _IXP425_NPEVAR_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611072207.kA7M7slo065950>