Lines Matching refs:unit
219 } unit[FD_MAX_UNITS]; variable
428 FDC1772_WRITE(FDC1772REG_TRACK, unit[drive].track); in fd_select_drive()
518 if (++drive > 1 || !unit[drive].connected) in check_change()
529 if (stat != unit[drive].wpstat) { in check_change()
531 unit[drive].wpstat = stat; in check_change()
603 unit[SelectedDrive].track = -1; in fd_error()
624 DPRINT(("do_fd_action unit[drive].track=%d\n", unit[drive].track)); in do_fd_action()
658 if (unit[drive].track == -1) in do_fd_action()
660 else if (unit[drive].track != ReqTrack << unit[drive].disktype->stretch) in do_fd_action()
672 if (unit[SelectedDrive].track >= 0) { in fd_calibrate()
679 FDC1772_WRITE(FDC1772REG_CMD, FDC1772CMD_RESTORE | unit[SelectedDrive].steprate); in fd_calibrate()
698 unit[SelectedDrive].track = 0; in fd_calibrate_done()
712 unit[SelectedDrive].track)); in fd_seek()
713 if (unit[SelectedDrive].track == ReqTrack << in fd_seek()
714 unit[SelectedDrive].disktype->stretch) { in fd_seek()
719 unit[SelectedDrive].disktype->stretch); in fd_seek()
724 FDC1772_WRITE(FDC1772REG_CMD, FDC1772CMD_SEEK | unit[SelectedDrive].steprate | in fd_seek()
746 unit[SelectedDrive].track = -1; in fd_seek_done()
749 unit[SelectedDrive].track = ReqTrack << in fd_seek_done()
750 unit[SelectedDrive].disktype->stretch; in fd_seek_done()
799 if (unit[SelectedDrive].disktype->stretch) { in fd_rwsec()
802 unit[SelectedDrive].disktype->stretch); in fd_rwsec()
814 set_dma_count(FLOPPY_DMA,(!read_track ? 1 : unit[SelectedDrive].disktype->spt)*512); in fd_rwsec()
894 if (addr >= (unsigned int)PhysTrackBuffer + unit[SelectedDrive].disktype->spt*512) { in fd_readtrack_check()
939 if (unit[SelectedDrive].disktype->stretch) { in fd_rwsec_done()
942 unit[SelectedDrive].disktype->stretch); in fd_rwsec_done()
954 FDC1772_READ(FDC1772REG_SECTOR) > unit[SelectedDrive].disktype->spt) in fd_rwsec_done()
958 if (unit[SelectedDrive].disktype > disk_type) { in fd_rwsec_done()
960 unit[SelectedDrive].disktype--; in fd_rwsec_done()
962 = unit[SelectedDrive].disktype->blocks >> 1; in fd_rwsec_done()
967 if (unit[SelectedDrive].autoprobe) { in fd_rwsec_done()
968 unit[SelectedDrive].disktype = disk_type + NUM_DISK_TYPES - 1; in fd_rwsec_done()
970 = unit[SelectedDrive].disktype->blocks >> 1; in fd_rwsec_done()
1069 FDC1772_WRITE(FDC1772REG_DATA, unit[SelectedDrive].track); in finish_fdc()
1160 if (unit[drive].wpstat) { in check_floppy_change()
1174 || unit[drive].disktype == 0) { in floppy_revalidate()
1180 unit[drive].disktype = 0; in floppy_revalidate()
1201 ReqTrack = block / unit[drive].disktype->spt; in setup_req_params()
1202 ReqSector = block - ReqTrack * unit[drive].disktype->spt + 1; in setup_req_params()
1243 floppy = &unit[drive]; in redo_fd_request()
1374 unit[drive].connected = 0; in fd_probe()
1375 unit[drive].disktype = NULL; in fd_probe()
1380 unit[drive].connected = 1; in fd_probe()
1381 unit[drive].track = -1; /* If we put the auto detect back in this can go to 0 */ in fd_probe()
1382 unit[drive].steprate = FDC1772STEP_6; in fd_probe()
1464 if (unit[drive].connected) { in config_types()
1534 if (unit[drive].wpstat) { in floppy_open()
1610 unit[i].track = -1; in fd1772_init()