Lines Matching defs:UNIT
303 #define UNIT(x) ((x) & 0x03) /* drive on fdc */
739 if (!(fdc_state[fdc].dor & (0x10 << UNIT(drive))) ||
740 (fdc_state[fdc].dor & 3) != UNIT(drive) || fdc != FDC(drive)) {
829 fdc_outb(fdc_state[fdc].dor & ~(0x10 << UNIT(drive)),
924 unsigned char mask = ~(0x10 << UNIT(nr));
938 if (!(fdc_state[fdc].dor & (0x10 << UNIT(drive))))
975 if (!(set_dor(current_fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) &
976 (0x10 << UNIT(drive))))
979 set_dor(current_fdc, ~(0x10 << UNIT(drive)), 0);
1308 output_byte(fdc, UNIT(drive));
1572 output_byte(fdc, UNIT(drive));
1626 set_dor(current_fdc, ~(0x10 << UNIT(current_drive)), 0);
1645 output_byte(current_fdc, UNIT(current_drive));
1758 } while ((reply_buffer[ST0] & 0x83) != UNIT(current_drive) &&
1777 if (output_byte(current_fdc, UNIT(current_drive)) < 0)
1904 data = UNIT(current_drive);
1906 if (!(fdc_state[current_fdc].dor & (0x10 << UNIT(current_drive)))) {
1912 data |= (0x10 << UNIT(current_drive));
1914 } else if (fdc_state[current_fdc].dor & (0x10 << UNIT(current_drive)))
1915 mask &= ~(0x10 << UNIT(current_drive));
2156 raw_cmd->cmd[DR_SELECT] = UNIT(current_drive) + PH_HEAD(_floppy, format_req.head);
2632 raw_cmd->cmd[DR_SELECT] = UNIT(current_drive) + PH_HEAD(_floppy, raw_cmd->cmd[HEAD]);
3547 ret = fd_eject(UNIT(drive));