|
234 | 234 | &int& (* open)(struct\ cdrom_device_info *, int)\cr
|
235 | 235 | &void& (* release)(struct\ cdrom_device_info *);\cr
|
236 | 236 | &int& (* drive_status)(struct\ cdrom_device_info *, int);\cr
|
| 237 | + &unsigned\ int& (* check_events)(struct\ cdrom_device_info *, unsigned\ int, int);\cr |
237 | 238 | &int& (* media_changed)(struct\ cdrom_device_info *, int);\cr
|
238 | 239 | &int& (* tray_move)(struct\ cdrom_device_info *, int);\cr
|
239 | 240 | &int& (* lock_door)(struct\ cdrom_device_info *, int);\cr
|
|
245 | 246 | &int& (* reset)(struct\ cdrom_device_info *);\cr
|
246 | 247 | &int& (* audio_ioctl)(struct\ cdrom_device_info *, unsigned\ int,
|
247 | 248 | void *{});\cr
|
248 |
| - &int& (* dev_ioctl)(struct\ cdrom_device_info *, unsigned\ int, |
249 |
| - unsigned\ long);\cr |
250 | 249 | \noalign{\medskip}
|
251 | 250 | &const\ int& capability;& capability flags \cr
|
| 251 | + &int& (* generic_packet)(struct\ cdrom_device_info *, struct\ packet_command *{});\cr |
252 | 252 | \};\cr
|
253 | 253 | }
|
254 | 254 | $$
|
|
274 | 274 | \halign{$#$\ \hfil&$#$\ \hfil&\hbox to 10em{$#$\hss}&
|
275 | 275 | $/*$ \rm# $*/$\hfil\cr
|
276 | 276 | 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 |
279 | 280 | & void *& handle;& driver-dependent data\cr
|
280 | 281 | \noalign{\medskip}
|
281 |
| - & kdev_t& dev;& device number (incorporates minor)\cr |
282 | 282 | & int& mask;& mask of capability: disables them \cr
|
283 | 283 | & int& speed;& maximum speed for reading data \cr
|
284 | 284 | & int& capacity;& number of discs in a jukebox \cr
|
285 | 285 | \noalign{\medskip}
|
286 |
| - &int& options : 30;& options flags \cr |
| 286 | + &unsigned\ int& options : 30;& options flags \cr |
287 | 287 | &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 |
288 | 290 | & int& use_count;& number of times device is opened\cr
|
289 | 291 | & 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 |
290 | 303 | \}\cr
|
291 | 304 | }$$
|
292 | 305 | Using this $struct$, a linked list of the registered minor devices is
|
|
298 | 311 | in $ops\to capability$, if a specific drive doesn't support a feature
|
299 | 312 | of the driver. The value $speed$ specifies the maximum head-rate of the
|
300 | 313 | 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$ |
304 | 315 | because they describe properties of the drive, which don't change after
|
305 | 316 | registration.
|
306 | 317 |
|
|
0 commit comments