Date: Sat, 4 Feb 2006 09:03:47 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 91042 for review Message-ID: <200602040903.k1493lFu093402@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=91042 Change 91042 by imp@imp_plunger on 2006/02/04 09:02:46 Fix spelling error Move locking to avoid nesting the locking and to give the locking a smaller scope. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/if_ate.c#26 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#26 (text+ko) ==== @@ -248,7 +248,7 @@ * method. */ static void -ate_setmcaf(struct ate_softc *sc) +ate_setmcast(struct ate_softc *sc) { uint32_t index; uint32_t mcaf[2]; @@ -267,8 +267,18 @@ af[index >> 3] |= 1 << (index & 7); } IF_ADDR_UNLOCK(sc->ifp); + + /* + * Write the hash to the hash register. This card can also + * accept unicast packets as well as multicast packets using this + * register for easier bridging operations, but we don't take + * advantage of that. Locks here are to avoid LOR with the + * IF_ADDR_LOCK, but might not be strictly necessary. + */ + ATE_LOCK(sc); WR4(sc, ETH_HSL, mcaf[0]); WR4(sc, ETH_HSH, mcaf[1]); + ATE_UNLOCK(sc); } static int @@ -880,10 +890,8 @@ case SIOCADDMULTI: case SIOCDELMULTI: /* update multicast filter list. */ - ATE_LOCK(sc); ate_setmcast(sc); error = 0; - ATE_UNLOCK(sc); break; default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602040903.k1493lFu093402>