patch-2.3.23 linux/include/linux/cdrom.h

Next file: linux/include/linux/fs.h
Previous file: linux/include/linux/bootmem.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.22/linux/include/linux/cdrom.h linux/include/linux/cdrom.h
@@ -273,6 +273,7 @@
 	unsigned char 	*buffer;
 	unsigned int 	buflen;
 	int		stat;
+	void		*reserved[4];
 };
 
 
@@ -655,6 +656,14 @@
 } dvd_authinfo;
 
 #ifdef __KERNEL__
+
+struct cdrom_write_settings {
+	unsigned char fpacket;		/* fixed/variable packets */
+	unsigned long packet_size;	/* write out this number of packets */
+	unsigned long nwa;		/* next writeable address */
+	unsigned char writeable;	/* cdrom is writeable */
+};
+
 /* Uniform cdrom data structures for cdrom.c */
 struct cdrom_device_info {
 	struct cdrom_device_ops  *ops;  /* link to device_ops */
@@ -673,6 +682,7 @@
 /* per-device flags */
         __u8 sanyo_slot		: 2;	/* Sanyo 3 CD changer support */
         __u8 reserved		: 6;	/* not used yet */
+	struct cdrom_write_settings write;
 };
 
 struct cdrom_device_ops {
@@ -760,8 +770,6 @@
         __u8 uru			: 1;
         __u8 dbc_v			: 1;
 	__u8 did_v			: 1;
-#else
-#error "Please fix <asm/byteorder.h>"
 #endif
 	__u8 disc_type;
 	__u8 n_sessions_msb;
@@ -806,8 +814,6 @@
 	__u8 nwa_v			: 1;
 	__u8 lra_v			: 1;
 	__u8 reserved3			: 6;
-#else
-#error "Please fix <asm/byteorder.h>"
 #endif
 	__u32 track_start;
 	__u32 next_writable;
@@ -835,15 +841,12 @@
 	__u8 reserved1     : 4;
 	__u8 door_open     : 1;
 	__u8 mech_state    : 3;
-#else
-#error "Please fix <asm/byteorder.h>"
 #endif
 	__u8     curlba[3];
 	__u8     nslots;
 	__u8 short slot_tablelen;
 };
 
-
 struct cdrom_slot {
 #if defined(__BIG_ENDIAN_BITFIELD)
 	__u8 disc_present : 1;
@@ -853,8 +856,6 @@
 	__u8 change       : 1;
 	__u8 reserved1    : 6;
 	__u8 disc_present : 1;
-#else
-#error "Please fix <asm/byteorder.h>"
 #endif
 	__u8 reserved2[3];
 };
@@ -871,6 +872,71 @@
 	mechtype_individual_changer = 4,
 	mechtype_cartridge_changer  = 5
 } mechtype_t;
+
+struct mode_page_header {
+	__u16 mode_data_length;
+	__u8 medium_type;
+	__u8 reserved1;
+	__u8 reserved2;
+	__u8 reserved3;
+	__u16 desc_length;
+};
+
+typedef struct {
+	struct mode_page_header header;
+#if defined(__BIG_ENDIAN_BITFIELD)
+	__u8 ps			: 1;
+	__u8 reserved1		: 1;
+	__u8 page_code		: 6;
+        __u8 page_length;
+	__u8 reserved2		: 1;
+	__u8 bufe		: 1;
+	__u8 ls_v		: 1;
+	__u8 test_write		: 1;
+        __u8 write_type		: 4;
+	__u8 multi_session	: 2; /* or border, DVD */
+	__u8 fp			: 1;
+	__u8 copy		: 1;
+	__u8 track_mode		: 4;
+	__u8 reserved3		: 4;
+	__u8 data_block_type	: 4;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+	__u8 page_code		: 6;
+	__u8 reserved1		: 1;
+	__u8 ps			: 1;
+        __u8 page_length;
+        __u8 write_type		: 4;
+	__u8 test_write		: 1;
+	__u8 ls_v		: 1;
+	__u8 bufe		: 1;
+	__u8 reserved2		: 1;
+	__u8 track_mode		: 4;
+	__u8 copy		: 1;
+	__u8 fp			: 1;
+	__u8 multi_session	: 2; /* or border, DVD */
+	__u8 data_block_type	: 4;
+	__u8 reserved3		: 4;
+#endif
+	__u8 link_size;
+	__u8 reserved4;
+#if defined(__BIG_ENDIAN_BITFIELD)
+	__u8 reserved5		: 2;
+	__u8 app_code		: 6;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+	__u8 app_code		: 6;
+	__u8 reserved5		: 2;
+#endif
+	__u8 session_format;
+	__u8 reserved6;
+	__u32 packet_size;
+	__u16 audio_pause;
+	__u8 mcn[16];
+	__u8 isrc[16];
+	__u8 subhdr0;
+	__u8 subhdr1;
+	__u8 subhdr2;
+	__u8 subhdr3;
+} write_param_page __attribute__((packed));
 
 #endif  /* End of kernel only stuff */ 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)