• Home
  • Raw
  • Download

Lines Matching refs:disk

142 static inline struct scsi_cd *scsi_cd(struct gendisk *disk)  in scsi_cd()  argument
144 return container_of(disk->private_data, struct scsi_cd, driver); in scsi_cd()
164 static inline struct scsi_cd *scsi_cd_get(struct gendisk *disk) in scsi_cd_get() argument
169 if (disk->private_data == NULL) in scsi_cd_get()
171 cd = scsi_cd(disk); in scsi_cd_get()
373 if (error_sector < get_capacity(cd->disk) && in sr_done()
375 set_capacity(cd->disk, error_sector); in sr_done()
557 static void sr_block_release(struct gendisk *disk, fmode_t mode) in sr_block_release() argument
559 struct scsi_cd *cd = scsi_cd(disk); in sr_block_release()
655 static unsigned int sr_block_check_events(struct gendisk *disk, in sr_block_check_events() argument
661 cd = scsi_cd_get(disk); in sr_block_check_events()
716 struct gendisk *disk; in sr_probe() local
732 disk = alloc_disk(1); in sr_probe()
733 if (!disk) in sr_probe()
747 disk->major = SCSI_CDROM_MAJOR; in sr_probe()
748 disk->first_minor = minor; in sr_probe()
749 sprintf(disk->disk_name, "sr%d", minor); in sr_probe()
750 disk->fops = &sr_bdops; in sr_probe()
751 disk->flags = GENHD_FL_CD | GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE; in sr_probe()
752 disk->events = DISK_EVENT_MEDIA_CHANGE | DISK_EVENT_EJECT_REQUEST; in sr_probe()
753 disk->event_flags = DISK_EVENT_FLAG_POLL | DISK_EVENT_FLAG_UEVENT; in sr_probe()
758 cd->disk = disk; in sr_probe()
760 cd->disk = disk; in sr_probe()
780 set_capacity(disk, cd->capacity); in sr_probe()
781 disk->private_data = &cd->driver; in sr_probe()
782 disk->queue = sdev->request_queue; in sr_probe()
784 if (register_cdrom(disk, &cd->cdi)) in sr_probe()
794 disk->flags |= GENHD_FL_REMOVABLE; in sr_probe()
796 device_add_disk(&sdev->sdev_gendev, disk, NULL); in sr_probe()
809 put_disk(disk); in sr_probe()
889 set_capacity(cd->disk, cd->capacity); in get_sectorsize()
1037 struct gendisk *disk = cd->disk; in sr_kref_release() local
1040 clear_bit(MINOR(disk_devt(disk)), sr_index_bits); in sr_kref_release()
1045 disk->private_data = NULL; in sr_kref_release()
1047 put_disk(disk); in sr_kref_release()
1060 del_gendisk(cd->disk); in sr_remove()