Lines Matching refs:cdi

118 static unsigned int sr_check_events(struct cdrom_device_info *cdi,
121 static int sr_read_cdda_bpc(struct cdrom_device_info *cdi, void __user *ubuf,
202 static unsigned int sr_check_events(struct cdrom_device_info *cdi, in sr_check_events() argument
205 struct scsi_cd *cd = cdi->handle; in sr_check_events()
398 cd->cdi.media_written = 1; in sr_init_command()
480 sr_cd_check(&cd->cdi); in sr_revalidate_disk()
498 ret = cdrom_open(&cd->cdi, bdev, mode); in sr_block_open()
512 cdrom_release(&cd->cdi, mode); in sr_block_release()
539 ret = cdrom_ioctl(&cd->cdi, bdev, mode, cmd, arg); in sr_block_ioctl()
559 return cdrom_check_events(&cd->cdi, clearing); in sr_block_check_events()
570 unregister_cdrom(&cd->cdi); in sr_free_disk()
586 static int sr_open(struct cdrom_device_info *cdi, int purpose) in sr_open() argument
588 struct scsi_cd *cd = cdi->handle; in sr_open()
606 static void sr_release(struct cdrom_device_info *cdi) in sr_release() argument
664 cd->cdi.ops = &sr_dops; in sr_probe()
665 cd->cdi.handle = cd; in sr_probe()
666 cd->cdi.mask = 0; in sr_probe()
667 cd->cdi.capacity = 1; in sr_probe()
668 sprintf(cd->cdi.name, "sr%d", minor); in sr_probe()
680 if (register_cdrom(disk, &cd->cdi)) in sr_probe()
697 "Attached scsi CD-ROM %s\n", cd->cdi.name); in sr_probe()
703 unregister_cdrom(&cd->cdi); in sr_probe()
756 if (!cdrom_get_last_written(&cd->cdi, &last_written)) in get_sectorsize()
836 cd->cdi.speed = 1; in get_capabilities()
837 cd->cdi.mask |= (CDC_CD_R | CDC_CD_RW | CDC_DVD_R | in get_capabilities()
847 cd->cdi.speed = get_unaligned_be16(&buffer[n + 8]) / 176; in get_capabilities()
854 cd->cdi.speed, in get_capabilities()
863 cd->cdi.mask |= CDC_CLOSE_TRAY; in get_capabilities()
866 cd->cdi.mask |= CDC_DVD; in get_capabilities()
869 cd->cdi.mask |= CDC_DVD_RAM; in get_capabilities()
872 cd->cdi.mask |= CDC_DVD_R; in get_capabilities()
875 cd->cdi.mask |= CDC_CD_RW; in get_capabilities()
878 cd->cdi.mask |= CDC_CD_R; in get_capabilities()
881 cd->cdi.mask |= CDC_OPEN_TRAY; in get_capabilities()
885 cd->cdi.capacity = in get_capabilities()
886 cdrom_number_of_slots(&cd->cdi); in get_capabilities()
887 if (cd->cdi.capacity <= 1) in get_capabilities()
889 cd->cdi.mask |= CDC_SELECT_DISC; in get_capabilities()
896 if ((cd->cdi.mask & (CDC_DVD_RAM | CDC_MRW_W | CDC_RAM | CDC_CD_RW)) != in get_capabilities()
909 static int sr_packet(struct cdrom_device_info *cdi, in sr_packet() argument
912 struct scsi_cd *cd = cdi->handle; in sr_packet()
926 static int sr_read_cdda_bpc(struct cdrom_device_info *cdi, void __user *ubuf, in sr_read_cdda_bpc() argument
929 struct gendisk *disk = cdi->disk; in sr_read_cdda_bpc()