diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/scsi/sr.h |
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 @@ | |||
1 | /* | ||
2 | * sr.h by David Giller | ||
3 | * CD-ROM disk driver header file | ||
4 | * | ||
5 | * adapted from: | ||
6 | * sd.h Copyright (C) 1992 Drew Eckhardt | ||
7 | * SCSI disk driver header file by | ||
8 | * Drew Eckhardt | ||
9 | * | ||
10 | * <drew@colorado.edu> | ||
11 | * | ||
12 | * Modified by Eric Youngdale eric@andante.org to | ||
13 | * add scatter-gather, multiple outstanding request, and other | ||
14 | * enhancements. | ||
15 | */ | ||
16 | |||
17 | #ifndef _SR_H | ||
18 | #define _SR_H | ||
19 | |||
20 | #include <linux/genhd.h> | ||
21 | #include <linux/kref.h> | ||
22 | |||
23 | struct scsi_device; | ||
24 | |||
25 | /* The CDROM is fairly slow, so we need a little extra time */ | ||
26 | /* In fact, it is very slow if it has to spin up first */ | ||
27 | #define IOCTL_TIMEOUT 30*HZ | ||
28 | |||
29 | |||
30 | typedef struct scsi_cd { | ||
31 | struct scsi_driver *driver; | ||
32 | unsigned capacity; /* size in blocks */ | ||
33 | struct scsi_device *device; | ||
34 | unsigned int vendor; /* vendor code, see sr_vendor.c */ | ||
35 | unsigned long ms_offset; /* for reading multisession-CD's */ | ||
36 | unsigned needs_sector_size:1; /* needs to get sector size */ | ||
37 | unsigned use:1; /* is this device still supportable */ | ||
38 | unsigned xa_flag:1; /* CD has XA sectors ? */ | ||
39 | unsigned readcd_known:1; /* drive supports READ_CD (0xbe) */ | ||
40 | unsigned readcd_cdda:1; /* reading audio data using READ_CD */ | ||
41 | struct cdrom_device_info cdi; | ||
42 | /* We hold gendisk and scsi_device references on probe and use | ||
43 | * the refs on this kref to decide when to release them */ | ||
44 | struct kref kref; | ||
45 | struct gendisk *disk; | ||
46 | } Scsi_CD; | ||
47 | |||
48 | int sr_do_ioctl(Scsi_CD *, struct packet_command *); | ||
49 | |||
50 | int sr_lock_door(struct cdrom_device_info *, int); | ||
51 | int sr_tray_move(struct cdrom_device_info *, int); | ||
52 | int sr_drive_status(struct cdrom_device_info *, int); | ||
53 | int sr_disk_status(struct cdrom_device_info *); | ||
54 | int sr_get_last_session(struct cdrom_device_info *, struct cdrom_multisession *); | ||
55 | int sr_get_mcn(struct cdrom_device_info *, struct cdrom_mcn *); | ||
56 | int sr_reset(struct cdrom_device_info *); | ||
57 | int sr_select_speed(struct cdrom_device_info *cdi, int speed); | ||
58 | int sr_audio_ioctl(struct cdrom_device_info *, unsigned int, void *); | ||
59 | int sr_dev_ioctl(struct cdrom_device_info *, unsigned int, unsigned long); | ||
60 | |||
61 | int sr_is_xa(Scsi_CD *); | ||
62 | |||
63 | /* sr_vendor.c */ | ||
64 | void sr_vendor_init(Scsi_CD *); | ||
65 | int sr_cd_check(struct cdrom_device_info *); | ||
66 | int sr_set_blocklength(Scsi_CD *, int blocklength); | ||
67 | |||
68 | #endif | ||