diff options
Diffstat (limited to 'include/linux/pktcdvd.h')
| -rw-r--r-- | include/linux/pktcdvd.h | 99 |
1 files changed, 1 insertions, 98 deletions
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 721301b0a908..93d142ad1528 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
| @@ -12,108 +12,13 @@ | |||
| 12 | #ifndef __PKTCDVD_H | 12 | #ifndef __PKTCDVD_H |
| 13 | #define __PKTCDVD_H | 13 | #define __PKTCDVD_H |
| 14 | 14 | ||
| 15 | #include <linux/types.h> | ||
| 16 | |||
| 17 | /* | ||
| 18 | * 1 for normal debug messages, 2 is very verbose. 0 to turn it off. | ||
| 19 | */ | ||
| 20 | #define PACKET_DEBUG 1 | ||
| 21 | |||
| 22 | #define MAX_WRITERS 8 | ||
| 23 | |||
| 24 | #define PKT_RB_POOL_SIZE 512 | ||
| 25 | |||
| 26 | /* | ||
| 27 | * How long we should hold a non-full packet before starting data gathering. | ||
| 28 | */ | ||
| 29 | #define PACKET_WAIT_TIME (HZ * 5 / 1000) | ||
| 30 | |||
| 31 | /* | ||
| 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). | ||
| 35 | */ | ||
| 36 | #if defined(CONFIG_CDROM_PKTCDVD_WCACHE) | ||
| 37 | #define USE_WCACHING 1 | ||
| 38 | #else | ||
| 39 | #define USE_WCACHING 0 | ||
| 40 | #endif | ||
| 41 | |||
| 42 | /* | ||
| 43 | * No user-servicable parts beyond this point -> | ||
| 44 | */ | ||
| 45 | |||
| 46 | /* | ||
| 47 | * device types | ||
| 48 | */ | ||
| 49 | #define PACKET_CDR 1 | ||
| 50 | #define PACKET_CDRW 2 | ||
| 51 | #define PACKET_DVDR 3 | ||
| 52 | #define PACKET_DVDRW 4 | ||
| 53 | |||
| 54 | /* | ||
| 55 | * flags | ||
| 56 | */ | ||
| 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 */ | ||
| 62 | |||
| 63 | /* | ||
| 64 | * Disc status -- from READ_DISC_INFO | ||
| 65 | */ | ||
| 66 | #define PACKET_DISC_EMPTY 0 | ||
| 67 | #define PACKET_DISC_INCOMPLETE 1 | ||
| 68 | #define PACKET_DISC_COMPLETE 2 | ||
| 69 | #define PACKET_DISC_OTHER 3 | ||
| 70 | |||
| 71 | /* | ||
| 72 | * write type, and corresponding data block type | ||
| 73 | */ | ||
| 74 | #define PACKET_MODE1 1 | ||
| 75 | #define PACKET_MODE2 2 | ||
| 76 | #define PACKET_BLOCK_MODE1 8 | ||
| 77 | #define PACKET_BLOCK_MODE2 10 | ||
| 78 | |||
| 79 | /* | ||
| 80 | * Last session/border status | ||
| 81 | */ | ||
| 82 | #define PACKET_SESSION_EMPTY 0 | ||
| 83 | #define PACKET_SESSION_INCOMPLETE 1 | ||
| 84 | #define PACKET_SESSION_RESERVED 2 | ||
| 85 | #define PACKET_SESSION_COMPLETE 3 | ||
| 86 | |||
| 87 | #define PACKET_MCN "4a656e734178626f65323030300000" | ||
| 88 | |||
| 89 | #undef PACKET_USE_LS | ||
| 90 | |||
| 91 | #define PKT_CTRL_CMD_SETUP 0 | ||
| 92 | #define PKT_CTRL_CMD_TEARDOWN 1 | ||
| 93 | #define PKT_CTRL_CMD_STATUS 2 | ||
| 94 | |||
| 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 */ | ||
| 102 | }; | ||
| 103 | |||
| 104 | /* | ||
| 105 | * packet ioctls | ||
| 106 | */ | ||
| 107 | #define PACKET_IOCTL_MAGIC ('X') | ||
| 108 | #define PACKET_CTRL_CMD _IOWR(PACKET_IOCTL_MAGIC, 1, struct pkt_ctrl_command) | ||
| 109 | |||
| 110 | #ifdef __KERNEL__ | ||
| 111 | #include <linux/blkdev.h> | 15 | #include <linux/blkdev.h> |
| 112 | #include <linux/completion.h> | 16 | #include <linux/completion.h> |
| 113 | #include <linux/cdrom.h> | 17 | #include <linux/cdrom.h> |
| 114 | #include <linux/kobject.h> | 18 | #include <linux/kobject.h> |
| 115 | #include <linux/sysfs.h> | 19 | #include <linux/sysfs.h> |
| 116 | #include <linux/mempool.h> | 20 | #include <linux/mempool.h> |
| 21 | #include <uapi/linux/pktcdvd.h> | ||
| 117 | 22 | ||
| 118 | /* default bio write queue congestion marks */ | 23 | /* default bio write queue congestion marks */ |
| 119 | #define PKT_WRITE_CONGESTION_ON 10000 | 24 | #define PKT_WRITE_CONGESTION_ON 10000 |
| @@ -297,6 +202,4 @@ struct pktcdvd_device | |||
| 297 | struct dentry *dfs_f_info; /* debugfs: info file */ | 202 | struct dentry *dfs_f_info; /* debugfs: info file */ |
| 298 | }; | 203 | }; |
| 299 | 204 | ||
| 300 | #endif /* __KERNEL__ */ | ||
| 301 | |||
| 302 | #endif /* __PKTCDVD_H */ | 205 | #endif /* __PKTCDVD_H */ |
