diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-09 22:24:35 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-09 22:24:35 +0000 |
commit | f8c751b234f6d4b295b93cdbefa799ac69c849f2 (patch) | |
tree | d03c1e6511228a35c53e9bf63197a88e42fe0224 /sys/scsi | |
parent | f530cae7088891a665f204338f63af142add258d (diff) |
panic with a nice message if scsi_xs_sync_done gets called twice
rather than generating a fluffy printf.
Diffstat (limited to 'sys/scsi')
-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; |