Lines Matching refs:UNIT
299 #define UNIT(x) ((x) & 0x03) /* drive on fdc */
730 if (!(FDCS->dor & (0x10 << UNIT(drive))) ||
731 (FDCS->dor & 3) != UNIT(drive) || fdc != FDC(drive)) {
816 fd_outb(FDCS->dor & ~(0x10 << UNIT(current_drive)), FD_DOR);
902 unsigned char mask = ~(0x10 << UNIT(nr));
913 if (!(FDCS->dor & (0x10 << UNIT(drive))))
950 if (!(set_dor(fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) &
951 (0x10 << UNIT(drive))))
954 set_dor(fdc, ~(0x10 << UNIT(drive)), 0);
1304 output_byte(UNIT(current_drive));
1559 output_byte(UNIT(current_drive));
1607 set_dor(fdc, ~(0x10 << UNIT(current_drive)), 0);
1626 output_byte(UNIT(current_drive));
1739 } while ((ST0 & 0x83) != UNIT(current_drive) &&
1757 if (output_byte(UNIT(current_drive)) < 0)
1881 data = UNIT(current_drive);
1883 if (!(FDCS->dor & (0x10 << UNIT(current_drive)))) {
1889 data |= (0x10 << UNIT(current_drive));
1891 } else if (FDCS->dor & (0x10 << UNIT(current_drive)))
1892 mask &= ~(0x10 << UNIT(current_drive));
2127 DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy, format_req.head);
2597 DR_SELECT = UNIT(current_drive) + PH_HEAD(_floppy, HEAD);
3426 ret = fd_eject(UNIT(drive));