summaryrefslogtreecommitdiff
path: root/sys/scsi/scsiconf.h
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1996-01-14 21:44:31 +0000
committerbriggs <briggs@cvs.openbsd.org>1996-01-14 21:44:31 +0000
commit431724c0fbbfa636c72a978587ddc06d8ee3b114 (patch)
tree8d59958cac3ed495eefb18e2de35a93e99160db6 /sys/scsi/scsiconf.h
parent0fb02d5a856594b81d3674e5f3647302ff3689e5 (diff)
From NetBSD: (required for last change to scsi_base.c in case we get
"command aborted" status) Handle cases like the following: - controller calls scsi_done() with error XS_TIMEOUT - scsi_done() calls sddone() - sddone() calls disk_unbusy() - scsi_done() calls controller to retry command (missing the call to disk_busy()) - controller calls scsi_done() - scsi_done() calls sddone() - sddone() calls disk_busy(), which panics because of the imbalance. Bug noticed by Leo Weppleman, who also suggested this fix; pass an additional boolean argument ("complete") to the device's "done" routine, with a value of `0' passed from the previous call to "done", and add an additional call to "done" when the xfer resources are freed.
Diffstat (limited to 'sys/scsi/scsiconf.h')
-rw-r--r--sys/scsi/scsiconf.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index e48537042db..ef5e32aaa5a 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.h,v 1.25 1995/08/12 20:31:44 mycroft Exp $ */
+/* $NetBSD: scsiconf.h,v 1.26 1996/01/12 22:43:31 thorpej Exp $ */
/*
* Copyright (c) 1993, 1994, 1995 Charles Hannum. All rights reserved.
@@ -114,7 +114,13 @@ struct scsi_device {
int (*err_handler)(); /* returns -1 to say err processing done */
void (*start)();
int (*async)();
- int (*done)(); /* returns -1 to say done processing done */
+ /*
+ * When called with `0' as the second argument, we expect status
+ * back from the upper-level driver. When called with a `1',
+ * we're simply notifying the upper-level driver that the command
+ * is complete and expect no status back.
+ */
+ int (*done)( /* struct scsi_xfer *, int */ );
};
/*