cdi               172 drivers/block/paride/pcd.c static int pcd_open(struct cdrom_device_info *cdi, int purpose);
cdi               173 drivers/block/paride/pcd.c static void pcd_release(struct cdrom_device_info *cdi);
cdi               174 drivers/block/paride/pcd.c static int pcd_drive_status(struct cdrom_device_info *cdi, int slot_nr);
cdi               175 drivers/block/paride/pcd.c static unsigned int pcd_check_events(struct cdrom_device_info *cdi,
cdi               177 drivers/block/paride/pcd.c static int pcd_tray_move(struct cdrom_device_info *cdi, int position);
cdi               178 drivers/block/paride/pcd.c static int pcd_lock_door(struct cdrom_device_info *cdi, int lock);
cdi               179 drivers/block/paride/pcd.c static int pcd_drive_reset(struct cdrom_device_info *cdi);
cdi               180 drivers/block/paride/pcd.c static int pcd_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn);
cdi               181 drivers/block/paride/pcd.c static int pcd_audio_ioctl(struct cdrom_device_info *cdi,
cdi               183 drivers/block/paride/pcd.c static int pcd_packet(struct cdrom_device_info *cdi,
cdi               350 drivers/block/paride/pcd.c static int pcd_open(struct cdrom_device_info *cdi, int purpose)
cdi               352 drivers/block/paride/pcd.c 	struct pcd_unit *cd = cdi->handle;
cdi               358 drivers/block/paride/pcd.c static void pcd_release(struct cdrom_device_info *cdi)
cdi               523 drivers/block/paride/pcd.c static int pcd_packet(struct cdrom_device_info *cdi, struct packet_command *cgc)
cdi               525 drivers/block/paride/pcd.c 	return pcd_atapi(cdi->handle, cgc->cmd, cgc->buflen, cgc->buffer,
cdi               531 drivers/block/paride/pcd.c static unsigned int pcd_check_events(struct cdrom_device_info *cdi,
cdi               534 drivers/block/paride/pcd.c 	struct pcd_unit *cd = cdi->handle;
cdi               541 drivers/block/paride/pcd.c static int pcd_lock_door(struct cdrom_device_info *cdi, int lock)
cdi               545 drivers/block/paride/pcd.c 	return pcd_atapi(cdi->handle, un_cmd, 0, pcd_scratch,
cdi               549 drivers/block/paride/pcd.c static int pcd_tray_move(struct cdrom_device_info *cdi, int position)
cdi               553 drivers/block/paride/pcd.c 	return pcd_atapi(cdi->handle, ej_cmd, 0, pcd_scratch,
cdi               594 drivers/block/paride/pcd.c static int pcd_drive_reset(struct cdrom_device_info *cdi)
cdi               596 drivers/block/paride/pcd.c 	return pcd_reset(cdi->handle);
cdi               619 drivers/block/paride/pcd.c static int pcd_drive_status(struct cdrom_device_info *cdi, int slot_nr)
cdi               622 drivers/block/paride/pcd.c 	struct pcd_unit *cd = cdi->handle;
cdi               922 drivers/block/paride/pcd.c static int pcd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, void *arg)
cdi               924 drivers/block/paride/pcd.c 	struct pcd_unit *cd = cdi->handle;
cdi               987 drivers/block/paride/pcd.c static int pcd_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn)
cdi               993 drivers/block/paride/pcd.c 	if (pcd_atapi(cdi->handle, cmd, 24, buffer, "get mcn"))
cdi               333 drivers/cdrom/cdrom.c #define CDROM_CAN(type) (cdi->ops->capability & ~cdi->mask & (type))
cdi               347 drivers/cdrom/cdrom.c int cdrom_dummy_generic_packet(struct cdrom_device_info *cdi,
cdi               361 drivers/cdrom/cdrom.c static int cdrom_flush_cache(struct cdrom_device_info *cdi)
cdi               370 drivers/cdrom/cdrom.c 	return cdi->ops->generic_packet(cdi, &cgc);
cdi               374 drivers/cdrom/cdrom.c static int cdrom_get_disc_info(struct cdrom_device_info *cdi,
cdi               377 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi               387 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, &cgc);
cdi               401 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, &cgc);
cdi               424 drivers/cdrom/cdrom.c static int cdrom_mrw_probe_pc(struct cdrom_device_info *cdi)
cdi               434 drivers/cdrom/cdrom.c 	if (!cdrom_mode_sense(cdi, &cgc, MRW_MODE_PC, 0)) {
cdi               435 drivers/cdrom/cdrom.c 		cdi->mrw_mode_page = MRW_MODE_PC;
cdi               437 drivers/cdrom/cdrom.c 	} else if (!cdrom_mode_sense(cdi, &cgc, MRW_MODE_PC_PRE1, 0)) {
cdi               438 drivers/cdrom/cdrom.c 		cdi->mrw_mode_page = MRW_MODE_PC_PRE1;
cdi               445 drivers/cdrom/cdrom.c static int cdrom_is_mrw(struct cdrom_device_info *cdi, int *write)
cdi               461 drivers/cdrom/cdrom.c 	if ((ret = cdi->ops->generic_packet(cdi, &cgc)))
cdi               469 drivers/cdrom/cdrom.c 	if ((ret = cdrom_mrw_probe_pc(cdi))) {
cdi               477 drivers/cdrom/cdrom.c static int cdrom_mrw_bgformat(struct cdrom_device_info *cdi, int cont)
cdi               511 drivers/cdrom/cdrom.c 	ret = cdi->ops->generic_packet(cdi, &cgc);
cdi               518 drivers/cdrom/cdrom.c static int cdrom_mrw_bgformat_susp(struct cdrom_device_info *cdi, int immed)
cdi               533 drivers/cdrom/cdrom.c 	return cdi->ops->generic_packet(cdi, &cgc);
cdi               536 drivers/cdrom/cdrom.c static int cdrom_mrw_exit(struct cdrom_device_info *cdi)
cdi               541 drivers/cdrom/cdrom.c 	ret = cdrom_get_disc_info(cdi, &di);
cdi               548 drivers/cdrom/cdrom.c 		ret = cdrom_mrw_bgformat_susp(cdi, 0);
cdi               551 drivers/cdrom/cdrom.c 	if (!ret && cdi->media_written)
cdi               552 drivers/cdrom/cdrom.c 		ret = cdrom_flush_cache(cdi);
cdi               557 drivers/cdrom/cdrom.c static int cdrom_mrw_set_lba_space(struct cdrom_device_info *cdi, int space)
cdi               569 drivers/cdrom/cdrom.c 	ret = cdrom_mode_sense(cdi, &cgc, cdi->mrw_mode_page, 0);
cdi               580 drivers/cdrom/cdrom.c 	ret = cdrom_mode_select(cdi, &cgc);
cdi               585 drivers/cdrom/cdrom.c 		cdi->name, mrw_address_space[space]);
cdi               589 drivers/cdrom/cdrom.c int register_cdrom(struct cdrom_device_info *cdi)
cdi               592 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi               614 drivers/cdrom/cdrom.c 	cdi->mc_flags = 0;
cdi               615 drivers/cdrom/cdrom.c 	cdi->options = CDO_USE_FFLAGS;
cdi               618 drivers/cdrom/cdrom.c 		cdi->options |= (int) CDO_AUTO_CLOSE;
cdi               620 drivers/cdrom/cdrom.c 		cdi->options |= (int) CDO_AUTO_EJECT;
cdi               622 drivers/cdrom/cdrom.c 		cdi->options |= (int) CDO_LOCK;
cdi               624 drivers/cdrom/cdrom.c 		cdi->options |= (int) CDO_CHECK_TYPE;
cdi               627 drivers/cdrom/cdrom.c 		cdi->exit = cdrom_mrw_exit;
cdi               629 drivers/cdrom/cdrom.c 	if (cdi->disk)
cdi               630 drivers/cdrom/cdrom.c 		cdi->cdda_method = CDDA_BPC_FULL;
cdi               632 drivers/cdrom/cdrom.c 		cdi->cdda_method = CDDA_OLD;
cdi               636 drivers/cdrom/cdrom.c 	cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi->name);
cdi               638 drivers/cdrom/cdrom.c 	list_add(&cdi->list, &cdrom_list);
cdi               644 drivers/cdrom/cdrom.c void unregister_cdrom(struct cdrom_device_info *cdi)
cdi               649 drivers/cdrom/cdrom.c 	list_del(&cdi->list);
cdi               652 drivers/cdrom/cdrom.c 	if (cdi->exit)
cdi               653 drivers/cdrom/cdrom.c 		cdi->exit(cdi);
cdi               655 drivers/cdrom/cdrom.c 	cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name);
cdi               658 drivers/cdrom/cdrom.c int cdrom_get_media_event(struct cdrom_device_info *cdi,
cdi               672 drivers/cdrom/cdrom.c 	if (cdi->ops->generic_packet(cdi, &cgc))
cdi               685 drivers/cdrom/cdrom.c static int cdrom_get_random_writable(struct cdrom_device_info *cdi,
cdi               699 drivers/cdrom/cdrom.c 	if ((ret = cdi->ops->generic_packet(cdi, &cgc)))
cdi               706 drivers/cdrom/cdrom.c static int cdrom_has_defect_mgt(struct cdrom_device_info *cdi)
cdi               720 drivers/cdrom/cdrom.c 	if ((ret = cdi->ops->generic_packet(cdi, &cgc)))
cdi               731 drivers/cdrom/cdrom.c static int cdrom_is_random_writable(struct cdrom_device_info *cdi, int *write)
cdi               738 drivers/cdrom/cdrom.c 	if ((ret = cdrom_get_random_writable(cdi, &rfd)))
cdi               747 drivers/cdrom/cdrom.c static int cdrom_media_erasable(struct cdrom_device_info *cdi)
cdi               752 drivers/cdrom/cdrom.c 	ret = cdrom_get_disc_info(cdi, &di);
cdi               762 drivers/cdrom/cdrom.c static int cdrom_dvdram_open_write(struct cdrom_device_info *cdi)
cdi               764 drivers/cdrom/cdrom.c 	int ret = cdrom_media_erasable(cdi);
cdi               776 drivers/cdrom/cdrom.c static int cdrom_mrw_open_write(struct cdrom_device_info *cdi)
cdi               784 drivers/cdrom/cdrom.c 	if (cdrom_mrw_set_lba_space(cdi, MRW_LBA_DMA)) {
cdi               789 drivers/cdrom/cdrom.c 	ret = cdrom_get_disc_info(cdi, &di);
cdi               809 drivers/cdrom/cdrom.c 		ret = cdrom_mrw_bgformat(cdi, 1);
cdi               814 drivers/cdrom/cdrom.c static int mo_open_write(struct cdrom_device_info *cdi)
cdi               828 drivers/cdrom/cdrom.c 	ret = cdrom_mode_sense(cdi, &cgc, GPMODE_ALL_PAGES, 0);
cdi               830 drivers/cdrom/cdrom.c 		ret = cdrom_mode_sense(cdi, &cgc, GPMODE_VENDOR_PAGE, 0);
cdi               833 drivers/cdrom/cdrom.c 		ret = cdrom_mode_sense(cdi, &cgc, GPMODE_ALL_PAGES, 0);
cdi               843 drivers/cdrom/cdrom.c static int cdrom_ram_open_write(struct cdrom_device_info *cdi)
cdi               848 drivers/cdrom/cdrom.c 	if ((ret = cdrom_has_defect_mgt(cdi)))
cdi               851 drivers/cdrom/cdrom.c 	if ((ret = cdrom_get_random_writable(cdi, &rfd)))
cdi               860 drivers/cdrom/cdrom.c static void cdrom_mmc3_profile(struct cdrom_device_info *cdi)
cdi               874 drivers/cdrom/cdrom.c 	if ((ret = cdi->ops->generic_packet(cdi, &cgc)))
cdi               879 drivers/cdrom/cdrom.c 	cdi->mmc3_profile = mmc3_profile;
cdi               882 drivers/cdrom/cdrom.c static int cdrom_is_dvd_rw(struct cdrom_device_info *cdi)
cdi               884 drivers/cdrom/cdrom.c 	switch (cdi->mmc3_profile) {
cdi               897 drivers/cdrom/cdrom.c static int cdrom_open_write(struct cdrom_device_info *cdi)
cdi               903 drivers/cdrom/cdrom.c 	if (!cdrom_is_mrw(cdi, &mrw_write))
cdi               909 drivers/cdrom/cdrom.c 		(void) cdrom_is_random_writable(cdi, &ram_write);
cdi               912 drivers/cdrom/cdrom.c 		cdi->mask &= ~CDC_MRW;
cdi               914 drivers/cdrom/cdrom.c 		cdi->mask |= CDC_MRW;
cdi               917 drivers/cdrom/cdrom.c 		cdi->mask &= ~CDC_MRW_W;
cdi               919 drivers/cdrom/cdrom.c 		cdi->mask |= CDC_MRW_W;
cdi               922 drivers/cdrom/cdrom.c 		cdi->mask &= ~CDC_RAM;
cdi               924 drivers/cdrom/cdrom.c 		cdi->mask |= CDC_RAM;
cdi               927 drivers/cdrom/cdrom.c 		ret = cdrom_mrw_open_write(cdi);
cdi               929 drivers/cdrom/cdrom.c 		ret = cdrom_dvdram_open_write(cdi);
cdi               932 drivers/cdrom/cdrom.c  		ret = cdrom_ram_open_write(cdi);
cdi               934 drivers/cdrom/cdrom.c 		ret = mo_open_write(cdi);
cdi               935 drivers/cdrom/cdrom.c 	else if (!cdrom_is_dvd_rw(cdi))
cdi               941 drivers/cdrom/cdrom.c static void cdrom_dvd_rw_close_write(struct cdrom_device_info *cdi)
cdi               945 drivers/cdrom/cdrom.c 	if (cdi->mmc3_profile != 0x1a) {
cdi               946 drivers/cdrom/cdrom.c 		cd_dbg(CD_CLOSE, "%s: No DVD+RW\n", cdi->name);
cdi               950 drivers/cdrom/cdrom.c 	if (!cdi->media_written) {
cdi               951 drivers/cdrom/cdrom.c 		cd_dbg(CD_CLOSE, "%s: DVD+RW media clean\n", cdi->name);
cdi               955 drivers/cdrom/cdrom.c 	pr_info("%s: dirty DVD+RW media, \"finalizing\"\n", cdi->name);
cdi               960 drivers/cdrom/cdrom.c 	cdi->ops->generic_packet(cdi, &cgc);
cdi               966 drivers/cdrom/cdrom.c 	cdi->ops->generic_packet(cdi, &cgc);
cdi               973 drivers/cdrom/cdrom.c 	cdi->ops->generic_packet(cdi, &cgc);
cdi               975 drivers/cdrom/cdrom.c 	cdi->media_written = 0;
cdi               978 drivers/cdrom/cdrom.c static int cdrom_close_write(struct cdrom_device_info *cdi)
cdi               981 drivers/cdrom/cdrom.c 	return cdrom_flush_cache(cdi);
cdi               988 drivers/cdrom/cdrom.c static void cdrom_count_tracks(struct cdrom_device_info *cdi, tracktype *tracks)
cdi               995 drivers/cdrom/cdrom.c 	tracks->cdi = 0;
cdi              1006 drivers/cdrom/cdrom.c 	ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCHDR, &header);
cdi              1018 drivers/cdrom/cdrom.c 		if (cdi->ops->audio_ioctl(cdi, CDROMREADTOCENTRY, &entry)) {
cdi              1024 drivers/cdrom/cdrom.c 				tracks->cdi++;
cdi              1037 drivers/cdrom/cdrom.c 	       tracks->cdi, tracks->xa);
cdi              1041 drivers/cdrom/cdrom.c int open_for_data(struct cdrom_device_info *cdi)
cdi              1044 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1050 drivers/cdrom/cdrom.c 		ret = cdo->drive_status(cdi, CDSL_CURRENT);
cdi              1056 drivers/cdrom/cdrom.c 			    cdi->options & CDO_AUTO_CLOSE) {
cdi              1058 drivers/cdrom/cdrom.c 				ret=cdo->tray_move(cdi,0);
cdi              1075 drivers/cdrom/cdrom.c 			ret = cdo->drive_status(cdi, CDSL_CURRENT);
cdi              1085 drivers/cdrom/cdrom.c 		ret = cdo->drive_status(cdi, CDSL_CURRENT);
cdi              1091 drivers/cdrom/cdrom.c 	cdrom_count_tracks(cdi, &tracks);
cdi              1100 drivers/cdrom/cdrom.c 		if (cdi->options & CDO_CHECK_TYPE) {
cdi              1117 drivers/cdrom/cdrom.c 	ret = cdo->open(cdi, 0); /* open for data */
cdi              1126 drivers/cdrom/cdrom.c 	if (CDROM_CAN(CDC_LOCK) && (cdi->options & CDO_LOCK)) {
cdi              1127 drivers/cdrom/cdrom.c 			cdo->lock_door(cdi, 1);
cdi              1140 drivers/cdrom/cdrom.c 	if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
cdi              1141 drivers/cdrom/cdrom.c 			cdo->lock_door(cdi, 0);
cdi              1155 drivers/cdrom/cdrom.c int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev,
cdi              1164 drivers/cdrom/cdrom.c 	cdi->use_count++;
cdi              1165 drivers/cdrom/cdrom.c 	if ((mode & FMODE_NDELAY) && (cdi->options & CDO_USE_FFLAGS)) {
cdi              1166 drivers/cdrom/cdrom.c 		ret = cdi->ops->open(cdi, 1);
cdi              1168 drivers/cdrom/cdrom.c 		ret = open_for_data(cdi);
cdi              1172 drivers/cdrom/cdrom.c 			cdrom_mmc3_profile(cdi);
cdi              1175 drivers/cdrom/cdrom.c 			if (cdrom_open_write(cdi))
cdi              1180 drivers/cdrom/cdrom.c 			cdi->media_written = 0;
cdi              1188 drivers/cdrom/cdrom.c 	       cdi->name, cdi->use_count);
cdi              1191 drivers/cdrom/cdrom.c 	if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
cdi              1192 drivers/cdrom/cdrom.c 		cdi->ops->lock_door(cdi, 0);
cdi              1195 drivers/cdrom/cdrom.c 	cdi->ops->release(cdi);
cdi              1197 drivers/cdrom/cdrom.c 	cdi->use_count--;
cdi              1204 drivers/cdrom/cdrom.c static int check_for_audio_disc(struct cdrom_device_info *cdi,
cdi              1210 drivers/cdrom/cdrom.c 	if (!(cdi->options & CDO_CHECK_TYPE))
cdi              1213 drivers/cdrom/cdrom.c 		ret = cdo->drive_status(cdi, CDSL_CURRENT);
cdi              1219 drivers/cdrom/cdrom.c 			    cdi->options & CDO_AUTO_CLOSE) {
cdi              1221 drivers/cdrom/cdrom.c 				ret=cdo->tray_move(cdi,0);
cdi              1236 drivers/cdrom/cdrom.c 			ret = cdo->drive_status(cdi, CDSL_CURRENT);
cdi              1248 drivers/cdrom/cdrom.c 	cdrom_count_tracks(cdi, &tracks);
cdi              1258 drivers/cdrom/cdrom.c void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode)
cdi              1260 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1265 drivers/cdrom/cdrom.c 	if (cdi->use_count > 0)
cdi              1266 drivers/cdrom/cdrom.c 		cdi->use_count--;
cdi              1268 drivers/cdrom/cdrom.c 	if (cdi->use_count == 0) {
cdi              1270 drivers/cdrom/cdrom.c 		       cdi->name);
cdi              1271 drivers/cdrom/cdrom.c 		cdrom_dvd_rw_close_write(cdi);
cdi              1273 drivers/cdrom/cdrom.c 		if ((cdo->capability & CDC_LOCK) && !cdi->keeplocked) {
cdi              1275 drivers/cdrom/cdrom.c 			cdo->lock_door(cdi, 0);
cdi              1279 drivers/cdrom/cdrom.c 	opened_for_data = !(cdi->options & CDO_USE_FFLAGS) ||
cdi              1285 drivers/cdrom/cdrom.c 	if (CDROM_CAN(CDC_RAM) && !cdi->use_count && cdi->for_data)
cdi              1286 drivers/cdrom/cdrom.c 		cdrom_close_write(cdi);
cdi              1288 drivers/cdrom/cdrom.c 	cdo->release(cdi);
cdi              1289 drivers/cdrom/cdrom.c 	if (cdi->use_count == 0) {      /* last process that closes dev*/
cdi              1291 drivers/cdrom/cdrom.c 		    cdi->options & CDO_AUTO_EJECT && CDROM_CAN(CDC_OPEN_TRAY))
cdi              1292 drivers/cdrom/cdrom.c 			cdo->tray_move(cdi, 1);
cdi              1296 drivers/cdrom/cdrom.c static int cdrom_read_mech_status(struct cdrom_device_info *cdi, 
cdi              1300 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1308 drivers/cdrom/cdrom.c 	if (cdi->sanyo_slot) {
cdi              1310 drivers/cdrom/cdrom.c 		buf->hdr.curslot = cdi->sanyo_slot == 3 ? 0 : cdi->sanyo_slot;
cdi              1319 drivers/cdrom/cdrom.c 		 cdi->capacity * sizeof(struct cdrom_slot);
cdi              1325 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, &cgc);
cdi              1328 drivers/cdrom/cdrom.c static int cdrom_slot_status(struct cdrom_device_info *cdi, int slot)
cdi              1334 drivers/cdrom/cdrom.c 	if (cdi->sanyo_slot)
cdi              1341 drivers/cdrom/cdrom.c 	if ((ret = cdrom_read_mech_status(cdi, info)))
cdi              1357 drivers/cdrom/cdrom.c int cdrom_number_of_slots(struct cdrom_device_info *cdi) 
cdi              1365 drivers/cdrom/cdrom.c 	cdi->capacity = 0; 
cdi              1371 drivers/cdrom/cdrom.c 	if ((status = cdrom_read_mech_status(cdi, info)) == 0)
cdi              1380 drivers/cdrom/cdrom.c static int cdrom_load_unload(struct cdrom_device_info *cdi, int slot) 
cdi              1385 drivers/cdrom/cdrom.c 	if (cdi->sanyo_slot && slot < 0)
cdi              1397 drivers/cdrom/cdrom.c 	if (cdi->sanyo_slot && -1 < slot) {
cdi              1401 drivers/cdrom/cdrom.c 		cdi->sanyo_slot = slot ? slot : 3;
cdi              1404 drivers/cdrom/cdrom.c 	return cdi->ops->generic_packet(cdi, &cgc);
cdi              1407 drivers/cdrom/cdrom.c static int cdrom_select_disc(struct cdrom_device_info *cdi, int slot)
cdi              1417 drivers/cdrom/cdrom.c 	if (cdi->ops->check_events)
cdi              1418 drivers/cdrom/cdrom.c 		cdi->ops->check_events(cdi, 0, slot);
cdi              1420 drivers/cdrom/cdrom.c 		cdi->ops->media_changed(cdi, slot);
cdi              1424 drivers/cdrom/cdrom.c 		cdi->mc_flags = 0x3;
cdi              1425 drivers/cdrom/cdrom.c 		return cdrom_load_unload(cdi, -1);
cdi              1432 drivers/cdrom/cdrom.c 	if ((ret = cdrom_read_mech_status(cdi, info))) {
cdi              1440 drivers/cdrom/cdrom.c 	if (cdi->use_count > 1 || cdi->keeplocked) {
cdi              1457 drivers/cdrom/cdrom.c 	cdi->mc_flags = 0x3;
cdi              1458 drivers/cdrom/cdrom.c 	if ((ret = cdrom_load_unload(cdi, slot)))
cdi              1478 drivers/cdrom/cdrom.c static void cdrom_update_events(struct cdrom_device_info *cdi,
cdi              1483 drivers/cdrom/cdrom.c 	events = cdi->ops->check_events(cdi, clearing, CDSL_CURRENT);
cdi              1484 drivers/cdrom/cdrom.c 	cdi->vfs_events |= events;
cdi              1485 drivers/cdrom/cdrom.c 	cdi->ioctl_events |= events;
cdi              1488 drivers/cdrom/cdrom.c unsigned int cdrom_check_events(struct cdrom_device_info *cdi,
cdi              1493 drivers/cdrom/cdrom.c 	cdrom_update_events(cdi, clearing);
cdi              1494 drivers/cdrom/cdrom.c 	events = cdi->vfs_events;
cdi              1495 drivers/cdrom/cdrom.c 	cdi->vfs_events = 0;
cdi              1507 drivers/cdrom/cdrom.c int media_changed(struct cdrom_device_info *cdi, int queue)
cdi              1510 drivers/cdrom/cdrom.c 	int ret = !!(cdi->mc_flags & mask);
cdi              1517 drivers/cdrom/cdrom.c 	if (cdi->ops->check_events) {
cdi              1519 drivers/cdrom/cdrom.c 		cdrom_update_events(cdi, DISK_EVENT_MEDIA_CHANGE);
cdi              1520 drivers/cdrom/cdrom.c 		changed = cdi->ioctl_events & DISK_EVENT_MEDIA_CHANGE;
cdi              1521 drivers/cdrom/cdrom.c 		cdi->ioctl_events = 0;
cdi              1523 drivers/cdrom/cdrom.c 		changed = cdi->ops->media_changed(cdi, CDSL_CURRENT);
cdi              1526 drivers/cdrom/cdrom.c 		cdi->mc_flags = 0x3;    /* set bit on both queues */
cdi              1528 drivers/cdrom/cdrom.c 		cdi->media_written = 0;
cdi              1531 drivers/cdrom/cdrom.c 	cdi->mc_flags &= ~mask;         /* clear bit */
cdi              1535 drivers/cdrom/cdrom.c int cdrom_media_changed(struct cdrom_device_info *cdi)
cdi              1540 drivers/cdrom/cdrom.c 	if (cdi == NULL || cdi->ops->media_changed == NULL)
cdi              1544 drivers/cdrom/cdrom.c 	return media_changed(cdi, 0);
cdi              1644 drivers/cdrom/cdrom.c static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
cdi              1649 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1662 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1673 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1684 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1701 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1715 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1728 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1740 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc))) {
cdi              1752 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1763 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1780 drivers/cdrom/cdrom.c 		if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              1792 drivers/cdrom/cdrom.c static int dvd_read_physical(struct cdrom_device_info *cdi, dvd_struct *s,
cdi              1797 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1814 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, cgc);
cdi              1843 drivers/cdrom/cdrom.c static int dvd_read_copyright(struct cdrom_device_info *cdi, dvd_struct *s,
cdi              1848 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1857 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, cgc);
cdi              1867 drivers/cdrom/cdrom.c static int dvd_read_disckey(struct cdrom_device_info *cdi, dvd_struct *s,
cdi              1872 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1887 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, cgc);
cdi              1895 drivers/cdrom/cdrom.c static int dvd_read_bca(struct cdrom_device_info *cdi, dvd_struct *s,
cdi              1900 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1911 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, cgc);
cdi              1929 drivers/cdrom/cdrom.c static int dvd_read_manufact(struct cdrom_device_info *cdi, dvd_struct *s,
cdi              1934 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              1948 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, cgc);
cdi              1971 drivers/cdrom/cdrom.c static int dvd_read_struct(struct cdrom_device_info *cdi, dvd_struct *s,
cdi              1976 drivers/cdrom/cdrom.c 		return dvd_read_physical(cdi, s, cgc);
cdi              1979 drivers/cdrom/cdrom.c 		return dvd_read_copyright(cdi, s, cgc);
cdi              1982 drivers/cdrom/cdrom.c 		return dvd_read_disckey(cdi, s, cgc);
cdi              1985 drivers/cdrom/cdrom.c 		return dvd_read_bca(cdi, s, cgc);
cdi              1988 drivers/cdrom/cdrom.c 		return dvd_read_manufact(cdi, s, cgc);
cdi              1997 drivers/cdrom/cdrom.c int cdrom_mode_sense(struct cdrom_device_info *cdi,
cdi              2001 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              2010 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, cgc);
cdi              2013 drivers/cdrom/cdrom.c int cdrom_mode_select(struct cdrom_device_info *cdi,
cdi              2016 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              2025 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, cgc);
cdi              2028 drivers/cdrom/cdrom.c static int cdrom_read_subchannel(struct cdrom_device_info *cdi,
cdi              2031 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              2043 drivers/cdrom/cdrom.c 	if ((ret = cdo->generic_packet(cdi, &cgc)))
cdi              2075 drivers/cdrom/cdrom.c static int cdrom_read_cd(struct cdrom_device_info *cdi,
cdi              2079 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              2091 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, cgc);
cdi              2095 drivers/cdrom/cdrom.c static int cdrom_read_block(struct cdrom_device_info *cdi,
cdi              2099 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              2124 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, cgc);
cdi              2127 drivers/cdrom/cdrom.c static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf,
cdi              2134 drivers/cdrom/cdrom.c 	cdi->last_sense = 0;
cdi              2158 drivers/cdrom/cdrom.c 		ret = cdrom_read_block(cdi, &cgc, lba, nr, 1, CD_FRAMESIZE_RAW);
cdi              2173 drivers/cdrom/cdrom.c static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
cdi              2176 drivers/cdrom/cdrom.c 	struct request_queue *q = cdi->disk->queue;
cdi              2192 drivers/cdrom/cdrom.c 	cdi->last_sense = 0;
cdi              2196 drivers/cdrom/cdrom.c 		if (cdi->cdda_method == CDDA_BPC_SINGLE)
cdi              2231 drivers/cdrom/cdrom.c 		blk_execute_rq(q, cdi->disk, rq, 0);
cdi              2238 drivers/cdrom/cdrom.c 			cdi->last_sense = sshdr.sense_key;
cdi              2256 drivers/cdrom/cdrom.c static int cdrom_read_cdda(struct cdrom_device_info *cdi, __u8 __user *ubuf,
cdi              2261 drivers/cdrom/cdrom.c 	if (cdi->cdda_method == CDDA_OLD)
cdi              2262 drivers/cdrom/cdrom.c 		return cdrom_read_cdda_old(cdi, ubuf, lba, nframes);
cdi              2268 drivers/cdrom/cdrom.c 	ret = cdrom_read_cdda_bpc(cdi, ubuf, lba, nframes);
cdi              2276 drivers/cdrom/cdrom.c 	if (cdi->cdda_method == CDDA_BPC_FULL && nframes > 1) {
cdi              2278 drivers/cdrom/cdrom.c 		cdi->cdda_method = CDDA_BPC_SINGLE;
cdi              2287 drivers/cdrom/cdrom.c 	if (cdi->last_sense != 0x04 && cdi->last_sense != 0x0b)
cdi              2290 drivers/cdrom/cdrom.c 	pr_info("dropping to old style cdda (sense=%x)\n", cdi->last_sense);
cdi              2291 drivers/cdrom/cdrom.c 	cdi->cdda_method = CDDA_OLD;
cdi              2292 drivers/cdrom/cdrom.c 	return cdrom_read_cdda_old(cdi, ubuf, lba, nframes);	
cdi              2295 drivers/cdrom/cdrom.c static int cdrom_ioctl_multisession(struct cdrom_device_info *cdi,
cdi              2304 drivers/cdrom/cdrom.c 	if (!(cdi->ops->capability & CDC_MULTI_SESSION))
cdi              2315 drivers/cdrom/cdrom.c 	ret = cdi->ops->get_last_session(cdi, &ms_info);
cdi              2328 drivers/cdrom/cdrom.c static int cdrom_ioctl_eject(struct cdrom_device_info *cdi)
cdi              2334 drivers/cdrom/cdrom.c 	if (cdi->use_count != 1 || cdi->keeplocked)
cdi              2337 drivers/cdrom/cdrom.c 		int ret = cdi->ops->lock_door(cdi, 0);
cdi              2342 drivers/cdrom/cdrom.c 	return cdi->ops->tray_move(cdi, 1);
cdi              2345 drivers/cdrom/cdrom.c static int cdrom_ioctl_closetray(struct cdrom_device_info *cdi)
cdi              2351 drivers/cdrom/cdrom.c 	return cdi->ops->tray_move(cdi, 0);
cdi              2354 drivers/cdrom/cdrom.c static int cdrom_ioctl_eject_sw(struct cdrom_device_info *cdi,
cdi              2361 drivers/cdrom/cdrom.c 	if (cdi->keeplocked)
cdi              2364 drivers/cdrom/cdrom.c 	cdi->options &= ~(CDO_AUTO_CLOSE | CDO_AUTO_EJECT);
cdi              2366 drivers/cdrom/cdrom.c 		cdi->options |= CDO_AUTO_CLOSE | CDO_AUTO_EJECT;
cdi              2370 drivers/cdrom/cdrom.c static int cdrom_ioctl_media_changed(struct cdrom_device_info *cdi,
cdi              2383 drivers/cdrom/cdrom.c 		return media_changed(cdi, 1);
cdi              2385 drivers/cdrom/cdrom.c 	if (arg >= cdi->capacity)
cdi              2392 drivers/cdrom/cdrom.c 	ret = cdrom_read_mech_status(cdi, info);
cdi              2399 drivers/cdrom/cdrom.c static int cdrom_ioctl_set_options(struct cdrom_device_info *cdi,
cdi              2417 drivers/cdrom/cdrom.c 		return cdi->options;
cdi              2423 drivers/cdrom/cdrom.c 	cdi->options |= (int) arg;
cdi              2424 drivers/cdrom/cdrom.c 	return cdi->options;
cdi              2427 drivers/cdrom/cdrom.c static int cdrom_ioctl_clear_options(struct cdrom_device_info *cdi,
cdi              2432 drivers/cdrom/cdrom.c 	cdi->options &= ~(int) arg;
cdi              2433 drivers/cdrom/cdrom.c 	return cdi->options;
cdi              2436 drivers/cdrom/cdrom.c static int cdrom_ioctl_select_speed(struct cdrom_device_info *cdi,
cdi              2443 drivers/cdrom/cdrom.c 	return cdi->ops->select_speed(cdi, arg);
cdi              2446 drivers/cdrom/cdrom.c static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi,
cdi              2455 drivers/cdrom/cdrom.c 		if (arg >= cdi->capacity)
cdi              2464 drivers/cdrom/cdrom.c 	if (cdi->ops->select_disc)
cdi              2465 drivers/cdrom/cdrom.c 		return cdi->ops->select_disc(cdi, arg);
cdi              2468 drivers/cdrom/cdrom.c 	return cdrom_select_disc(cdi, arg);
cdi              2471 drivers/cdrom/cdrom.c static int cdrom_ioctl_reset(struct cdrom_device_info *cdi,
cdi              2481 drivers/cdrom/cdrom.c 	return cdi->ops->reset(cdi);
cdi              2484 drivers/cdrom/cdrom.c static int cdrom_ioctl_lock_door(struct cdrom_device_info *cdi,
cdi              2492 drivers/cdrom/cdrom.c 	cdi->keeplocked = arg ? 1 : 0;
cdi              2498 drivers/cdrom/cdrom.c 	if (cdi->use_count != 1 && !arg && !capable(CAP_SYS_ADMIN))
cdi              2500 drivers/cdrom/cdrom.c 	return cdi->ops->lock_door(cdi, arg);
cdi              2503 drivers/cdrom/cdrom.c static int cdrom_ioctl_debug(struct cdrom_device_info *cdi,
cdi              2514 drivers/cdrom/cdrom.c static int cdrom_ioctl_get_capability(struct cdrom_device_info *cdi)
cdi              2517 drivers/cdrom/cdrom.c 	return (cdi->ops->capability & ~cdi->mask);
cdi              2526 drivers/cdrom/cdrom.c static int cdrom_ioctl_get_mcn(struct cdrom_device_info *cdi,
cdi              2534 drivers/cdrom/cdrom.c 	if (!(cdi->ops->capability & CDC_MCN))
cdi              2536 drivers/cdrom/cdrom.c 	ret = cdi->ops->get_mcn(cdi, &mcn);
cdi              2546 drivers/cdrom/cdrom.c static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
cdi              2551 drivers/cdrom/cdrom.c 	if (!(cdi->ops->capability & CDC_DRIVE_STATUS))
cdi              2555 drivers/cdrom/cdrom.c 		return cdi->ops->drive_status(cdi, CDSL_CURRENT);
cdi              2556 drivers/cdrom/cdrom.c 	if (arg >= cdi->capacity)
cdi              2558 drivers/cdrom/cdrom.c 	return cdrom_slot_status(cdi, arg);
cdi              2578 drivers/cdrom/cdrom.c static int cdrom_ioctl_disc_status(struct cdrom_device_info *cdi)
cdi              2584 drivers/cdrom/cdrom.c 	cdrom_count_tracks(cdi, &tracks);
cdi              2590 drivers/cdrom/cdrom.c 		if (!tracks.data && !tracks.cdi && !tracks.xa)
cdi              2596 drivers/cdrom/cdrom.c 	if (tracks.cdi > 0)
cdi              2608 drivers/cdrom/cdrom.c static int cdrom_ioctl_changer_nslots(struct cdrom_device_info *cdi)
cdi              2611 drivers/cdrom/cdrom.c 	return cdi->capacity;
cdi              2614 drivers/cdrom/cdrom.c static int cdrom_ioctl_get_subchnl(struct cdrom_device_info *cdi,
cdi              2631 drivers/cdrom/cdrom.c 	ret = cdi->ops->audio_ioctl(cdi, CDROMSUBCHNL, &q);
cdi              2645 drivers/cdrom/cdrom.c static int cdrom_ioctl_read_tochdr(struct cdrom_device_info *cdi,
cdi              2656 drivers/cdrom/cdrom.c 	ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCHDR, &header);
cdi              2666 drivers/cdrom/cdrom.c static int cdrom_ioctl_read_tocentry(struct cdrom_device_info *cdi,
cdi              2683 drivers/cdrom/cdrom.c 	ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCENTRY, &entry);
cdi              2694 drivers/cdrom/cdrom.c static int cdrom_ioctl_play_msf(struct cdrom_device_info *cdi,
cdi              2705 drivers/cdrom/cdrom.c 	return cdi->ops->audio_ioctl(cdi, CDROMPLAYMSF, &msf);
cdi              2708 drivers/cdrom/cdrom.c static int cdrom_ioctl_play_trkind(struct cdrom_device_info *cdi,
cdi              2721 drivers/cdrom/cdrom.c 	ret = check_for_audio_disc(cdi, cdi->ops);
cdi              2724 drivers/cdrom/cdrom.c 	return cdi->ops->audio_ioctl(cdi, CDROMPLAYTRKIND, &ti);
cdi              2726 drivers/cdrom/cdrom.c static int cdrom_ioctl_volctrl(struct cdrom_device_info *cdi,
cdi              2737 drivers/cdrom/cdrom.c 	return cdi->ops->audio_ioctl(cdi, CDROMVOLCTRL, &volume);
cdi              2740 drivers/cdrom/cdrom.c static int cdrom_ioctl_volread(struct cdrom_device_info *cdi,
cdi              2751 drivers/cdrom/cdrom.c 	ret = cdi->ops->audio_ioctl(cdi, CDROMVOLREAD, &volume);
cdi              2760 drivers/cdrom/cdrom.c static int cdrom_ioctl_audioctl(struct cdrom_device_info *cdi,
cdi              2769 drivers/cdrom/cdrom.c 	ret = check_for_audio_disc(cdi, cdi->ops);
cdi              2772 drivers/cdrom/cdrom.c 	return cdi->ops->audio_ioctl(cdi, cmd, NULL);
cdi              2779 drivers/cdrom/cdrom.c static int cdrom_switch_blocksize(struct cdrom_device_info *cdi, int size)
cdi              2781 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              2801 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, &cgc);
cdi              2804 drivers/cdrom/cdrom.c static int cdrom_get_track_info(struct cdrom_device_info *cdi,
cdi              2807 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              2819 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, &cgc);
cdi              2830 drivers/cdrom/cdrom.c 	ret = cdo->generic_packet(cdi, &cgc);
cdi              2840 drivers/cdrom/cdrom.c int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written)
cdi              2851 drivers/cdrom/cdrom.c 	ret = cdrom_get_disc_info(cdi, &di);
cdi              2858 drivers/cdrom/cdrom.c 	ti_size = cdrom_get_track_info(cdi, last_track, 1, &ti);
cdi              2867 drivers/cdrom/cdrom.c 		ti_size = cdrom_get_track_info(cdi, last_track, 1, &ti);
cdi              2897 drivers/cdrom/cdrom.c 	if ((ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCENTRY, &toc)))
cdi              2905 drivers/cdrom/cdrom.c static int cdrom_get_next_writable(struct cdrom_device_info *cdi,
cdi              2916 drivers/cdrom/cdrom.c 	ret = cdrom_get_disc_info(cdi, &di);
cdi              2923 drivers/cdrom/cdrom.c 	ti_size = cdrom_get_track_info(cdi, last_track, 1, &ti);
cdi              2932 drivers/cdrom/cdrom.c 		ti_size = cdrom_get_track_info(cdi, last_track, 1, &ti);
cdi              2945 drivers/cdrom/cdrom.c 	ret = cdrom_get_last_written(cdi, next_writable);
cdi              2955 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_read_data(struct cdrom_device_info *cdi,
cdi              2991 drivers/cdrom/cdrom.c 	ret = cdrom_read_block(cdi, cgc, lba, 1, format, blocksize);
cdi              3000 drivers/cdrom/cdrom.c 		ret = cdrom_switch_blocksize(cdi, blocksize);
cdi              3004 drivers/cdrom/cdrom.c 		ret = cdrom_read_cd(cdi, cgc, lba, blocksize, 1);
cdi              3005 drivers/cdrom/cdrom.c 		ret |= cdrom_switch_blocksize(cdi, blocksize);
cdi              3014 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_read_audio(struct cdrom_device_info *cdi,
cdi              3037 drivers/cdrom/cdrom.c 	return cdrom_read_cdda(cdi, ra.buf, lba, ra.nframes);
cdi              3040 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_subchannel(struct cdrom_device_info *cdi,
cdi              3053 drivers/cdrom/cdrom.c 	ret = cdrom_read_subchannel(cdi, &q, 0);
cdi              3065 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_play_msf(struct cdrom_device_info *cdi,
cdi              3069 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              3082 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, cgc);
cdi              3085 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_play_blk(struct cdrom_device_info *cdi,
cdi              3089 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              3102 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, cgc);
cdi              3105 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_volume(struct cdrom_device_info *cdi,
cdi              3124 drivers/cdrom/cdrom.c 	ret = cdrom_mode_sense(cdi, cgc, GPMODE_AUDIO_CTL_PAGE, 0);
cdi              3139 drivers/cdrom/cdrom.c 		ret = cdrom_mode_sense(cdi, cgc,
cdi              3165 drivers/cdrom/cdrom.c 	ret = cdrom_mode_sense(cdi, cgc, GPMODE_AUDIO_CTL_PAGE, 1);
cdi              3177 drivers/cdrom/cdrom.c 	return cdrom_mode_select(cdi, cgc);
cdi              3180 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_start_stop(struct cdrom_device_info *cdi,
cdi              3184 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              3190 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, cgc);
cdi              3193 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_pause_resume(struct cdrom_device_info *cdi,
cdi              3197 drivers/cdrom/cdrom.c 	const struct cdrom_device_ops *cdo = cdi->ops;
cdi              3202 drivers/cdrom/cdrom.c 	return cdo->generic_packet(cdi, cgc);
cdi              3205 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_dvd_read_struct(struct cdrom_device_info *cdi,
cdi              3222 drivers/cdrom/cdrom.c 	ret = dvd_read_struct(cdi, s, cgc);
cdi              3233 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_dvd_auth(struct cdrom_device_info *cdi,
cdi              3243 drivers/cdrom/cdrom.c 	ret = dvd_do_auth(cdi, &ai);
cdi              3251 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_next_writable(struct cdrom_device_info *cdi,
cdi              3257 drivers/cdrom/cdrom.c 	ret = cdrom_get_next_writable(cdi, &next);
cdi              3265 drivers/cdrom/cdrom.c static noinline int mmc_ioctl_cdrom_last_written(struct cdrom_device_info *cdi,
cdi              3271 drivers/cdrom/cdrom.c 	ret = cdrom_get_last_written(cdi, &last);
cdi              3279 drivers/cdrom/cdrom.c static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
cdi              3293 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_read_data(cdi, userptr, &cgc, cmd);
cdi              3295 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_read_audio(cdi, userptr);
cdi              3297 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_subchannel(cdi, userptr);
cdi              3299 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_play_msf(cdi, userptr, &cgc);
cdi              3301 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_play_blk(cdi, userptr, &cgc);
cdi              3304 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_volume(cdi, userptr, &cgc, cmd);
cdi              3307 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_start_stop(cdi, &cgc, cmd);
cdi              3310 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_pause_resume(cdi, &cgc, cmd);
cdi              3312 drivers/cdrom/cdrom.c 		return mmc_ioctl_dvd_read_struct(cdi, userptr, &cgc);
cdi              3314 drivers/cdrom/cdrom.c 		return mmc_ioctl_dvd_auth(cdi, userptr);
cdi              3316 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_next_writable(cdi, userptr);
cdi              3318 drivers/cdrom/cdrom.c 		return mmc_ioctl_cdrom_last_written(cdi, userptr);
cdi              3329 drivers/cdrom/cdrom.c int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
cdi              3344 drivers/cdrom/cdrom.c 		return cdrom_ioctl_multisession(cdi, argp);
cdi              3346 drivers/cdrom/cdrom.c 		return cdrom_ioctl_eject(cdi);
cdi              3348 drivers/cdrom/cdrom.c 		return cdrom_ioctl_closetray(cdi);
cdi              3350 drivers/cdrom/cdrom.c 		return cdrom_ioctl_eject_sw(cdi, arg);
cdi              3352 drivers/cdrom/cdrom.c 		return cdrom_ioctl_media_changed(cdi, arg);
cdi              3354 drivers/cdrom/cdrom.c 		return cdrom_ioctl_set_options(cdi, arg);
cdi              3356 drivers/cdrom/cdrom.c 		return cdrom_ioctl_clear_options(cdi, arg);
cdi              3358 drivers/cdrom/cdrom.c 		return cdrom_ioctl_select_speed(cdi, arg);
cdi              3360 drivers/cdrom/cdrom.c 		return cdrom_ioctl_select_disc(cdi, arg);
cdi              3362 drivers/cdrom/cdrom.c 		return cdrom_ioctl_reset(cdi, bdev);
cdi              3364 drivers/cdrom/cdrom.c 		return cdrom_ioctl_lock_door(cdi, arg);
cdi              3366 drivers/cdrom/cdrom.c 		return cdrom_ioctl_debug(cdi, arg);
cdi              3368 drivers/cdrom/cdrom.c 		return cdrom_ioctl_get_capability(cdi);
cdi              3370 drivers/cdrom/cdrom.c 		return cdrom_ioctl_get_mcn(cdi, argp);
cdi              3372 drivers/cdrom/cdrom.c 		return cdrom_ioctl_drive_status(cdi, arg);
cdi              3374 drivers/cdrom/cdrom.c 		return cdrom_ioctl_disc_status(cdi);
cdi              3376 drivers/cdrom/cdrom.c 		return cdrom_ioctl_changer_nslots(cdi);
cdi              3386 drivers/cdrom/cdrom.c 		ret = mmc_ioctl(cdi, cmd, arg);
cdi              3398 drivers/cdrom/cdrom.c 		return cdrom_ioctl_get_subchnl(cdi, argp);
cdi              3400 drivers/cdrom/cdrom.c 		return cdrom_ioctl_read_tochdr(cdi, argp);
cdi              3402 drivers/cdrom/cdrom.c 		return cdrom_ioctl_read_tocentry(cdi, argp);
cdi              3404 drivers/cdrom/cdrom.c 		return cdrom_ioctl_play_msf(cdi, argp);
cdi              3406 drivers/cdrom/cdrom.c 		return cdrom_ioctl_play_trkind(cdi, argp);
cdi              3408 drivers/cdrom/cdrom.c 		return cdrom_ioctl_volctrl(cdi, argp);
cdi              3410 drivers/cdrom/cdrom.c 		return cdrom_ioctl_volread(cdi, argp);
cdi              3415 drivers/cdrom/cdrom.c 		return cdrom_ioctl_audioctl(cdi, cmd);
cdi              3458 drivers/cdrom/cdrom.c 	struct cdrom_device_info *cdi;
cdi              3467 drivers/cdrom/cdrom.c 	list_for_each_entry(cdi, &cdrom_list, list) {
cdi              3471 drivers/cdrom/cdrom.c 					"\t%s", cdi->name);
cdi              3475 drivers/cdrom/cdrom.c 					"\t%d", cdi->speed);
cdi              3479 drivers/cdrom/cdrom.c 					"\t%d", cdi->capacity);
cdi              3586 drivers/cdrom/cdrom.c 	struct cdrom_device_info *cdi;
cdi              3589 drivers/cdrom/cdrom.c 	list_for_each_entry(cdi, &cdrom_list, list) {
cdi              3591 drivers/cdrom/cdrom.c 			cdi->options |= CDO_AUTO_CLOSE;
cdi              3593 drivers/cdrom/cdrom.c 			cdi->options &= ~CDO_AUTO_CLOSE;
cdi              3595 drivers/cdrom/cdrom.c 			cdi->options |= CDO_AUTO_EJECT;
cdi              3597 drivers/cdrom/cdrom.c 			cdi->options &= ~CDO_AUTO_EJECT;
cdi              3599 drivers/cdrom/cdrom.c 			cdi->options |= CDO_LOCK;
cdi              3601 drivers/cdrom/cdrom.c 			cdi->options &= ~CDO_LOCK;
cdi              3603 drivers/cdrom/cdrom.c 			cdi->options |= CDO_CHECK_TYPE;
cdi              3605 drivers/cdrom/cdrom.c 			cdi->options &= ~CDO_CHECK_TYPE;
cdi               459 drivers/cdrom/gdrom.c static int gdrom_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
cdi               961 drivers/ide/ide-cd.c 	struct cdrom_device_info *cdi;
cdi               969 drivers/ide/ide-cd.c 	cdi = &info->devinfo;
cdi               978 drivers/ide/ide-cd.c 	cmd[7] = cdi->sanyo_slot % 3;
cdi              1062 drivers/ide/ide-cd.c 	struct cdrom_device_info *cdi = &info->devinfo;
cdi              1211 drivers/ide/ide-cd.c 	stat = cdrom_get_last_written(cdi, &last_written);
cdi              1227 drivers/ide/ide-cd.c 	struct cdrom_device_info *cdi = &info->devinfo;
cdi              1239 drivers/ide/ide-cd.c 		stat = cdrom_mode_sense(cdi, &cgc, GPMODE_CAPABILITIES_PAGE, 0);
cdi              1314 drivers/ide/ide-cd.c 	struct cdrom_device_info *cdi = &cd->devinfo;
cdi              1322 drivers/ide/ide-cd.c 	cdi->mask = (CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R |
cdi              1327 drivers/ide/ide-cd.c 		cdi->mask &= ~(CDC_MO_DRIVE | CDC_RAM);
cdi              1335 drivers/ide/ide-cd.c 		cdi->mask &= ~CDC_PLAY_AUDIO;
cdi              1345 drivers/ide/ide-cd.c 	cdi->handle = drive;
cdi              1346 drivers/ide/ide-cd.c 	cdi->ops = &ide_cdrom_dops;
cdi              1356 drivers/ide/ide-cd.c 		cdi->mask &= ~CDC_CD_R;
cdi              1358 drivers/ide/ide-cd.c 		cdi->mask &= ~(CDC_CD_RW | CDC_RAM);
cdi              1360 drivers/ide/ide-cd.c 		cdi->mask &= ~CDC_DVD;
cdi              1362 drivers/ide/ide-cd.c 		cdi->mask &= ~(CDC_DVD_RAM | CDC_RAM);
cdi              1364 drivers/ide/ide-cd.c 		cdi->mask &= ~CDC_DVD_R;
cdi              1366 drivers/ide/ide-cd.c 		cdi->mask &= ~CDC_PLAY_AUDIO;
cdi              1372 drivers/ide/ide-cd.c 		cdi->mask |= CDC_CLOSE_TRAY;
cdi              1374 drivers/ide/ide-cd.c 	if (cdi->sanyo_slot > 0) {
cdi              1375 drivers/ide/ide-cd.c 		cdi->mask &= ~CDC_SELECT_DISC;
cdi              1379 drivers/ide/ide-cd.c 		nslots = cdrom_number_of_slots(cdi);
cdi              1381 drivers/ide/ide-cd.c 			cdi->mask &= ~CDC_SELECT_DISC;
cdi              1392 drivers/ide/ide-cd.c 	printk(KERN_CONT " %s", (cdi->mask & CDC_DVD) ? "CD-ROM" : "DVD-ROM");
cdi              1394 drivers/ide/ide-cd.c 	if ((cdi->mask & CDC_DVD_R) == 0 || (cdi->mask & CDC_DVD_RAM) == 0)
cdi              1396 drivers/ide/ide-cd.c 				 (cdi->mask & CDC_DVD_R) ? "" : "-R",
cdi              1397 drivers/ide/ide-cd.c 				 (cdi->mask & CDC_DVD_RAM) ? "" : "/RAM");
cdi              1399 drivers/ide/ide-cd.c 	if ((cdi->mask & CDC_CD_R) == 0 || (cdi->mask & CDC_CD_RW) == 0)
cdi              1401 drivers/ide/ide-cd.c 				 (cdi->mask & CDC_CD_R) ? "" : "-R",
cdi              1402 drivers/ide/ide-cd.c 				 (cdi->mask & CDC_CD_RW) ? "" : "/RW");
cdi              1404 drivers/ide/ide-cd.c 	if ((cdi->mask & CDC_SELECT_DISC) == 0)
cdi              1516 drivers/ide/ide-cd.c 	struct cdrom_device_info *cdi = &cd->devinfo;
cdi              1540 drivers/ide/ide-cd.c 		cdi->sanyo_slot = 3;
cdi              1640 drivers/ide/ide-cd.c static int idecd_set_spindown(struct cdrom_device_info *cdi, unsigned long arg)
cdi              1652 drivers/ide/ide-cd.c 	stat = cdrom_mode_sense(cdi, &cgc, GPMODE_CDROM_PAGE, 0);
cdi              1657 drivers/ide/ide-cd.c 	return cdrom_mode_select(cdi, &cgc);
cdi              1660 drivers/ide/ide-cd.c static int idecd_get_spindown(struct cdrom_device_info *cdi, unsigned long arg)
cdi              1669 drivers/ide/ide-cd.c 	stat = cdrom_mode_sense(cdi, &cgc, GPMODE_CDROM_PAGE, 0);
cdi               119 drivers/ide/ide-cd.h int ide_cdrom_reset(struct cdrom_device_info *cdi);
cdi                21 drivers/ide/ide-cd_ioctl.c int ide_cdrom_open_real(struct cdrom_device_info *cdi, int purpose)
cdi                29 drivers/ide/ide-cd_ioctl.c void ide_cdrom_release_real(struct cdrom_device_info *cdi)
cdi                31 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi                33 drivers/ide/ide-cd_ioctl.c 	if (!cdi->use_count)
cdi                42 drivers/ide/ide-cd_ioctl.c int ide_cdrom_drive_status(struct cdrom_device_info *cdi, int slot_nr)
cdi                44 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi                56 drivers/ide/ide-cd_ioctl.c 	if (!cdrom_get_media_event(cdi, &med)) {
cdi                90 drivers/ide/ide-cd_ioctl.c unsigned int ide_cdrom_check_events_real(struct cdrom_device_info *cdi,
cdi                93 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               112 drivers/ide/ide-cd_ioctl.c 	struct cdrom_device_info *cdi = &cd->devinfo;
cdi               124 drivers/ide/ide-cd_ioctl.c 	if (ejectflag && (cdi->mask & CDC_CLOSE_TRAY))
cdi               182 drivers/ide/ide-cd_ioctl.c int ide_cdrom_tray_move(struct cdrom_device_info *cdi, int position)
cdi               184 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               196 drivers/ide/ide-cd_ioctl.c int ide_cdrom_lock_door(struct cdrom_device_info *cdi, int lock)
cdi               198 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               207 drivers/ide/ide-cd_ioctl.c int ide_cdrom_select_speed(struct cdrom_device_info *cdi, int speed)
cdi               209 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               226 drivers/ide/ide-cd_ioctl.c 	if ((cdi->mask & (CDC_CD_R | CDC_CD_RW | CDC_DVD_R)) !=
cdi               237 drivers/ide/ide-cd_ioctl.c 		cdi->speed = cd->current_speed;
cdi               243 drivers/ide/ide-cd_ioctl.c int ide_cdrom_get_last_session(struct cdrom_device_info *cdi,
cdi               247 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               264 drivers/ide/ide-cd_ioctl.c int ide_cdrom_get_mcn(struct cdrom_device_info *cdi,
cdi               267 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               292 drivers/ide/ide-cd_ioctl.c int ide_cdrom_reset(struct cdrom_device_info *cdi)
cdi               294 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               419 drivers/ide/ide-cd_ioctl.c int ide_cdrom_audio_ioctl(struct cdrom_device_info *cdi,
cdi               422 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               441 drivers/ide/ide-cd_ioctl.c int ide_cdrom_packet(struct cdrom_device_info *cdi,
cdi               444 drivers/ide/ide-cd_ioctl.c 	ide_drive_t *drive = cdi->handle;
cdi               118 drivers/scsi/sr.c static unsigned int sr_check_events(struct cdrom_device_info *cdi,
cdi               231 drivers/scsi/sr.c static unsigned int sr_check_events(struct cdrom_device_info *cdi,
cdi               234 drivers/scsi/sr.c 	struct scsi_cd *cd = cdi->handle;
cdi               446 drivers/scsi/sr.c 		cd->cdi.media_written = 1;
cdi               539 drivers/scsi/sr.c 	ret = cdrom_open(&cd->cdi, bdev, mode);
cdi               554 drivers/scsi/sr.c 	cdrom_release(&cd->cdi, mode);
cdi               587 drivers/scsi/sr.c 	ret = cdrom_ioctl(&cd->cdi, bdev, mode, cmd, arg);
cdi               612 drivers/scsi/sr.c 		ret = cdrom_check_events(&cd->cdi, clearing);
cdi               631 drivers/scsi/sr.c 	sr_cd_check(&cd->cdi);
cdi               652 drivers/scsi/sr.c static int sr_open(struct cdrom_device_info *cdi, int purpose)
cdi               654 drivers/scsi/sr.c 	struct scsi_cd *cd = cdi->handle;
cdi               672 drivers/scsi/sr.c static void sr_release(struct cdrom_device_info *cdi)
cdi               674 drivers/scsi/sr.c 	struct scsi_cd *cd = cdi->handle;
cdi               735 drivers/scsi/sr.c 	cd->cdi.ops = &sr_dops;
cdi               736 drivers/scsi/sr.c 	cd->cdi.handle = cd;
cdi               737 drivers/scsi/sr.c 	cd->cdi.mask = 0;
cdi               738 drivers/scsi/sr.c 	cd->cdi.capacity = 1;
cdi               739 drivers/scsi/sr.c 	sprintf(cd->cdi.name, "sr%d", minor);
cdi               750 drivers/scsi/sr.c 	cd->cdi.disk = disk;
cdi               752 drivers/scsi/sr.c 	if (register_cdrom(&cd->cdi))
cdi               766 drivers/scsi/sr.c 		    "Attached scsi CD-ROM %s\n", cd->cdi.name);
cdi               819 drivers/scsi/sr.c 		if (!cdrom_get_last_written(&cd->cdi, &last_written))
cdi               900 drivers/scsi/sr.c 		cd->cdi.speed = 1;
cdi               901 drivers/scsi/sr.c 		cd->cdi.mask |= (CDC_CD_R | CDC_CD_RW | CDC_DVD_R |
cdi               911 drivers/scsi/sr.c 	cd->cdi.speed = ((buffer[n + 8] << 8) + buffer[n + 9]) / 176;
cdi               918 drivers/scsi/sr.c 		  cd->cdi.speed,
cdi               927 drivers/scsi/sr.c 		cd->cdi.mask |= CDC_CLOSE_TRAY;
cdi               930 drivers/scsi/sr.c 		cd->cdi.mask |= CDC_DVD;
cdi               933 drivers/scsi/sr.c 		cd->cdi.mask |= CDC_DVD_RAM;
cdi               936 drivers/scsi/sr.c 		cd->cdi.mask |= CDC_DVD_R;
cdi               939 drivers/scsi/sr.c 		cd->cdi.mask |= CDC_CD_RW;
cdi               942 drivers/scsi/sr.c 		cd->cdi.mask |= CDC_CD_R;
cdi               945 drivers/scsi/sr.c 		cd->cdi.mask |= CDC_OPEN_TRAY;
cdi               949 drivers/scsi/sr.c 		cd->cdi.capacity =
cdi               950 drivers/scsi/sr.c 		    cdrom_number_of_slots(&cd->cdi);
cdi               951 drivers/scsi/sr.c 	if (cd->cdi.capacity <= 1)
cdi               953 drivers/scsi/sr.c 		cd->cdi.mask |= CDC_SELECT_DISC;
cdi               960 drivers/scsi/sr.c 	if ((cd->cdi.mask & (CDC_DVD_RAM | CDC_MRW_W | CDC_RAM | CDC_CD_RW)) !=
cdi               972 drivers/scsi/sr.c static int sr_packet(struct cdrom_device_info *cdi,
cdi               975 drivers/scsi/sr.c 	struct scsi_cd *cd = cdi->handle;
cdi              1007 drivers/scsi/sr.c 	unregister_cdrom(&cd->cdi);
cdi                53 drivers/scsi/sr.h 	struct cdrom_device_info cdi;
cdi                61 drivers/scsi/sr.h 	sdev_prefix_printk(prefix, (cd)->device, (cd)->cdi.name, fmt, ##a)
cdi                72 drivers/scsi/sr.h int sr_select_speed(struct cdrom_device_info *cdi, int speed);
cdi                40 drivers/scsi/sr_ioctl.c static int sr_read_tochdr(struct cdrom_device_info *cdi,
cdi                43 drivers/scsi/sr_ioctl.c 	struct scsi_cd *cd = cdi->handle;
cdi                70 drivers/scsi/sr_ioctl.c static int sr_read_tocentry(struct cdrom_device_info *cdi,
cdi                73 drivers/scsi/sr_ioctl.c 	struct scsi_cd *cd = cdi->handle;
cdi               115 drivers/scsi/sr_ioctl.c static int sr_fake_playtrkind(struct cdrom_device_info *cdi, struct cdrom_ti *ti)
cdi               122 drivers/scsi/sr_ioctl.c 	ret = sr_read_tochdr(cdi, &tochdr);
cdi               138 drivers/scsi/sr_ioctl.c 	ret = sr_read_tocentry(cdi, &trk0_te);
cdi               141 drivers/scsi/sr_ioctl.c 	ret = sr_read_tocentry(cdi, &trk1_te);
cdi               155 drivers/scsi/sr_ioctl.c 	return sr_do_ioctl(cdi->handle, &cgc);
cdi               158 drivers/scsi/sr_ioctl.c static int sr_play_trkind(struct cdrom_device_info *cdi,
cdi               162 drivers/scsi/sr_ioctl.c 	struct scsi_cd *cd = cdi->handle;
cdi               177 drivers/scsi/sr_ioctl.c 		result = sr_fake_playtrkind(cdi, ti);
cdi               263 drivers/scsi/sr_ioctl.c int sr_tray_move(struct cdrom_device_info *cdi, int pos)
cdi               265 drivers/scsi/sr_ioctl.c 	Scsi_CD *cd = cdi->handle;
cdi               276 drivers/scsi/sr_ioctl.c int sr_lock_door(struct cdrom_device_info *cdi, int lock)
cdi               278 drivers/scsi/sr_ioctl.c 	Scsi_CD *cd = cdi->handle;
cdi               284 drivers/scsi/sr_ioctl.c int sr_drive_status(struct cdrom_device_info *cdi, int slot)
cdi               286 drivers/scsi/sr_ioctl.c 	struct scsi_cd *cd = cdi->handle;
cdi               302 drivers/scsi/sr_ioctl.c 	if (!cdrom_get_media_event(cdi, &med)) {
cdi               341 drivers/scsi/sr_ioctl.c int sr_disk_status(struct cdrom_device_info *cdi)
cdi               343 drivers/scsi/sr_ioctl.c 	Scsi_CD *cd = cdi->handle;
cdi               349 drivers/scsi/sr_ioctl.c 	rc = sr_read_tochdr(cdi, &toc_h);
cdi               356 drivers/scsi/sr_ioctl.c 		if (sr_read_tocentry(cdi, &toc_e))
cdi               372 drivers/scsi/sr_ioctl.c int sr_get_last_session(struct cdrom_device_info *cdi,
cdi               375 drivers/scsi/sr_ioctl.c 	Scsi_CD *cd = cdi->handle;
cdi               383 drivers/scsi/sr_ioctl.c int sr_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn)
cdi               385 drivers/scsi/sr_ioctl.c 	Scsi_CD *cd = cdi->handle;
cdi               411 drivers/scsi/sr_ioctl.c int sr_reset(struct cdrom_device_info *cdi)
cdi               416 drivers/scsi/sr_ioctl.c int sr_select_speed(struct cdrom_device_info *cdi, int speed)
cdi               418 drivers/scsi/sr_ioctl.c 	Scsi_CD *cd = cdi->handle;
cdi               444 drivers/scsi/sr_ioctl.c int sr_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, void *arg)
cdi               448 drivers/scsi/sr_ioctl.c 		return sr_read_tochdr(cdi, arg);
cdi               450 drivers/scsi/sr_ioctl.c 		return sr_read_tocentry(cdi, arg);
cdi               452 drivers/scsi/sr_ioctl.c 		return sr_play_trkind(cdi, arg);
cdi                97 drivers/scsi/sr_vendor.c 			cd->cdi.mask |= CDC_MULTI_SESSION;
cdi               159 drivers/scsi/sr_vendor.c int sr_cd_check(struct cdrom_device_info *cdi)
cdi               161 drivers/scsi/sr_vendor.c 	Scsi_CD *cd = cdi->handle;
cdi               167 drivers/scsi/sr_vendor.c 	if (cd->cdi.mask & CDC_MULTI_SESSION)
cdi               314 drivers/scsi/sr_vendor.c 	if (CDS_AUDIO != sr_disk_status(cdi) && 1 == sr_is_xa(cd))
cdi               321 drivers/scsi/sr_vendor.c 		cdi->mask |= CDC_MULTI_SESSION;
cdi                74 include/linux/cdrom.h 	unsigned int (*check_events) (struct cdrom_device_info *cdi,
cdi                98 include/linux/cdrom.h extern int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev,
cdi               100 include/linux/cdrom.h extern void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode);
cdi               101 include/linux/cdrom.h extern int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
cdi               103 include/linux/cdrom.h extern unsigned int cdrom_check_events(struct cdrom_device_info *cdi,
cdi               107 include/linux/cdrom.h extern int register_cdrom(struct cdrom_device_info *cdi);
cdi               108 include/linux/cdrom.h extern void unregister_cdrom(struct cdrom_device_info *cdi);
cdi               113 include/linux/cdrom.h     int cdi;
cdi               118 include/linux/cdrom.h extern int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written);
cdi               119 include/linux/cdrom.h extern int cdrom_number_of_slots(struct cdrom_device_info *cdi);
cdi               120 include/linux/cdrom.h extern int cdrom_mode_select(struct cdrom_device_info *cdi,
cdi               122 include/linux/cdrom.h extern int cdrom_mode_sense(struct cdrom_device_info *cdi,
cdi               127 include/linux/cdrom.h extern int cdrom_dummy_generic_packet(struct cdrom_device_info *cdi,
cdi               301 include/linux/cdrom.h extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med);
cdi                95 tools/thermal/tmon/sysfs.c static int probe_cdev(struct cdev_info *cdi, char *path)
cdi                97 tools/thermal/tmon/sysfs.c 	sysfs_get_string(path, "type", cdi->type);
cdi                98 tools/thermal/tmon/sysfs.c 	sysfs_get_ulong(path, "max_state",  &cdi->max_state);
cdi                99 tools/thermal/tmon/sysfs.c 	sysfs_get_ulong(path, "cur_state", &cdi->cur_state);
cdi               103 tools/thermal/tmon/sysfs.c 		cdi->type, cdi->max_state, cdi->cur_state, cdi->instance);
cdi               364 tools/thermal/tmon/sysfs.c 			sysfs_get_string(cdev_name, "type", ptdata.cdi[k].type);
cdi               365 tools/thermal/tmon/sysfs.c 			ptdata.cdi[k].instance = i;
cdi               366 tools/thermal/tmon/sysfs.c 			if (strstr(ptdata.cdi[k].type, ctrl_cdev)) {
cdi               367 tools/thermal/tmon/sysfs.c 				ptdata.cdi[k].flag |= CDEV_FLAG_IN_CONTROL;
cdi               448 tools/thermal/tmon/sysfs.c 		ptdata.cdi = calloc(ptdata.max_cdev_instance + 1,
cdi               450 tools/thermal/tmon/sysfs.c 		if (!ptdata.cdi) {
cdi               513 tools/thermal/tmon/sysfs.c 			ptdata.cdi[i].instance);
cdi               514 tools/thermal/tmon/sysfs.c 		probe_cdev(&ptdata.cdi[i], cdev_name);
cdi               515 tools/thermal/tmon/sysfs.c 		val = ptdata.cdi[i].cur_state;
cdi               540 tools/thermal/tmon/sysfs.c 		if (ptdata.cdi[i].flag & CDEV_FLAG_IN_CONTROL) {
cdi               541 tools/thermal/tmon/sysfs.c 			if (ptdata.cdi[i].max_state < 10) {
cdi               546 tools/thermal/tmon/sysfs.c 			cdev_state = state * ptdata.cdi[i].max_state/100;
cdi               549 tools/thermal/tmon/sysfs.c 				ptdata.cdi[i].instance, state, cdev_state);
cdi               551 tools/thermal/tmon/sysfs.c 				CDEV, ptdata.cdi[i].instance);
cdi               569 tools/thermal/tmon/sysfs.c 		if (ptdata.cdi[i].flag & CDEV_FLAG_IN_CONTROL) {
cdi               570 tools/thermal/tmon/sysfs.c 			ctrl_cdev_id = ptdata.cdi[i].instance;
cdi               572 tools/thermal/tmon/sysfs.c 				ptdata.cdi[i].instance);
cdi               588 tools/thermal/tmon/sysfs.c 	free(ptdata.cdi);
cdi               195 tools/thermal/tmon/tmon.c 			i, ptdata.cdi[i].type);
cdi               204 tools/thermal/tmon/tmon.c 		fprintf(tmon_log, "%s%d ", ptdata.cdi[i].type,
cdi               205 tools/thermal/tmon/tmon.c 			ptdata.cdi[i].instance);
cdi                92 tools/thermal/tmon/tmon.h 	struct cdev_info *cdi;
cdi               217 tools/thermal/tmon/tui.c 			ptdata.cdi[j].instance,
cdi               218 tools/thermal/tmon/tui.c 			ptdata.cdi[j].type,
cdi               219 tools/thermal/tmon/tui.c 			ptdata.cdi[j].cur_state,
cdi               220 tools/thermal/tmon/tui.c 			ptdata.cdi[j].max_state);
cdi               237 tools/thermal/tmon/tui.c 				cdev_inst = ptdata.cdi[j].instance;
cdi               303 tools/thermal/tmon/tui.c 				ptdata.cdi[j].type, ptdata.cdi[j].instance);
cdi               430 tools/thermal/tmon/tui.c 			CDEV, ptdata.cdi[ch].instance);
cdi               456 tools/thermal/tmon/tui.c 				ptdata.cdi[cdev_id].type,
cdi               457 tools/thermal/tmon/tui.c 				ptdata.cdi[cdev_id].instance);