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;
3022 fdc_state[current_fdc].reset = 1;
3023 if (fdc_state[current_fdc].reset) {
3233 if (fdc_state[current_fdc].rawcmd <= 1)
3234 fdc_state[current_fdc].rawcmd = 1;
3240 fdc_state[current_fdc].rawcmd = 2;
3244 fdc_state[current_fdc].rawcmd = 2;
3249 if (fdc_state[current_fdc].reset)
3264 if (ret != -EINTR && fdc_state[current_fdc].reset)
3634 outparam = &fdc_state[FDC(drive)];
3912 v = fdc_state[FDC(drive)];
4141 if (fdc_state[FDC(drive)].rawcmd == 1)
4142 fdc_state[FDC(drive)].rawcmd = 2;
4335 if (fdc_state[fdc].reset)
4570 if (fdc_state[fdc].address != -1)
4598 if (fdc_state[FDC(drive)].version == FDC_NONE)
4680 memset(&fdc_state[i], 0, sizeof(*fdc_state));
4681 fdc_state[i].dtr = -1;
4682 fdc_state[i].dor = 0x4;
4688 fdc_state[i].version = FDC_82072A;
4693 fdc_state[0].address = FDC1;
4694 if (fdc_state[0].address == -1) {
4700 fdc_state[1].address = FDC2;
4730 fdc_state[i].driver_version = FD_DRIVER_VERSION;
4732 fdc_state[i].track[unit] = 0;
4733 if (fdc_state[i].address == -1)
4735 fdc_state[i].rawcmd = 2;
4739 fdc_state[i].address = -1;
4740 fdc_state[i].version = FDC_NONE;
4744 fdc_state[i].version = get_fdc_version(i);
4745 if (fdc_state[i].version == FDC_NONE) {
4748 fdc_state[i].address = -1;
4752 fdc_state[i].version < FDC_82072A)
4858 release_region(fdc_state[fdc].address + p->offset, p->size);
4869 if (!request_region(fdc_state[fdc].address + p->offset,
4872 fdc_state[fdc].address + p->offset);
4917 if (fdc_state[fdc].address != -1) {
4923 if (fdc_state[fdc].address != -1) {
4925 fdc_outb(fdc_state[fdc].dor, fdc, FD_DOR);
4932 if (fdc_state[fdc].address != -1)
4933 fdc_outb(fdc_state[fdc].dor, fdc, FD_DOR);
4995 if (fdc_state[fdc].address != -1)
5053 fdc_state[FDC(drive)].version == FDC_NONE)