RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / arm-brcm-linux-uclibcgnueabi / sysroot / usr / include / linux / pktcdvd.h
blob7c31eb760f24cdbd35d6138e7899474516b10cae
1 /*
2 * Copyright (C) 2000 Jens Axboe <axboe@suse.de>
3 * Copyright (C) 2001-2004 Peter Osterlund <petero2@telia.com>
5 * May be copied or modified under the terms of the GNU General Public
6 * License. See linux/COPYING for more information.
8 * Packet writing layer for ATAPI and SCSI CD-R, CD-RW, DVD-R, and
9 * DVD-RW devices.
12 #ifndef __PKTCDVD_H
13 #define __PKTCDVD_H
15 #include <linux/types.h>
18 * 1 for normal debug messages, 2 is very verbose. 0 to turn it off.
20 #define PACKET_DEBUG 1
22 #define MAX_WRITERS 8
24 #define PKT_RB_POOL_SIZE 512
27 * How long we should hold a non-full packet before starting data gathering.
29 #define PACKET_WAIT_TIME (HZ * 5 / 1000)
32 * use drive write caching -- we need deferred error handling to be
33 * able to successfully recover with this option (drive will return good
34 * status as soon as the cdb is validated).
36 #if defined(CONFIG_CDROM_PKTCDVD_WCACHE)
37 #define USE_WCACHING 1
38 #else
39 #define USE_WCACHING 0
40 #endif
43 * No user-servicable parts beyond this point ->
47 * device types
49 #define PACKET_CDR 1
50 #define PACKET_CDRW 2
51 #define PACKET_DVDR 3
52 #define PACKET_DVDRW 4
55 * flags
57 #define PACKET_WRITABLE 1 /* pd is writable */
58 #define PACKET_NWA_VALID 2 /* next writable address valid */
59 #define PACKET_LRA_VALID 3 /* last recorded address valid */
60 #define PACKET_MERGE_SEGS 4 /* perform segment merging to keep */
61 /* underlying cdrom device happy */
64 * Disc status -- from READ_DISC_INFO
66 #define PACKET_DISC_EMPTY 0
67 #define PACKET_DISC_INCOMPLETE 1
68 #define PACKET_DISC_COMPLETE 2
69 #define PACKET_DISC_OTHER 3
72 * write type, and corresponding data block type
74 #define PACKET_MODE1 1
75 #define PACKET_MODE2 2
76 #define PACKET_BLOCK_MODE1 8
77 #define PACKET_BLOCK_MODE2 10
80 * Last session/border status
82 #define PACKET_SESSION_EMPTY 0
83 #define PACKET_SESSION_INCOMPLETE 1
84 #define PACKET_SESSION_RESERVED 2
85 #define PACKET_SESSION_COMPLETE 3
87 #define PACKET_MCN "4a656e734178626f65323030300000"
89 #undef PACKET_USE_LS
91 #define PKT_CTRL_CMD_SETUP 0
92 #define PKT_CTRL_CMD_TEARDOWN 1
93 #define PKT_CTRL_CMD_STATUS 2
95 struct pkt_ctrl_command {
96 __u32 command; /* in: Setup, teardown, status */
97 __u32 dev_index; /* in/out: Device index */
98 __u32 dev; /* in/out: Device nr for cdrw device */
99 __u32 pkt_dev; /* in/out: Device nr for packet device */
100 __u32 num_devices; /* out: Largest device index + 1 */
101 __u32 padding; /* Not used */
105 * packet ioctls
107 #define PACKET_IOCTL_MAGIC ('X')
108 #define PACKET_CTRL_CMD _IOWR(PACKET_IOCTL_MAGIC, 1, struct pkt_ctrl_command)
111 #endif /* __PKTCDVD_H */