Lines Matching refs:drive

226 #define	UD	unit[drive]
227 #define UDT unit[drive].disktype
284 #define IS_BUFFERED(drive,side,track) \ argument
285 (BufferDrive == (drive) && BufferSide == (side) && BufferTrack == (track))
343 static void fd_select_drive( int drive );
349 static int do_format(int drive, int type, struct atari_format_descr *desc);
350 static void do_fd_action( int drive );
364 static void setup_req_params( int drive );
368 static void fd_probe( int drive );
369 static int fd_test_drive_present( int drive );
429 static void fd_select_drive( int drive ) in fd_select_drive() argument
434 if (drive == SelectedDrive) in fd_select_drive()
441 sound_ym.wd_data = (tmp | DSKDRVNONE) & ~(drive == 0 ? DSKDRV0 : DSKDRV1); in fd_select_drive()
454 SelectedDrive = drive; in fd_select_drive()
520 static int drive = 0; in check_change() local
526 if (++drive > 1 || !UD.connected) in check_change()
527 drive = 0; in check_change()
536 ~(drive == 0 ? DSKDRV0 : DSKDRV1); in check_change()
541 DPRINT(( "wpstat[%d] = %d\n", drive, stat )); in check_change()
543 set_bit (drive, &changed_floppies); in check_change()
646 static int do_format(int drive, int type, struct atari_format_descr *desc) in do_format() argument
653 drive, desc->track, desc->head, desc->sect_offset )); in do_format()
708 do_fd_action( drive ); in do_format()
726 static void do_fd_action( int drive ) in do_fd_action() argument
732 if (IS_BUFFERED( drive, ReqSide, ReqTrack )) { in do_fd_action()
737 setup_req_params( drive ); in do_fd_action()
755 if (SelectedDrive != drive) in do_fd_action()
756 fd_select_drive( drive ); in do_fd_action()
1332 unsigned int drive = p - unit; in floppy_check_events() local
1333 if (test_bit (drive, &fake_change)) { in floppy_check_events()
1337 if (test_bit (drive, &changed_floppies)) { in floppy_check_events()
1354 unsigned int drive = p - unit; in floppy_revalidate() local
1356 if (test_bit(drive, &changed_floppies) || in floppy_revalidate()
1357 test_bit(drive, &fake_change) || in floppy_revalidate()
1362 clear_bit(drive, &fake_change); in floppy_revalidate()
1363 clear_bit(drive, &changed_floppies); in floppy_revalidate()
1367 if (default_params[drive].blocks == 0) in floppy_revalidate()
1370 UDT = &default_params[drive]; in floppy_revalidate()
1378 static void setup_req_params( int drive ) in setup_req_params() argument
1423 int drive, type; in redo_fd_request() local
1440 drive = floppy - unit; in redo_fd_request()
1445 printk(KERN_ERR "Unknown Device: fd%d\n", drive ); in redo_fd_request()
1461 printk(KERN_WARNING "fd%d: invalid disk format", drive ); in redo_fd_request()
1466 printk(KERN_WARNING "fd%d: unsupported disk format", drive ); in redo_fd_request()
1488 setup_req_params( drive ); in redo_fd_request()
1489 do_fd_action( drive ); in redo_fd_request()
1514 int drive = floppy - unit; in fd_locked_ioctl() local
1534 drive, dtp, dtp->name); in fd_locked_ioctl()
1579 drive, setprm.size, setprm.sect, setprm.stretch); in fd_locked_ioctl()
1610 drive, dtp->name, dtp); in fd_locked_ioctl()
1616 default_params[drive].name = dtp->name; in fd_locked_ioctl()
1617 default_params[drive].spt = dtp->spt; in fd_locked_ioctl()
1618 default_params[drive].blocks = dtp->blocks; in fd_locked_ioctl()
1619 default_params[drive].fdc_speed = dtp->fdc_speed; in fd_locked_ioctl()
1620 default_params[drive].stretch = dtp->stretch; in fd_locked_ioctl()
1632 dtp = &default_params[drive]; in fd_locked_ioctl()
1635 dtp = &user_params[drive]; in fd_locked_ioctl()
1648 drive, dtp->blocks, dtp->spt, dtp->stretch); in fd_locked_ioctl()
1676 return do_format(drive, type, &fmt_desc); in fd_locked_ioctl()
1680 default_params[drive].blocks = 0; in fd_locked_ioctl()
1686 set_bit(drive, &fake_change); in fd_locked_ioctl()
1708 static void __init fd_probe( int drive ) in fd_probe() argument
1713 if (!fd_test_drive_present( drive )) in fd_probe()
1718 switch( UserSteprate[drive] ) { in fd_probe()
1751 static int __init fd_test_drive_present( int drive ) in fd_test_drive_present() argument
1757 if (drive >= (MACH_IS_FALCON ? 1 : 2)) return( 0 ); in fd_test_drive_present()
1758 fd_select_drive( drive ); in fd_test_drive_present()
1800 int drive, cnt = 0; in config_types() local
1807 for( drive = 0; drive < FD_MAX_UNITS; drive++ ) { in config_types()
1808 fd_probe( drive ); in config_types()
1810 printk(KERN_INFO "fd%d\n", drive); in config_types()
1913 int drive = *part & 3; in floppy_find() local
1915 if (drive >= FD_MAX_UNITS || type > NUM_DISK_MINORS) in floppy_find()
1918 return get_disk(unit[drive].disk); in floppy_find()