Lines Matching full:drive
170 enum drive_location location; /* internal or external drive */
171 int head_number; /* single- or double-sided drive */
312 swim_write(base, mode0, EXTERNAL_DRIVE); /* clear drive 1 bit */ in swim_drive()
313 swim_write(base, mode1, INTERNAL_DRIVE); /* set drive 0 bit */ in swim_drive()
315 swim_write(base, mode0, INTERNAL_DRIVE); /* clear drive 0 bit */ in swim_drive()
316 swim_write(base, mode1, EXTERNAL_DRIVE); /* set drive 1 bit */ in swim_drive()
359 /* wait drive is ready */ in swim_head()
794 int drive; in swim_floppy_init() local
819 for (drive = 0; drive < swd->floppy_count; drive++) { in swim_floppy_init()
820 err = blk_mq_alloc_sq_tag_set(&swd->unit[drive].tag_set, in swim_floppy_init()
825 swd->unit[drive].disk = in swim_floppy_init()
826 blk_mq_alloc_disk(&swd->unit[drive].tag_set, &lim, in swim_floppy_init()
827 &swd->unit[drive]); in swim_floppy_init()
828 if (IS_ERR(swd->unit[drive].disk)) { in swim_floppy_init()
829 blk_mq_free_tag_set(&swd->unit[drive].tag_set); in swim_floppy_init()
830 err = PTR_ERR(swd->unit[drive].disk); in swim_floppy_init()
834 swd->unit[drive].swd = swd; in swim_floppy_init()
837 for (drive = 0; drive < swd->floppy_count; drive++) { in swim_floppy_init()
838 swd->unit[drive].disk->flags = GENHD_FL_REMOVABLE; in swim_floppy_init()
839 swd->unit[drive].disk->major = FLOPPY_MAJOR; in swim_floppy_init()
840 swd->unit[drive].disk->first_minor = drive; in swim_floppy_init()
841 swd->unit[drive].disk->minors = 1; in swim_floppy_init()
842 sprintf(swd->unit[drive].disk->disk_name, "fd%d", drive); in swim_floppy_init()
843 swd->unit[drive].disk->fops = &floppy_fops; in swim_floppy_init()
844 swd->unit[drive].disk->flags |= GENHD_FL_NO_PART; in swim_floppy_init()
845 swd->unit[drive].disk->events = DISK_EVENT_MEDIA_CHANGE; in swim_floppy_init()
846 swd->unit[drive].disk->private_data = &swd->unit[drive]; in swim_floppy_init()
847 set_capacity(swd->unit[drive].disk, 2880); in swim_floppy_init()
848 err = add_disk(swd->unit[drive].disk); in swim_floppy_init()
851 swd->unit[drive].registered = true; in swim_floppy_init()
859 swim_cleanup_floppy_disk(&swd->unit[drive]); in swim_floppy_init()
860 } while (drive--); in swim_floppy_init()
925 int drive; in swim_remove() local
928 for (drive = 0; drive < swd->floppy_count; drive++) in swim_remove()
929 swim_cleanup_floppy_disk(&swd->unit[drive]); in swim_remove()
935 for (drive = 0; drive < swd->floppy_count; drive++) in swim_remove()
936 floppy_eject(&swd->unit[drive]); in swim_remove()