• Home
  • Raw
  • Download

Lines Matching refs:gd

125 } gd;  variable
233 gdrom_hardreset(gd.cd_info); in gdrom_execute_diagnostic()
256 gd.pending = 1; in gdrom_preparedisk_cmd()
257 gdrom_packetcommand(gd.cd_info, spin_command); in gdrom_preparedisk_cmd()
259 wait_event_interruptible_timeout(command_queue, gd.pending == 0, in gdrom_preparedisk_cmd()
261 gd.pending = 0; in gdrom_preparedisk_cmd()
263 if (gd.status & 0x01) { in gdrom_preparedisk_cmd()
293 if (gd.pending) { in gdrom_readtoc_cmd()
297 gd.pending = 1; in gdrom_readtoc_cmd()
298 gdrom_packetcommand(gd.cd_info, toc_command); in gdrom_readtoc_cmd()
299 wait_event_interruptible_timeout(command_queue, gd.pending == 0, in gdrom_readtoc_cmd()
301 if (gd.pending) { in gdrom_readtoc_cmd()
306 if (gd.status & 0x01) in gdrom_readtoc_cmd()
310 gd.pending = 0; in gdrom_readtoc_cmd()
336 if (!gd.toc) in gdrom_get_last_session()
340 err = gdrom_readtoc_cmd(gd.toc, 1); in gdrom_get_last_session()
344 err = gdrom_readtoc_cmd(gd.toc, 0); in gdrom_get_last_session()
351 fentry = get_entry_track(gd.toc->first); in gdrom_get_last_session()
352 lentry = get_entry_track(gd.toc->last); in gdrom_get_last_session()
354 track = get_entry_track(gd.toc->last); in gdrom_get_last_session()
356 data = gd.toc->entry[track - 1]; in gdrom_get_last_session()
362 if ((track > 100) || (track < get_entry_track(gd.toc->first))) { in gdrom_get_last_session()
446 if (gd.pending && !gdrom_wait_clrbusy()) { in gdrom_getsense()
450 gd.pending = 1; in gdrom_getsense()
451 gdrom_packetcommand(gd.cd_info, sense_command); in gdrom_getsense()
452 wait_event_interruptible_timeout(command_queue, gd.pending == 0, in gdrom_getsense()
454 if (gd.pending) in gdrom_getsense()
472 gd.pending = 0; in gdrom_getsense()
501 ret = cdrom_open(gd.cd_info, bdev, mode); in gdrom_bdops_open()
509 cdrom_release(gd.cd_info, mode); in gdrom_bdops_release()
516 return cdrom_check_events(gd.cd_info, clearing); in gdrom_bdops_check_events()
525 ret = cdrom_ioctl(gd.cd_info, bdev, mode, cmd, arg); in gdrom_bdops_ioctl()
541 gd.status = __raw_readb(GDROM_STATUSCOMMAND_REG); in gdrom_command_interrupt()
542 if (gd.pending != 1) in gdrom_command_interrupt()
544 gd.pending = 0; in gdrom_command_interrupt()
551 gd.status = __raw_readb(GDROM_STATUSCOMMAND_REG); in gdrom_dma_interrupt()
552 if (gd.transfer != 1) in gdrom_dma_interrupt()
554 gd.transfer = 0; in gdrom_dma_interrupt()
564 0, "gdrom_command", &gd); in gdrom_set_interrupt_handlers()
568 0, "gdrom_dma", &gd); in gdrom_set_interrupt_handlers()
570 free_irq(HW_EVENT_GDROM_CMD, &gd); in gdrom_set_interrupt_handlers()
632 gd.pending = 1; in gdrom_readdisk_dma()
633 gd.transfer = 1; in gdrom_readdisk_dma()
643 gd.transfer == 0, GDROM_DEFAULT_TIMEOUT); in gdrom_readdisk_dma()
644 err = gd.transfer ? -EIO : 0; in gdrom_readdisk_dma()
645 gd.transfer = 0; in gdrom_readdisk_dma()
646 gd.pending = 0; in gdrom_readdisk_dma()
740 gd.cd_info->ops = &gdrom_ops; in probe_gdrom_setupcd()
741 gd.cd_info->capacity = 1; in probe_gdrom_setupcd()
742 strcpy(gd.cd_info->name, GDROM_DEV_NAME); in probe_gdrom_setupcd()
743 gd.cd_info->mask = CDC_CLOSE_TRAY|CDC_OPEN_TRAY|CDC_LOCK| in probe_gdrom_setupcd()
749 gd.disk->major = gdrom_major; in probe_gdrom_setupdisk()
750 gd.disk->first_minor = 1; in probe_gdrom_setupdisk()
751 gd.disk->minors = 1; in probe_gdrom_setupdisk()
752 strcpy(gd.disk->disk_name, GDROM_DEV_NAME); in probe_gdrom_setupdisk()
757 blk_queue_logical_block_size(gd.gdrom_rq, GDROM_HARD_SECTOR); in probe_gdrom_setupqueue()
759 blk_queue_max_segments(gd.gdrom_rq, 1); in probe_gdrom_setupqueue()
761 blk_queue_max_segment_size(gd.gdrom_rq, 0x40000); in probe_gdrom_setupqueue()
762 gd.disk->queue = gd.gdrom_rq; in probe_gdrom_setupqueue()
788 gd.cd_info = kzalloc(sizeof(struct cdrom_device_info), GFP_KERNEL); in probe_gdrom()
789 if (!gd.cd_info) { in probe_gdrom()
794 gd.disk = alloc_disk(1); in probe_gdrom()
795 if (!gd.disk) { in probe_gdrom()
800 if (register_cdrom(gd.cd_info)) { in probe_gdrom()
804 gd.disk->fops = &gdrom_bdops; in probe_gdrom()
809 gd.gdrom_rq = blk_init_queue(gdrom_request, &gdrom_lock); in probe_gdrom()
810 if (!gd.gdrom_rq) in probe_gdrom()
817 gd.toc = kzalloc(sizeof(struct gdromtoc), GFP_KERNEL); in probe_gdrom()
818 if (!gd.toc) in probe_gdrom()
820 add_disk(gd.disk); in probe_gdrom()
824 blk_cleanup_queue(gd.gdrom_rq); in probe_gdrom()
826 free_irq(HW_EVENT_GDROM_DMA, &gd); in probe_gdrom()
827 free_irq(HW_EVENT_GDROM_CMD, &gd); in probe_gdrom()
830 del_gendisk(gd.disk); in probe_gdrom()
832 kfree(gd.cd_info); in probe_gdrom()
843 blk_cleanup_queue(gd.gdrom_rq); in remove_gdrom()
844 free_irq(HW_EVENT_GDROM_CMD, &gd); in remove_gdrom()
845 free_irq(HW_EVENT_GDROM_DMA, &gd); in remove_gdrom()
846 del_gendisk(gd.disk); in remove_gdrom()
849 unregister_cdrom(gd.cd_info); in remove_gdrom()
865 gd.toc = NULL; in init_gdrom()
881 kfree(gd.toc); in exit_gdrom()