Module Name:    src
Committed By:   tsutsui
Date:           Sat May  9 03:54:10 UTC 2009

Modified Files:
        src/sys/dev/ic: i82596.c

Log Message:
Also check if cache line alignment is power of two in KASSERT().


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/i82596.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/i82596.c
diff -u src/sys/dev/ic/i82596.c:1.21 src/sys/dev/ic/i82596.c:1.22
--- src/sys/dev/ic/i82596.c:1.21	Sat May  9 03:22:20 2009
+++ src/sys/dev/ic/i82596.c	Sat May  9 03:54:10 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: i82596.c,v 1.21 2009/05/09 03:22:20 tsutsui Exp $ */
+/* $NetBSD: i82596.c,v 1.22 2009/05/09 03:54:10 tsutsui Exp $ */
 
 /*
  * Copyright (c) 2003 Jochen Kunz.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.21 2009/05/09 03:22:20 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.22 2009/05/09 03:54:10 tsutsui Exp $");
 
 /* autoconfig and device stuff */
 #include <sys/param.h>
@@ -531,7 +531,7 @@
 	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
 	int n;
 
-	KASSERT(sc->sc_cl_align > 0);
+	KASSERT(sc->sc_cl_align > 0 && powerof2(sc->sc_cl_align));
 
 	/* allocate memory for shared DMA descriptors */
 	if (bus_dmamem_alloc(sc->sc_dmat, IEE_SHMEM_MAX, PAGE_SIZE, 0,

Reply via email to