diff options
| author | Jens Axboe <axboe@suse.de> | 2004-03-15 15:51:27 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-03-15 15:51:27 -0800 |
| commit | 1b2ed5b74904b6d1540efdd0bd08022765dc292a (patch) | |
| tree | de74110dfb43c3fc33edf20b1d30c906bf495f84 /include/linux/cdrom.h | |
| parent | 48a6c2a947c15b9b8289f1e3092ce064d0e21b50 (diff) | |
[PATCH] allow random write to cdrom devices with profile 2 (removable disk)
This patch is from Iomega, and it allows random write opens of CDROM's
that support the feature.
Diffstat (limited to 'include/linux/cdrom.h')
| -rw-r--r-- | include/linux/cdrom.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index a4e851d4a335..8fcf9bc9cf2b 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h @@ -722,7 +722,9 @@ struct request_sense { /* * feature profile */ -#define CDF_MRW 0x28 +#define CDF_RWRT 0x0020 /* "Random Writable" */ +#define CDF_HWDM 0x0024 /* "Hardware Defect Management" */ +#define CDF_MRW 0x0028 /* * media status bits @@ -771,6 +773,34 @@ struct mrw_feature_desc { __u8 reserved5; }; +/* cf. mmc4r02g.pdf 5.3.10 Random Writable Feature (0020h) pg 197 of 635 */ +struct rwrt_feature_desc { + __u16 feature_code; +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 reserved1 : 2; + __u8 feature_version : 4; + __u8 persistent : 1; + __u8 curr : 1; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 curr : 1; + __u8 persistent : 1; + __u8 feature_version : 4; + __u8 reserved1 : 2; +#endif + __u8 add_len; + __u32 last_lba; + __u32 block_size; + __u16 blocking; +#if defined(__BIG_ENDIAN_BITFIELD) + __u8 reserved2 : 7; + __u8 page_present : 1; +#elif defined(__LITTLE_ENDIAN_BITFIELD) + __u8 page_present : 1; + __u8 reserved2 : 7; +#endif + __u8 reserved3; +}; + typedef struct { __u16 disc_information_length; #if defined(__BIG_ENDIAN_BITFIELD) @@ -1140,6 +1170,7 @@ struct media_event_desc { extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med); extern int cdrom_is_mrw(struct cdrom_device_info *cdi, int *write); +extern int cdrom_is_random_writable(struct cdrom_device_info *cdi, int *write); #endif /* End of kernel only stuff */ |
