summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/scsipi/scsipi_base.c7
-rw-r--r--sys/dev/scsipi/scsipiconf.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/scsipi/scsipi_base.c b/sys/dev/scsipi/scsipi_base.c
index 8a3657f646f..b4c717e5561 100644
--- a/sys/dev/scsipi/scsipi_base.c
+++ b/sys/dev/scsipi/scsipi_base.c
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_base.c,v 1.147 2008/04/28 20:23:57 martin Exp $ */
+/* $NetBSD: scsipi_base.c,v 1.148 2008/05/11 05:17:23 mlelstv Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.147 2008/04/28 20:23:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.148 2008/05/11 05:17:23 mlelstv Exp $");
#include "opt_scsi.h"
@@ -1150,6 +1150,9 @@ scsipi_prevent(struct scsipi_periph *periph, int type, int flags)
{
struct scsi_prevent_allow_medium_removal cmd;
+ if (periph->periph_quirks & PQUIRK_NODOORLOCK)
+ return 0;
+
memset(&cmd, 0, sizeof(cmd));
cmd.opcode = SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL;
cmd.how = type;
diff --git a/sys/dev/scsipi/scsipiconf.h b/sys/dev/scsipi/scsipiconf.h
index a85cdf88d66..3c2bde682d4 100644
--- a/sys/dev/scsipi/scsipiconf.h
+++ b/sys/dev/scsipi/scsipiconf.h
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipiconf.h,v 1.111 2008/04/28 20:23:58 martin Exp $ */
+/* $NetBSD: scsipiconf.h,v 1.112 2008/05/11 05:17:23 mlelstv Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2004 The NetBSD Foundation, Inc.
@@ -440,6 +440,7 @@ struct scsipi_periph {
#define PQUIRK_LITTLETOC 0x00000400 /* audio TOC is little-endian */
#define PQUIRK_NOCAPACITY 0x00000800 /* no READ CD CAPACITY */
#define PQUIRK_NOTUR 0x00001000 /* no TEST UNIT READY */
+#define PQUIRK_NODOORLOCK 0x00002000 /* can't lock door */
#define PQUIRK_NOSENSE 0x00004000 /* can't REQUEST SENSE */
#define PQUIRK_ONLYBIG 0x00008000 /* only use SCSI_{R,W}_BIG */
#define PQUIRK_NOBIGMODESENSE 0x00040000 /* has no big mode-sense op */