summaryrefslogtreecommitdiffstats
path: root/sys/scsi/scsi_cd.h
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1993-08-20 09:23:30 +0000
committerrgrimes <rgrimes@FreeBSD.org>1993-08-20 09:23:30 +0000
commitcf0a4c9f207124f943e290bcc365b75f8deea2c6 (patch)
tree5dcbce83587cfd32b34f8a919c3f679ce971a405 /sys/scsi/scsi_cd.h
parent2970641bb3922023009c2b42e8d0074196806195 (diff)
downloadFreeBSD-src-cf0a4c9f207124f943e290bcc365b75f8deea2c6.zip
FreeBSD-src-cf0a4c9f207124f943e290bcc365b75f8deea2c6.tar.gz
Update scsi code to the latest from Julian. This code is now identical
to the last copy from Julian. After this commit I will be commiting the local fixes and makeing diffs to send back to Julian so he can update his code. ---- From julian@jules.DIALix.oz.au Thu Aug 5 09:25:23 1993 To: hd@world.std.com, julian@jules.DIALix.oz.au Cc: nate@bsd.coe.montana.edu Subject: Re: new scsi ---- From julian@jules.DIALix.oz.au Sat Aug 7 04:13:17 1993 To: hd@world.std.com (HD Associates) Cc: nate@bsd.coe.montana.edu Subject: Re: timeout diffs Here are the diffs to take the scsi stuff to my latest tree from what Nate and you received.. the changes remove all the local timeout stuff and use (un)timeout(), ---- From julian@jules.DIALix.oz.au Sat Aug 7 04:13:45 1993 To: hd@world.std.com (HD Associates) Cc: nate@bsd.coe.montana.edu, briggs@csugrad.cs.vt.edu here is a fix for a silly bug in the scsiconf I just sent out and a similar fix for st.c
Diffstat (limited to 'sys/scsi/scsi_cd.h')
-rw-r--r--sys/scsi/scsi_cd.h151
1 files changed, 49 insertions, 102 deletions
diff --git a/sys/scsi/scsi_cd.h b/sys/scsi/scsi_cd.h
index 6606889..b5758c8 100644
--- a/sys/scsi/scsi_cd.h
+++ b/sys/scsi/scsi_cd.h
@@ -12,6 +12,13 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
+ *
+ * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
+ * -------------------- ----- ----------------------
+ * CURRENT PATCH LEVEL: 1 00098
+ * -------------------- ----- ----------------------
+ *
+ * 16 Feb 93 Julian Elischer ADDED for SCSI system
*/
@@ -19,6 +26,11 @@
/*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*/
+/*
+ * Define two bits always in the same place in byte 2 (flag byte)
+ */
+#define CD_RELADDR 0x01
+#define CD_MSF 0x02
/*
* SCSI command format
@@ -27,29 +39,22 @@
struct scsi_read_capacity_cd
{
u_char op_code;
- u_char :5;
- u_char lun:3;
+ u_char byte2;
u_char addr_3; /* Most Significant */
u_char addr_2;
u_char addr_1;
u_char addr_0; /* Least Significant */
u_char unused[3];
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
struct scsi_pause
{
u_char op_code;
- u_char :5;
- u_char lun:3;
+ u_char byte2;
u_char unused[6];
- u_char resume:1;
- u_char :7;
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char resume;
+ u_char control;
};
#define PA_PAUSE 1
#define PA_RESUME 0
@@ -57,8 +62,7 @@ struct scsi_pause
struct scsi_play_msf
{
u_char op_code;
- u_char :5;
- u_char lun:3;
+ u_char byte2;
u_char unused;
u_char start_m;
u_char start_s;
@@ -66,132 +70,96 @@ struct scsi_play_msf
u_char end_m;
u_char end_s;
u_char end_f;
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
struct scsi_play_track
{
u_char op_code;
- u_char :5;
- u_char lun:3;
+ u_char byte2;
u_char unused[2];
u_char start_track;
u_char start_index;
u_char unused1;
u_char end_track;
u_char end_index;
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
struct scsi_play
{
u_char op_code;
- u_char reladdr:1;
- u_char :4;
- u_char lun:3;
+ u_char byte2;
u_char blk_addr[4];
u_char unused;
u_char xfer_len[2];
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
struct scsi_play_big
{
u_char op_code;
- u_char reladdr:1;
- u_char :4;
- u_char lun:3;
+ u_char byte2; /* same as above */
u_char blk_addr[4];
u_char xfer_len[4];
u_char unused;
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
struct scsi_play_rel_big
{
u_char op_code;
- u_char reladdr:1;
- u_char :4;
- u_char lun:3;
+ u_char byte2; /* same as above */
u_char blk_addr[4];
u_char xfer_len[4];
u_char track;
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
struct scsi_read_header
{
u_char op_code;
- u_char :1;
- u_char msf:1;
- u_char :3;
- u_char lun:3;
+ u_char byte2;
u_char blk_addr[4];
u_char unused;
u_char data_len[2];
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
struct scsi_read_subchannel
{
u_char op_code;
- u_char :1;
- u_char msf:1;
- u_char :3;
- u_char lun:3;
- u_char :6;
- u_char subQ:1;
- u_char :1;
+ u_char byte2;
+ u_char byte3;
+#define SRS_SUBQ 0x40
u_char subchan_format;
u_char unused[2];
u_char track;
u_char data_len[2];
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
struct scsi_read_toc
{
u_char op_code;
- u_char :1;
- u_char msf:1;
- u_char :3;
- u_char lun:3;
+ u_char byte2;
u_char unused[4];
u_char from_track;
u_char data_len[2];
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
;
struct scsi_read_cd_capacity
{
u_char op_code;
- u_char :5;
- u_char lun:3;
+ u_char byte2;
u_char addr_3; /* Most Significant */
u_char addr_2;
u_char addr_1;
u_char addr_0; /* Least Significant */
u_char unused[3];
- u_char link:1;
- u_char flag:1;
- u_char :6;
+ u_char control;
};
/*
@@ -211,26 +179,6 @@ struct scsi_read_cd_capacity
#define PLAY_TRACK_REL_BIG 0xa9 /* cdrom play track/index mode */
-struct cd_inquiry_data /* in case there is some special info */
-{
- u_char device_type:5;
- u_char device_qualifier:3;
- u_char dev_qual2:7;
- u_char removable:1;
- u_char ansii_version:3;
- u_char :5;
- u_char response_format;
- u_char additional_length;
- u_char unused[2];
- u_char :3;
- u_char can_link:1;
- u_char can_sync:1;
- u_char :3;
- char vendor[8];
- char product[16];
- char revision[4];
- u_char extra[8];
-};
struct scsi_read_cd_cap_data
{
@@ -246,32 +194,31 @@ struct scsi_read_cd_cap_data
union cd_pages
{
-#define AUDIO_PAGE 0x0e
struct audio_page
{
- u_char page_code:6;
- u_char :1;
- u_char ps:1;
+ u_char page_code;
+#define CD_PAGE_CODE 0x3F
+#define AUDIO_PAGE 0x0e
+#define CD_PAGE_PS 0x80
u_char param_len;
- u_char :1;
- u_char sotc:1;
- u_char immed:1;
- u_char :5;
+ u_char flags;
+#define CD_PA_SOTC 0x02
+#define CD_PA_IMMED 0x04
u_char unused[2];
- u_char format_lba:4;
- u_char :3;
- u_char apr_valid:1;
+ u_char format_lba;
+#define CD_PA_FORMAT_LBA 0x0F
+#define CD_PA_APR_VALID 0x80
u_char lb_per_sec[2];
struct port_control
{
- u_char channels:4;
+ u_char channels;
+#define CHANNEL 0x0F
#define CHANNEL_0 1
#define CHANNEL_1 2
#define CHANNEL_2 4
#define CHANNEL_3 8
#define LEFT_CHANNEL CHANNEL_0
#define RIGHT_CHANNEL CHANNEL_1
- u_char :4;
u_char volume;
} port[4];
#define LEFT_PORT 0
OpenPOWER on IntegriCloud