Lines Matching refs:fdc_state

584 static struct floppy_fdc_state fdc_state[N_FDC];  variable
598 return fd_inb(fdc_state[fdc].address, reg); in fdc_inb()
603 fd_outb(value, fdc_state[fdc].address, reg); in fdc_outb()
740 if (!(fdc_state[fdc].dor & (0x10 << UNIT(drive))) || in disk_change()
741 (fdc_state[fdc].dor & 3) != UNIT(drive) || fdc != FDC(drive)) { in disk_change()
744 (unsigned int)fdc_state[fdc].dor); in disk_change()
801 if (fdc_state[fdc].address == -1) in set_dor()
804 olddor = fdc_state[fdc].dor; in set_dor()
814 fdc_state[fdc].dor = newdor; in set_dor()
830 fdc_outb(fdc_state[fdc].dor & ~(0x10 << UNIT(drive)), in twaddle()
832 fdc_outb(fdc_state[fdc].dor, fdc, FD_DOR); in twaddle()
844 fdc_state[fdc].spec1 = fdc_state[fdc].spec2 = -1; in reset_fdc_info()
845 fdc_state[fdc].need_configure = 1; in reset_fdc_info()
846 fdc_state[fdc].perp_mode = 1; in reset_fdc_info()
847 fdc_state[fdc].rawcmd = 0; in reset_fdc_info()
877 if (fdc_state[fdc].rawcmd == 2) in set_fdc()
880 fdc_state[fdc].reset = 1; in set_fdc()
939 if (!(fdc_state[fdc].dor & (0x10 << UNIT(drive)))) in floppy_off()
1051 if (fdc_state[current_fdc].reset) { in fd_wait_for_completion()
1076 fdc_state[current_fdc].reset = 1; in setup_DMA()
1082 fdc_state[current_fdc].reset = 1; in setup_DMA()
1091 fdc_state[current_fdc].address) < 0) { in setup_DMA()
1094 fdc_state[current_fdc].reset = 1; in setup_DMA()
1105 virtual_dma_port = fdc_state[current_fdc].address; in setup_DMA()
1119 if (fdc_state[fdc].reset) in wait_til_ready()
1130 fdc_state[fdc].reset = 1; in wait_til_ready()
1150 fdc_state[fdc].reset = 1; in output_byte()
1185 fdc_state[fdc].reset = 1; in result()
1222 fdc_state[fdc].reset = 1; in perpendicular_mode()
1233 if (fdc_state[fdc].perp_mode == perp_mode) in perpendicular_mode()
1235 if (fdc_state[fdc].version >= FDC_82077_ORIG) { in perpendicular_mode()
1238 fdc_state[fdc].perp_mode = perp_mode; in perpendicular_mode()
1292 if (fdc_state[fdc].need_configure && in fdc_specify()
1293 fdc_state[fdc].version >= FDC_82072A) { in fdc_specify()
1295 fdc_state[fdc].need_configure = 0; in fdc_specify()
1304 if (fdc_state[fdc].version >= FDC_82078) { in fdc_specify()
1319 if (fdc_state[fdc].version >= FDC_82072) { in fdc_specify()
1352 if (fdc_state[fdc].spec1 != spec1 || in fdc_specify()
1353 fdc_state[fdc].spec2 != spec2) { in fdc_specify()
1356 output_byte(fdc, fdc_state[fdc].spec1 = spec1); in fdc_specify()
1357 output_byte(fdc, fdc_state[fdc].spec2 = spec2); in fdc_specify()
1368 if ((raw_cmd->rate & 3) == fdc_state[current_fdc].dtr) in fdc_dtr()
1379 fdc_state[current_fdc].dtr = raw_cmd->rate & 3; in fdc_dtr()
1435 fdc_state[current_fdc].reset = 1; in interpret_errors()
1575 fdc_state[fdc].reset = 1; in check_wp()
1658 fdc_state[current_fdc].reset = 1; in recal_interrupt()
1727 if (current_fdc >= N_FDC || fdc_state[current_fdc].address == -1) { in floppy_interrupt()
1729 pr_info("DOR0=%x\n", fdc_state[0].dor); in floppy_interrupt()
1736 fdc_state[current_fdc].reset = 0; in floppy_interrupt()
1763 fdc_state[current_fdc].reset = 1; in floppy_interrupt()
1789 if (fdc_state[current_fdc].reset) { in reset_interrupt()
1807 fdc_state[current_fdc].reset = 0; in reset_fdc()
1817 if (fdc_state[current_fdc].version >= FDC_82072A) in reset_fdc()
1818 fdc_outb(0x80 | (fdc_state[current_fdc].dtr & 3), in reset_fdc()
1821 fdc_outb(fdc_state[current_fdc].dor & ~0x04, current_fdc, FD_DOR); in reset_fdc()
1823 fdc_outb(fdc_state[current_fdc].dor, current_fdc, FD_DOR); in reset_fdc()
1887 fdc_state[current_fdc].reset = 1; in floppy_shutdown()
1907 if (!(fdc_state[current_fdc].dor & (0x10 << UNIT(current_drive)))) { in start_motor()
1915 } else if (fdc_state[current_fdc].dor & (0x10 << UNIT(current_drive))) in start_motor()
1929 if (fdc_state[current_fdc].reset) { in floppy_ready()
2033 if (fdc_state[current_fdc].reset) in wait_til_done()
2103 fdc_state[current_fdc].reset = 1; in bad_flp_intr()
3024 fdc_state[current_fdc].reset = 1; in user_reset_fdc()
3025 if (fdc_state[current_fdc].reset) { in user_reset_fdc()
3231 if (fdc_state[current_fdc].rawcmd <= 1) in raw_cmd_ioctl()
3232 fdc_state[current_fdc].rawcmd = 1; in raw_cmd_ioctl()
3238 fdc_state[current_fdc].rawcmd = 2; in raw_cmd_ioctl()
3242 fdc_state[current_fdc].rawcmd = 2; in raw_cmd_ioctl()
3247 if (fdc_state[current_fdc].reset) in raw_cmd_ioctl()
3262 if (ret != -EINTR && fdc_state[current_fdc].reset) in raw_cmd_ioctl()
3604 outparam = &fdc_state[FDC(drive)]; in fd_locked_ioctl()
3891 v = fdc_state[FDC(drive)]; in compat_getfdcstat()
4120 if (fdc_state[FDC(drive)].rawcmd == 1) in floppy_open()
4121 fdc_state[FDC(drive)].rawcmd = 2; in floppy_open()
4314 if (fdc_state[fdc].reset) in get_fdc_version()
4549 if (fdc_state[fdc].address != -1) in floppy_resume()
4577 if (fdc_state[FDC(drive)].version == FDC_NONE) in floppy_available()
4659 memset(&fdc_state[i], 0, sizeof(*fdc_state)); in do_floppy_init()
4660 fdc_state[i].dtr = -1; in do_floppy_init()
4661 fdc_state[i].dor = 0x4; in do_floppy_init()
4667 fdc_state[i].version = FDC_82072A; in do_floppy_init()
4672 fdc_state[0].address = FDC1; in do_floppy_init()
4673 if (fdc_state[0].address == -1) { in do_floppy_init()
4679 fdc_state[1].address = FDC2; in do_floppy_init()
4709 fdc_state[i].driver_version = FD_DRIVER_VERSION; in do_floppy_init()
4711 fdc_state[i].track[unit] = 0; in do_floppy_init()
4712 if (fdc_state[i].address == -1) in do_floppy_init()
4714 fdc_state[i].rawcmd = 2; in do_floppy_init()
4718 fdc_state[i].address = -1; in do_floppy_init()
4719 fdc_state[i].version = FDC_NONE; in do_floppy_init()
4723 fdc_state[i].version = get_fdc_version(i); in do_floppy_init()
4724 if (fdc_state[i].version == FDC_NONE) { in do_floppy_init()
4727 fdc_state[i].address = -1; in do_floppy_init()
4731 fdc_state[i].version < FDC_82072A) in do_floppy_init()
4837 release_region(fdc_state[fdc].address + p->offset, p->size); in floppy_release_allocated_regions()
4848 if (!request_region(fdc_state[fdc].address + p->offset, in floppy_request_regions()
4851 fdc_state[fdc].address + p->offset); in floppy_request_regions()
4896 if (fdc_state[fdc].address != -1) { in floppy_grab_irq_and_dma()
4902 if (fdc_state[fdc].address != -1) { in floppy_grab_irq_and_dma()
4904 fdc_outb(fdc_state[fdc].dor, fdc, FD_DOR); in floppy_grab_irq_and_dma()
4911 if (fdc_state[fdc].address != -1) in floppy_grab_irq_and_dma()
4912 fdc_outb(fdc_state[fdc].dor, fdc, FD_DOR); in floppy_grab_irq_and_dma()
4974 if (fdc_state[fdc].address != -1) in floppy_release_irq_and_dma()
5032 fdc_state[FDC(drive)].version == FDC_NONE) in floppy_module_exit()