Module Name: src Committed By: cegger Date: Mon Aug 16 06:05:07 UTC 2010
Modified Files: src/sys/dev/ieee1394: fwdev.c Log Message: do not hold mutexes when calling tsleep(9). Fixes LOCKDEBUG panics To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ieee1394/fwdev.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/ieee1394/fwdev.c diff -u src/sys/dev/ieee1394/fwdev.c:1.22 src/sys/dev/ieee1394/fwdev.c:1.23 --- src/sys/dev/ieee1394/fwdev.c:1.22 Sun May 23 18:56:58 2010 +++ src/sys/dev/ieee1394/fwdev.c Mon Aug 16 06:05:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fwdev.c,v 1.22 2010/05/23 18:56:58 christos Exp $ */ +/* $NetBSD: fwdev.c,v 1.23 2010/08/16 06:05:07 cegger Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fwdev.c,v 1.22 2010/05/23 18:56:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fwdev.c,v 1.23 2010/08/16 06:05:07 cegger Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -248,7 +248,9 @@ if (slept == 0) { slept = 1; ir->flag |= FWXFERQ_WAKEUP; + mutex_exit(&fc->fc_mtx); err = tsleep(ir, FWPRI, "fw_read", hz); + mutex_enter(&fc->fc_mtx); ir->flag &= ~FWXFERQ_WAKEUP; if (err == 0) goto readloop; @@ -324,7 +326,9 @@ if (err) goto out; #endif + mutex_exit(&fc->fc_mtx); err = tsleep(it, FWPRI, "fw_write", hz); + mutex_enter(&fc->fc_mtx); if (err) goto out; goto isoloop;