diff options
author | 2010-01-09 22:24:34 +0000 | |
---|---|---|
committer | 2010-01-09 22:24:34 +0000 | |
commit | c949851a201f8b9a573903c09290c7257379f520 (patch) | |
tree | 7f200e417046542df841fcbb377beb24dba68050 | |
parent | dont try to prevent multiple concurrent runs of a devices start routine (diff) | |
download | wireguard-openbsd-c949851a201f8b9a573903c09290c7257379f520.tar.xz wireguard-openbsd-c949851a201f8b9a573903c09290c7257379f520.zip |
panic with a nice message if scsi_xs_sync_done gets called twice
rather than generating a fluffy printf.
-rw-r--r-- | sys/scsi/scsi_base.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 5e4c749d618..a44fbf49206 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.153 2010/01/09 21:04:55 dlg Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.154 2010/01/09 22:24:34 dlg Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -813,13 +813,8 @@ scsi_xs_sync_done(struct scsi_xfer *xs) { struct mutex *cookie = xs->cookie; - if (cookie == NULL) { -#ifdef DIAGNOSTIC - sc_print_addr(xs->sc_link); - printf("scsi_done already called on xs(%p)\n", xs); -#endif - return; - } + if (cookie == NULL) + panic("scsi_done calle twice on xs(%p)", xs); mtx_enter(cookie); xs->cookie = NULL; |