Lines Matching refs:drive

306 #define	UD	unit[drive]
307 #define UDT unit[drive].disktype
364 #define IS_BUFFERED(drive,side,track) \ argument
365 (BufferDrive == (drive) && BufferSide == (side) && BufferTrack == (track))
420 static void fd_select_drive( int drive );
426 static int do_format(int drive, int type, struct atari_format_descr *desc);
427 static void do_fd_action( int drive );
441 static void setup_req_params( int drive );
444 static void fd_probe( int drive );
445 static int fd_test_drive_present( int drive );
508 static void fd_select_drive( int drive ) in fd_select_drive() argument
513 if (drive == SelectedDrive) in fd_select_drive()
520 sound_ym.wd_data = (tmp | DSKDRVNONE) & ~(drive == 0 ? DSKDRV0 : DSKDRV1); in fd_select_drive()
533 SelectedDrive = drive; in fd_select_drive()
599 static int drive = 0; in check_change() local
605 if (++drive > 1 || !UD.connected) in check_change()
606 drive = 0; in check_change()
615 ~(drive == 0 ? DSKDRV0 : DSKDRV1); in check_change()
620 DPRINT(( "wpstat[%d] = %d\n", drive, stat )); in check_change()
622 set_bit (drive, &changed_floppies); in check_change()
724 static int do_format(int drive, int type, struct atari_format_descr *desc) in do_format() argument
739 q = unit[drive].disk[type]->queue; in do_format()
790 do_fd_action( drive ); in do_format()
811 static void do_fd_action( int drive ) in do_fd_action() argument
817 if (IS_BUFFERED( drive, ReqSide, ReqTrack )) { in do_fd_action()
822 setup_req_params( drive ); in do_fd_action()
839 if (SelectedDrive != drive) in do_fd_action()
840 fd_select_drive( drive ); in do_fd_action()
1413 unsigned int drive = p - unit; in floppy_check_events() local
1414 if (test_bit (drive, &fake_change)) { in floppy_check_events()
1418 if (test_bit (drive, &changed_floppies)) { in floppy_check_events()
1435 unsigned int drive = p - unit; in floppy_revalidate() local
1437 if (test_bit(drive, &changed_floppies) || in floppy_revalidate()
1438 test_bit(drive, &fake_change) || in floppy_revalidate()
1443 clear_bit(drive, &fake_change); in floppy_revalidate()
1444 clear_bit(drive, &changed_floppies); in floppy_revalidate()
1448 if (default_params[drive].blocks == 0) in floppy_revalidate()
1451 UDT = &default_params[drive]; in floppy_revalidate()
1459 static void setup_req_params( int drive ) in setup_req_params() argument
1491 int drive = floppy - unit; in ataflop_queue_rq() local
1512 printk(KERN_ERR "Unknown Device: fd%d\n", drive ); in ataflop_queue_rq()
1528 printk(KERN_WARNING "fd%d: invalid disk format", drive ); in ataflop_queue_rq()
1533 printk(KERN_WARNING "fd%d: unsupported disk format", drive ); in ataflop_queue_rq()
1550 setup_req_params( drive ); in ataflop_queue_rq()
1551 do_fd_action( drive ); in ataflop_queue_rq()
1567 int drive = floppy - unit; in fd_locked_ioctl() local
1587 drive, dtp, dtp->name); in fd_locked_ioctl()
1632 drive, setprm.size, setprm.sect, setprm.stretch); in fd_locked_ioctl()
1662 drive, dtp->name, dtp); in fd_locked_ioctl()
1668 default_params[drive].name = dtp->name; in fd_locked_ioctl()
1669 default_params[drive].spt = dtp->spt; in fd_locked_ioctl()
1670 default_params[drive].blocks = dtp->blocks; in fd_locked_ioctl()
1671 default_params[drive].fdc_speed = dtp->fdc_speed; in fd_locked_ioctl()
1672 default_params[drive].stretch = dtp->stretch; in fd_locked_ioctl()
1684 dtp = &default_params[drive]; in fd_locked_ioctl()
1687 dtp = &user_params[drive]; in fd_locked_ioctl()
1700 drive, dtp->blocks, dtp->spt, dtp->stretch); in fd_locked_ioctl()
1726 return do_format(drive, type, &fmt_desc); in fd_locked_ioctl()
1730 default_params[drive].blocks = 0; in fd_locked_ioctl()
1737 set_bit(drive, &fake_change); in fd_locked_ioctl()
1760 static void __init fd_probe( int drive ) in fd_probe() argument
1765 if (!fd_test_drive_present( drive )) in fd_probe()
1770 switch( UserSteprate[drive] ) { in fd_probe()
1803 static int __init fd_test_drive_present( int drive ) in fd_test_drive_present() argument
1809 if (drive >= (MACH_IS_FALCON ? 1 : 2)) return( 0 ); in fd_test_drive_present()
1810 fd_select_drive( drive ); in fd_test_drive_present()
1852 int drive, cnt = 0; in config_types() local
1859 for( drive = 0; drive < FD_MAX_UNITS; drive++ ) { in config_types()
1860 fd_probe( drive ); in config_types()
1862 printk(KERN_INFO "fd%d\n", drive); in config_types()
1968 static int ataflop_alloc_disk(unsigned int drive, unsigned int type) in ataflop_alloc_disk() argument
1972 disk = blk_mq_alloc_disk(&unit[drive].tag_set, NULL); in ataflop_alloc_disk()
1977 disk->first_minor = drive + (type << 2); in ataflop_alloc_disk()
1979 sprintf(disk->disk_name, "fd%d", drive); in ataflop_alloc_disk()
1982 disk->private_data = &unit[drive]; in ataflop_alloc_disk()
1985 unit[drive].disk[type] = disk; in ataflop_alloc_disk()
1993 int drive = MINOR(dev) & 3; in ataflop_probe() local
1999 if (drive >= FD_MAX_UNITS || type >= NUM_DISK_MINORS) in ataflop_probe()
2002 if (!unit[drive].disk[type]) { in ataflop_probe()
2003 if (ataflop_alloc_disk(drive, type) == 0) in ataflop_probe()
2004 add_disk(unit[drive].disk[type]); in ataflop_probe()