Skip to content

Commit 0a703c1

Browse files
rddunlapaxboe
authored andcommitted
Documentation/cdrom: update cdrom-standard.tex for kernel changes
Documentation updates for Documentation/cdrom/cdrom-standard.tex: cdrom_device_ops: - add check_events() and generic_packet() cdrom_device_info: - add one 'const' modifier - correct some field descriptions - add some missing fields - drop 'kdev_t dev;' field Also drop <n_discs> sentence from documentation because it is not referenced anywhere in the kernel header or C files. Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 8a0ac14 commit 0a703c1

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

Documentation/cdrom/cdrom-standard.tex

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@
234234
&int& (* open)(struct\ cdrom_device_info *, int)\cr
235235
&void& (* release)(struct\ cdrom_device_info *);\cr
236236
&int& (* drive_status)(struct\ cdrom_device_info *, int);\cr
237+
&unsigned\ int& (* check_events)(struct\ cdrom_device_info *, unsigned\ int, int);\cr
237238
&int& (* media_changed)(struct\ cdrom_device_info *, int);\cr
238239
&int& (* tray_move)(struct\ cdrom_device_info *, int);\cr
239240
&int& (* lock_door)(struct\ cdrom_device_info *, int);\cr
@@ -245,10 +246,9 @@
245246
&int& (* reset)(struct\ cdrom_device_info *);\cr
246247
&int& (* audio_ioctl)(struct\ cdrom_device_info *, unsigned\ int,
247248
void *{});\cr
248-
&int& (* dev_ioctl)(struct\ cdrom_device_info *, unsigned\ int,
249-
unsigned\ long);\cr
250249
\noalign{\medskip}
251250
&const\ int& capability;& capability flags \cr
251+
&int& (* generic_packet)(struct\ cdrom_device_info *, struct\ packet_command *{});\cr
252252
\};\cr
253253
}
254254
$$
@@ -274,19 +274,32 @@
274274
\halign{$#$\ \hfil&$#$\ \hfil&\hbox to 10em{$#$\hss}&
275275
$/*$ \rm# $*/$\hfil\cr
276276
struct& cdrom_device_info\ \{ \hidewidth\cr
277-
& struct\ cdrom_device_ops *& ops;& device operations for this major\cr
278-
& struct\ cdrom_device_info *& next;& next device_info for this major\cr
277+
& const\ struct\ cdrom_device_ops *& ops;& device operations for this major\cr
278+
& struct\ list_head& list;& linked list of all device_info\cr
279+
& struct\ gendisk *& disk;& matching block layer disk\cr
279280
& void *& handle;& driver-dependent data\cr
280281
\noalign{\medskip}
281-
& kdev_t& dev;& device number (incorporates minor)\cr
282282
& int& mask;& mask of capability: disables them \cr
283283
& int& speed;& maximum speed for reading data \cr
284284
& int& capacity;& number of discs in a jukebox \cr
285285
\noalign{\medskip}
286-
&int& options : 30;& options flags \cr
286+
&unsigned\ int& options : 30;& options flags \cr
287287
&unsigned& mc_flags : 2;& media-change buffer flags \cr
288+
&unsigned\ int& vfs_events;& cached events for vfs path\cr
289+
&unsigned\ int& ioctl_events;& cached events for ioctl path\cr
288290
& int& use_count;& number of times device is opened\cr
289291
& char& name[20];& name of the device type\cr
292+
\noalign{\medskip}
293+
&__u8& sanyo_slot : 2;& Sanyo 3-CD changer support\cr
294+
&__u8& keeplocked : 1;& CDROM_LOCKDOOR status\cr
295+
&__u8& reserved : 5;& not used yet\cr
296+
& int& cdda_method;& see CDDA_* flags\cr
297+
&__u8& last_sense;& saves last sense key\cr
298+
&__u8& media_written;& dirty flag, DVD+RW bookkeeping\cr
299+
&unsigned\ short& mmc3_profile;& current MMC3 profile\cr
300+
& int& for_data;& unknown:TBD\cr
301+
& int\ (* exit)\ (struct\ cdrom_device_info *);&& unknown:TBD\cr
302+
& int& mrw_mode_page;& which MRW mode page is in use\cr
290303
\}\cr
291304
}$$
292305
Using this $struct$, a linked list of the registered minor devices is
@@ -298,9 +311,7 @@
298311
in $ops\to capability$, if a specific drive doesn't support a feature
299312
of the driver. The value $speed$ specifies the maximum head-rate of the
300313
drive, measured in units of normal audio speed (176\,kB/sec raw data or
301-
150\,kB/sec file system data). The value $n_discs$ should reflect the
302-
number of discs the drive can hold simultaneously, if it is designed
303-
as a juke-box, or otherwise~1. The parameters are declared $const$
314+
150\,kB/sec file system data). The parameters are declared $const$
304315
because they describe properties of the drive, which don't change after
305316
registration.
306317

0 commit comments

Comments
 (0)