Lines Matching defs:fdc_state

583 static struct floppy_fdc_state fdc_state[N_FDC];
597 return fd_inb(fdc_state[fdc].address, reg);
602 fd_outb(value, fdc_state[fdc].address, reg);
739 if (!(fdc_state[fdc].dor & (0x10 << UNIT(drive))) ||
740 (fdc_state[fdc].dor & 3) != UNIT(drive) || fdc != FDC(drive)) {
743 (unsigned int)fdc_state[fdc].dor);
800 if (fdc_state[fdc].address == -1)
803 olddor = fdc_state[fdc].dor;
813 fdc_state[fdc].dor = newdor;
829 fdc_outb(fdc_state[fdc].dor & ~(0x10 << UNIT(drive)),
831 fdc_outb(fdc_state[fdc].dor, fdc, FD_DOR);
843 fdc_state[fdc].spec1 = fdc_state[fdc].spec2 = -1;
844 fdc_state[fdc].need_configure = 1;
845 fdc_state[fdc].perp_mode = 1;
846 fdc_state[fdc].rawcmd = 0;
876 if (fdc_state[fdc].rawcmd == 2)
879 fdc_state[fdc].reset = 1;
938 if (!(fdc_state[fdc].dor & (0x10 << UNIT(drive))))
1050 if (fdc_state[current_fdc].reset) {
1075 fdc_state[current_fdc].reset = 1;
1081 fdc_state[current_fdc].reset = 1;
1090 fdc_state[current_fdc].address) < 0) {
1093 fdc_state[current_fdc].reset = 1;
1104 virtual_dma_port = fdc_state[current_fdc].address;
1118 if (fdc_state[fdc].reset)
1129 fdc_state[fdc].reset = 1;
1149 fdc_state[fdc].reset = 1;
1184 fdc_state[fdc].reset = 1;
1221 fdc_state[fdc].reset = 1;
1232 if (fdc_state[fdc].perp_mode == perp_mode)
1234 if (fdc_state[fdc].version >= FDC_82077_ORIG) {
1237 fdc_state[fdc].perp_mode = perp_mode;
1291 if (fdc_state[fdc].need_configure &&
1292 fdc_state[fdc].version >= FDC_82072A) {
1294 fdc_state[fdc].need_configure = 0;
1303 if (fdc_state[fdc].version >= FDC_82078) {
1318 if (fdc_state[fdc].version >= FDC_82072) {
1351 if (fdc_state[fdc].spec1 != spec1 ||
1352 fdc_state[fdc].spec2 != spec2) {
1355 output_byte(fdc, fdc_state[fdc].spec1 = spec1);
1356 output_byte(fdc, fdc_state[fdc].spec2 = spec2);
1367 if ((raw_cmd->rate & 3) == fdc_state[current_fdc].dtr)
1378 fdc_state[current_fdc].dtr = raw_cmd->rate & 3;
1434 fdc_state[current_fdc].reset = 1;
1574 fdc_state[fdc].reset = 1;
1657 fdc_state[current_fdc].reset = 1;
1726 if (current_fdc >= N_FDC || fdc_state[current_fdc].address == -1) {
1728 pr_info("DOR0=%x\n", fdc_state[0].dor);
1735 fdc_state[current_fdc].reset = 0;
1738 * emit SENSEI's to clear the interrupt line. And fdc_state[fdc].reset
1762 fdc_state[current_fdc].reset = 1;
1788 if (fdc_state[current_fdc].reset) {
1806 fdc_state[current_fdc].reset = 0;
1816 if (fdc_state[current_fdc].version >= FDC_82072A)
1817 fdc_outb(0x80 | (fdc_state[current_fdc].dtr & 3),
1820 fdc_outb(fdc_state[current_fdc].dor & ~0x04, current_fdc, FD_DOR);
1822 fdc_outb(fdc_state[current_fdc].dor, current_fdc, FD_DOR);
1886 fdc_state[current_fdc].reset = 1;
1906 if (!(fdc_state[current_fdc].dor & (0x10 << UNIT(current_drive)))) {
1914 } else if (fdc_state[current_fdc].dor & (0x10 << UNIT(current_drive)))
1928 if (fdc_state[current_fdc].reset) {
2032 if (fdc_state[current_fdc].reset)
2102 fdc_state[current_fdc].reset = 1;
2935 fdc_state[current_fdc].reset = 1;
2936 if (fdc_state[current_fdc].reset) {
3141 if (fdc_state[current_fdc].rawcmd <= 1)
3142 fdc_state[current_fdc].rawcmd = 1;
3148 fdc_state[current_fdc].rawcmd = 2;
3152 fdc_state[current_fdc].rawcmd = 2;
3157 if (fdc_state[current_fdc].reset)
3172 if (ret != -EINTR && fdc_state[current_fdc].reset)
3544 outparam = &fdc_state[FDC(drive)];
3822 v = fdc_state[FDC(drive)];
4051 if (fdc_state[FDC(drive)].rawcmd == 1)
4052 fdc_state[FDC(drive)].rawcmd = 2;
4243 if (fdc_state[fdc].reset)
4478 if (fdc_state[fdc].address != -1)
4507 if (fdc_state[FDC(drive)].version == FDC_NONE)
4624 memset(&fdc_state[i], 0, sizeof(*fdc_state));
4625 fdc_state[i].dtr = -1;
4626 fdc_state[i].dor = 0x4;
4632 fdc_state[i].version = FDC_82072A;
4637 fdc_state[0].address = FDC1;
4638 if (fdc_state[0].address == -1) {
4644 fdc_state[1].address = FDC2;
4674 fdc_state[i].driver_version = FD_DRIVER_VERSION;
4676 fdc_state[i].track[unit] = 0;
4677 if (fdc_state[i].address == -1)
4679 fdc_state[i].rawcmd = 2;
4683 fdc_state[i].address = -1;
4684 fdc_state[i].version = FDC_NONE;
4688 fdc_state[i].version = get_fdc_version(i);
4689 if (fdc_state[i].version == FDC_NONE) {
4692 fdc_state[i].address = -1;
4696 fdc_state[i].version < FDC_82072A)
4800 release_region(fdc_state[fdc].address + p->offset, p->size);
4811 if (!request_region(fdc_state[fdc].address + p->offset,
4814 fdc_state[fdc].address + p->offset);
4859 if (fdc_state[fdc].address != -1) {
4865 if (fdc_state[fdc].address != -1) {
4867 fdc_outb(fdc_state[fdc].dor, fdc, FD_DOR);
4874 if (fdc_state[fdc].address != -1)
4875 fdc_outb(fdc_state[fdc].dor, fdc, FD_DOR);
4937 if (fdc_state[fdc].address != -1)