diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-17 00:20:36 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-17 00:20:36 +0200 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/sr.h | |
download | linux-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.tar.xz linux-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.zip |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/scsi/sr.h')
-rw-r--r-- | drivers/scsi/sr.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/drivers/scsi/sr.h b/drivers/scsi/sr.h new file mode 100644 index 000000000000..0b3178007203 --- /dev/null +++ b/drivers/scsi/sr.h @@ -0,0 +1,68 @@ +/* + * sr.h by David Giller + * CD-ROM disk driver header file + * + * adapted from: + * sd.h Copyright (C) 1992 Drew Eckhardt + * SCSI disk driver header file by + * Drew Eckhardt + * + * <drew@colorado.edu> + * + * Modified by Eric Youngdale eric@andante.org to + * add scatter-gather, multiple outstanding request, and other + * enhancements. + */ + +#ifndef _SR_H +#define _SR_H + +#include <linux/genhd.h> +#include <linux/kref.h> + +struct scsi_device; + +/* The CDROM is fairly slow, so we need a little extra time */ +/* In fact, it is very slow if it has to spin up first */ +#define IOCTL_TIMEOUT 30*HZ + + +typedef struct scsi_cd { + struct scsi_driver *driver; + unsigned capacity; /* size in blocks */ + struct scsi_device *device; + unsigned int vendor; /* vendor code, see sr_vendor.c */ + unsigned long ms_offset; /* for reading multisession-CD's */ + unsigned needs_sector_size:1; /* needs to get sector size */ + unsigned use:1; /* is this device still supportable */ + unsigned xa_flag:1; /* CD has XA sectors ? */ + unsigned readcd_known:1; /* drive supports READ_CD (0xbe) */ + unsigned readcd_cdda:1; /* reading audio data using READ_CD */ + struct cdrom_device_info cdi; + /* We hold gendisk and scsi_device references on probe and use + * the refs on this kref to decide when to release them */ + struct kref kref; + struct gendisk *disk; +} Scsi_CD; + +int sr_do_ioctl(Scsi_CD *, struct packet_command *); + +int sr_lock_door(struct cdrom_device_info *, int); +int sr_tray_move(struct cdrom_device_info *, int); +int sr_drive_status(struct cdrom_device_info *, int); +int sr_disk_status(struct cdrom_device_info *); +int sr_get_last_session(struct cdrom_device_info *, struct cdrom_multisession *); +int sr_get_mcn(struct cdrom_device_info *, struct cdrom_mcn *); +int sr_reset(struct cdrom_device_info *); +int sr_select_speed(struct cdrom_device_info *cdi, int speed); +int sr_audio_ioctl(struct cdrom_device_info *, unsigned int, void *); +int sr_dev_ioctl(struct cdrom_device_info *, unsigned int, unsigned long); + +int sr_is_xa(Scsi_CD *); + +/* sr_vendor.c */ +void sr_vendor_init(Scsi_CD *); +int sr_cd_check(struct cdrom_device_info *); +int sr_set_blocklength(Scsi_CD *, int blocklength); + +#endif |