Lines Matching refs:current_fdc
584 static int current_fdc; /* current fdc */ variable
882 current_fdc = fdc; in set_fdc()
975 if (!(set_dor(current_fdc, ~3, UNIT(drive) | (0x10 << UNIT(drive))) & in scandrives()
979 set_dor(current_fdc, ~(0x10 << UNIT(drive)), 0); in scandrives()
1050 if (fdc_state[current_fdc].reset) { in fd_wait_for_completion()
1075 fdc_state[current_fdc].reset = 1; in setup_DMA()
1081 fdc_state[current_fdc].reset = 1; in setup_DMA()
1090 fdc_state[current_fdc].address) < 0) { in setup_DMA()
1093 fdc_state[current_fdc].reset = 1; in setup_DMA()
1104 virtual_dma_port = fdc_state[current_fdc].address; in setup_DMA()
1367 if ((raw_cmd->rate & 3) == fdc_state[current_fdc].dtr) in fdc_dtr()
1371 fdc_outb(raw_cmd->rate & 3, current_fdc, FD_DCR); in fdc_dtr()
1378 fdc_state[current_fdc].dtr = raw_cmd->rate & 3; in fdc_dtr()
1434 fdc_state[current_fdc].reset = 1; in interpret_errors()
1518 r |= output_byte(current_fdc, raw_cmd->fullcmd[i]); in setup_rw_floppy()
1529 inr = result(current_fdc); in setup_rw_floppy()
1626 set_dor(current_fdc, ~(0x10 << UNIT(current_drive)), 0); in seek_floppy()
1633 check_wp(current_fdc, current_drive); in seek_floppy()
1644 output_byte(current_fdc, FD_SEEK); in seek_floppy()
1645 output_byte(current_fdc, UNIT(current_drive)); in seek_floppy()
1646 if (output_byte(current_fdc, track) < 0) { in seek_floppy()
1657 fdc_state[current_fdc].reset = 1; in recal_interrupt()
1726 if (current_fdc >= N_FDC || fdc_state[current_fdc].address == -1) { in floppy_interrupt()
1729 pr_info("floppy interrupt on bizarre fdc %d\n", current_fdc); in floppy_interrupt()
1735 fdc_state[current_fdc].reset = 0; in floppy_interrupt()
1747 inr = result(current_fdc); in floppy_interrupt()
1753 output_byte(current_fdc, FD_SENSEI); in floppy_interrupt()
1754 inr = result(current_fdc); in floppy_interrupt()
1762 fdc_state[current_fdc].reset = 1; in floppy_interrupt()
1776 output_byte(current_fdc, FD_RECALIBRATE); in recalibrate_floppy()
1777 if (output_byte(current_fdc, UNIT(current_drive)) < 0) in recalibrate_floppy()
1787 result(current_fdc); /* get the status ready for set_fdc */ in reset_interrupt()
1788 if (fdc_state[current_fdc].reset) { in reset_interrupt()
1806 fdc_state[current_fdc].reset = 0; in reset_fdc()
1807 reset_fdc_info(current_fdc, 0); in reset_fdc()
1816 if (fdc_state[current_fdc].version >= FDC_82072A) in reset_fdc()
1817 fdc_outb(0x80 | (fdc_state[current_fdc].dtr & 3), in reset_fdc()
1818 current_fdc, FD_STATUS); in reset_fdc()
1820 fdc_outb(fdc_state[current_fdc].dor & ~0x04, current_fdc, FD_DOR); in reset_fdc()
1822 fdc_outb(fdc_state[current_fdc].dor, current_fdc, FD_DOR); in reset_fdc()
1875 show_floppy(current_fdc); in floppy_shutdown()
1886 fdc_state[current_fdc].reset = 1; in floppy_shutdown()
1906 if (!(fdc_state[current_fdc].dor & (0x10 << UNIT(current_drive)))) { in start_motor()
1914 } else if (fdc_state[current_fdc].dor & (0x10 << UNIT(current_drive))) in start_motor()
1919 set_dor(current_fdc, mask, data); in start_motor()
1928 if (fdc_state[current_fdc].reset) { in floppy_ready()
1941 twaddle(current_fdc, current_drive); /* this clears the dcl on certain in floppy_ready()
1953 perpendicular_mode(current_fdc); in floppy_ready()
1954 fdc_specify(current_fdc, current_drive); /* must be done here because of hut, hlt ... */ in floppy_ready()
1959 fdc_specify(current_fdc, current_drive); in floppy_ready()
2032 if (fdc_state[current_fdc].reset) in wait_til_done()
2102 fdc_state[current_fdc].reset = 1; in bad_flp_intr()
2830 twaddle(current_fdc, current_drive); in redo_fd_request()
2935 fdc_state[current_fdc].reset = 1; in user_reset_fdc()
2936 if (fdc_state[current_fdc].reset) { in user_reset_fdc()
3141 if (fdc_state[current_fdc].rawcmd <= 1) in raw_cmd_ioctl()
3142 fdc_state[current_fdc].rawcmd = 1; in raw_cmd_ioctl()
3144 if (FDC(drive) != current_fdc) in raw_cmd_ioctl()
3148 fdc_state[current_fdc].rawcmd = 2; in raw_cmd_ioctl()
3152 fdc_state[current_fdc].rawcmd = 2; in raw_cmd_ioctl()
3157 if (fdc_state[current_fdc].reset) in raw_cmd_ioctl()
3172 if (ret != -EINTR && fdc_state[current_fdc].reset) in raw_cmd_ioctl()
3555 twaddle(current_fdc, current_drive); in fd_locked_ioctl()
4643 current_fdc = 0; /* reset fdc in case of unexpected interrupt */ in do_floppy_init()
4702 current_fdc = 0; in do_floppy_init()
4876 current_fdc = 0; in floppy_grab_irq_and_dma()
4884 current_fdc = 0; in floppy_grab_irq_and_dma()