summaryrefslogtreecommitdiff
path: root/sys/scsi/scsi_all.h
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-06-12 21:40:06 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-06-12 21:40:06 +0000
commite85babcd73c874cc09f1aa54d487da493a66f6f3 (patch)
tree5f3f622655e0e5c59ebbca88c3b4a87dc6ed175b /sys/scsi/scsi_all.h
parent209a06d7400a1734b180d6d66c338a3c91bca3e3 (diff)
It turns out you need to ask for 16 byte block descriptors. We don't,
so eliminate code dealing with 16 byte block descriptors. No one else seems to use them anyway. Add define for appropriate permission bit in case we ever need it. Simplify and clean up scsi_do_mode_sense() code as a result. Strengthen check to ensure block descriptor data is a valid by checking if it is a multiple of 8 bytes rather than just > 8 bytes. Moves code to closer to what it was before scsi_do_mode_sense().
Diffstat (limited to 'sys/scsi/scsi_all.h')
-rw-r--r--sys/scsi/scsi_all.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h
index 16dee41469c..25ebe9d3c7e 100644
--- a/sys/scsi/scsi_all.h
+++ b/sys/scsi/scsi_all.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_all.h,v 1.25 2005/06/03 15:50:10 krw Exp $ */
+/* $OpenBSD: scsi_all.h,v 1.26 2005/06/12 21:40:05 krw Exp $ */
/* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */
/*
@@ -88,7 +88,7 @@ struct scsi_inquiry {
struct scsi_mode_sense {
u_int8_t opcode;
u_int8_t byte2;
-#define SMS_DBD 0x08
+#define SMS_DBD 0x08 /* Disable Block Descriptors */
u_int8_t page;
#define SMS_PAGE_CODE 0x3F
#define SMS_PAGE_CTRL 0xC0
@@ -103,8 +103,9 @@ struct scsi_mode_sense {
struct scsi_mode_sense_big {
u_int8_t opcode;
- u_int8_t byte2; /* same bits as small version */
- u_int8_t page; /* same bits as small version */
+ u_int8_t byte2; /* same bits as small version */
+#define SMS_LLBAA 0x10 /* plus: Long LBA Accepted */
+ u_int8_t page; /* same bits as small version */
u_int8_t unused[4];
u_int8_t length[2];
u_int8_t control;