summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/scsi/scsi_driver.c4
-rw-r--r--sys/scsi/scsiconf.h5
-rw-r--r--sys/scsi/uk.c4
3 files changed, 8 insertions, 5 deletions
diff --git a/sys/scsi/scsi_driver.c b/sys/scsi/scsi_driver.c
index 5db60ca..45f2ca2 100644
--- a/sys/scsi/scsi_driver.c
+++ b/sys/scsi/scsi_driver.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scsi_driver.c,v 1.11 1995/12/05 04:41:20 julian Exp $
+ * $Id: scsi_driver.c,v 1.12 1995/12/05 07:14:23 julian Exp $
*
*/
#include <sys/types.h>
@@ -120,7 +120,7 @@ struct scsi_device *device)
/*
* Check the unit is legal
*/
- if (sc_link == 0 || sc_link->sd == 0)
+ if (sc_link == 0 || (sc_link->sd == 0 && !(sc_link->flags & SDEV_UK)))
return ENXIO;
/* If it is a "once only" device that is already open return EBUSY.
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 6f21cec..a717ccc 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: scsiconf.h,v 1.36 1995/12/17 21:23:37 phk Exp $
+ * $Id: scsiconf.h,v 1.37 1996/01/07 19:27:06 gibbs Exp $
*/
#ifndef SCSI_SCSICONF_H
#define SCSI_SCSICONF_H 1
@@ -316,6 +316,8 @@ struct scsi_link
* open and to make unit attentions errors be logged on the console.
* These should be split up; I'm adding SDEV_IS_OPEN to enforce one
* open only.
+ *
+ * XXX SDEV_UK is used to mark the "uk" device.
*/
#define SDEV_MEDIA_LOADED 0x0001 /* device figures are still valid */
@@ -328,6 +330,7 @@ struct scsi_link
#define SDEV_RESIDS_WORK 0x0400 /* XXX-HA: Residuals work */
#define SDEV_TARGET_OPS 0x0800 /* XXX-HA: Supports target ops */
#define SDEV_IS_OPEN 0x1000 /* at least 1 open session */
+#define SDEV_UK 0x2000 /* this is the "uk" device */
/*
* One of these is allocated and filled in for each scsi bus.
diff --git a/sys/scsi/uk.c b/sys/scsi/uk.c
index f144e48..03c9822 100644
--- a/sys/scsi/uk.c
+++ b/sys/scsi/uk.c
@@ -2,7 +2,7 @@
* Driver for a device we can't identify.
* by Julian Elischer (julian@tfs.com)
*
- * $Id: uk.c,v 1.12 1995/12/08 11:19:03 julian Exp $
+ * $Id: uk.c,v 1.13 1995/12/08 23:22:30 phk Exp $
*
* If you find that you are adding any code to this file look closely
* at putting it in "scsi_driver.c" instead.
@@ -40,7 +40,7 @@ struct scsi_device uk_switch =
"uk",
0,
{0, 0},
- SDEV_ONCE_ONLY, /* Only one open allowed */
+ SDEV_ONCE_ONLY|SDEV_UK, /* Only one open allowed */
0,
"Unknown",
ukopen,
OpenPOWER on IntegriCloud