PERFORCE change 91042 for review
Warner Losh
imp at FreeBSD.org
Sat Feb 4 01:03:49 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=91042
Change 91042 by imp at 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:
More information about the p4-projects
mailing list