1 |
1275 |
phoenix |
/*
|
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 "scsi.h"
|
21 |
|
|
|
22 |
|
|
typedef struct {
|
23 |
|
|
unsigned capacity; /* size in blocks */
|
24 |
|
|
Scsi_Device *device;
|
25 |
|
|
unsigned int vendor; /* vendor code, see sr_vendor.c */
|
26 |
|
|
unsigned long ms_offset; /* for reading multisession-CD's */
|
27 |
|
|
unsigned char sector_bit_size; /* sector size = 2^sector_bit_size */
|
28 |
|
|
unsigned char sector_bit_shift; /* sectors/FS block = 2^sector_bit_shift */
|
29 |
|
|
unsigned needs_sector_size:1; /* needs to get sector size */
|
30 |
|
|
unsigned use:1; /* is this device still supportable */
|
31 |
|
|
unsigned xa_flag:1; /* CD has XA sectors ? */
|
32 |
|
|
unsigned readcd_known:1; /* drive supports READ_CD (0xbe) */
|
33 |
|
|
unsigned readcd_cdda:1; /* reading audio data using READ_CD */
|
34 |
|
|
struct cdrom_device_info cdi;
|
35 |
|
|
} Scsi_CD;
|
36 |
|
|
|
37 |
|
|
extern Scsi_CD *scsi_CDs;
|
38 |
|
|
|
39 |
|
|
int sr_do_ioctl(int, unsigned char *, void *, unsigned, int, int, struct request_sense *);
|
40 |
|
|
|
41 |
|
|
int sr_lock_door(struct cdrom_device_info *, int);
|
42 |
|
|
int sr_tray_move(struct cdrom_device_info *, int);
|
43 |
|
|
int sr_drive_status(struct cdrom_device_info *, int);
|
44 |
|
|
int sr_disk_status(struct cdrom_device_info *);
|
45 |
|
|
int sr_get_last_session(struct cdrom_device_info *, struct cdrom_multisession *);
|
46 |
|
|
int sr_get_mcn(struct cdrom_device_info *, struct cdrom_mcn *);
|
47 |
|
|
int sr_reset(struct cdrom_device_info *);
|
48 |
|
|
int sr_select_speed(struct cdrom_device_info *cdi, int speed);
|
49 |
|
|
int sr_audio_ioctl(struct cdrom_device_info *, unsigned int, void *);
|
50 |
|
|
int sr_dev_ioctl(struct cdrom_device_info *, unsigned int, unsigned long);
|
51 |
|
|
|
52 |
|
|
int sr_read_sector(int minor, int lba, int blksize, unsigned char *dest);
|
53 |
|
|
int sr_is_xa(int minor);
|
54 |
|
|
|
55 |
|
|
/* sr_vendor.c */
|
56 |
|
|
void sr_vendor_init(int minor);
|
57 |
|
|
int sr_cd_check(struct cdrom_device_info *);
|
58 |
|
|
int sr_set_blocklength(int minor, int blocklength);
|
59 |
|
|
|
60 |
|
|
#endif
|