PERFORCE change 93810 for review

Olivier Houchard cognet at FreeBSD.org
Wed Mar 22 20:53:38 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=93810

Change 93810 by cognet at cognet on 2006/03/22 20:53:19

	Change locking so that ate_setmcast() has to be called with the 
	ATE_LOCK. Doing the lock inside ate_setmcast would lead to lock
	recursion, because ifinit_locked() calls it.

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/if_ate.c#46 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#46 (text+ko) ====

@@ -300,10 +300,8 @@
 	 * 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
@@ -902,7 +900,9 @@
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
 		/* update multicast filter list. */
+		ATE_LOCK(sc);
 		ate_setmcast(sc);
+		ATE_UNLOCK(sc);
 		error = 0;
 		break;
 


More information about the p4-projects mailing list