Module Name: src Committed By: cegger Date: Wed May 6 07:27:43 UTC 2009
Modified Files: src/sys/dev/ic: com.c Log Message: add KASSERT to identify when PR kern/40734 happens again. It happened to me twice and to Emmanuel Dreyfus (reported on port-amd64 ML) To generate a diff of this commit: cvs rdiff -u -r1.287 -r1.288 src/sys/dev/ic/com.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/com.c diff -u src/sys/dev/ic/com.c:1.287 src/sys/dev/ic/com.c:1.288 --- src/sys/dev/ic/com.c:1.287 Sat Jan 3 03:43:22 2009 +++ src/sys/dev/ic/com.c Wed May 6 07:27:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.287 2009/01/03 03:43:22 yamt Exp $ */ +/* $NetBSD: com.c,v 1.288 2009/05/06 07:27:42 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.287 2009/01/03 03:43:22 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.288 2009/05/06 07:27:42 cegger Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -1861,6 +1861,8 @@ if (COM_ISALIVE(sc) == 0) return (0); + KASSERT(regsp != NULL); + mutex_spin_enter(&sc->sc_lock); iir = CSR_READ_1(regsp, COM_REG_IIR); if (ISSET(iir, IIR_NOPEND)) {