diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 90c4da1bbce1..139285cb06bb 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -1778,29 +1778,13 @@ fd_probe(device_t dev) fd->type = type; } -/* - * XXX I think using __i386__ is wrong here since we actually want to probe - * for the machine type, not the CPU type (so non-PC arch's like the PC98 will - * fail the probe). However, for whatever reason, testing for _MACHINE_ARCH - * == i386 breaks the test on FreeBSD/Alpha. - */ -#if defined(__i386__) || defined(__amd64__) +#if (defined(__i386__) && !defined(PC98)) || defined(__amd64__) if (fd->type == FDT_NONE && (unit == 0 || unit == 1)) { /* Look up what the BIOS thinks we have. */ - if (unit == 0) { - if ((fdc->flags & FDC_ISPCMCIA)) - /* - * Somewhat special. No need to force the - * user to set device flags, since the Y-E - * Data PCMCIA floppy is always a 1.44 MB - * device. - */ - fd->type = FDT_144M; - else - fd->type = (rtcin(RTC_FDISKETTE) & 0xf0) >> 4; - } else { + if (unit == 0) + fd->type = (rtcin(RTC_FDISKETTE) & 0xf0) >> 4; + else fd->type = rtcin(RTC_FDISKETTE) & 0x0f; - } if (fd->type == FDT_288M_1) fd->type = FDT_288M; } diff --git a/sys/dev/fdc/fdc_acpi.c b/sys/dev/fdc/fdc_acpi.c index 6e543aab1e0f..89a5a5de34c8 100644 --- a/sys/dev/fdc/fdc_acpi.c +++ b/sys/dev/fdc/fdc_acpi.c @@ -104,7 +104,6 @@ fdc_acpi_attach(device_t dev) /* Get our softc and use the same accessor as ISA. */ sc = device_get_softc(dev); sc->fdc_dev = dev; - sc->flags |= FDC_ISPNP; /* Initialize variables and get a temporary buffer for _FDE. */ error = ENXIO; diff --git a/sys/dev/fdc/fdc_isa.c b/sys/dev/fdc/fdc_isa.c index 1d04a8108f0e..b91277104707 100644 --- a/sys/dev/fdc/fdc_isa.c +++ b/sys/dev/fdc/fdc_isa.c @@ -197,10 +197,6 @@ fdc_isa_attach(device_t dev) int error; fdc = device_get_softc(dev); - error = ISA_PNP_PROBE(device_get_parent(dev), dev, fdc_ids); - if (error == 0) - fdc->flags |= FDC_ISPNP; - error = fdc_isa_alloc_resources(dev, fdc); if (error == 0) error = fdc_attach(dev); diff --git a/sys/dev/fdc/fdcvar.h b/sys/dev/fdc/fdcvar.h index 5cfc3d1a6284..5ecf9125c3ee 100644 --- a/sys/dev/fdc/fdcvar.h +++ b/sys/dev/fdc/fdcvar.h @@ -39,7 +39,6 @@ enum fdc_type { */ struct fdc_data { int fdcu; /* our unit number */ - int dmacnt; int dmachan; int flags; #define FDC_HASDMA 0x01 @@ -47,8 +46,6 @@ struct fdc_data { #define FDC_HAS_FIFO 0x10 #define FDC_NEEDS_RESET 0x20 #define FDC_NODMA 0x40 -#define FDC_ISPNP 0x80 -#define FDC_ISPCMCIA 0x100 struct fd_data *fd; /* The active drive */ int retry; int fdout; /* mirror of the w/o digital output reg */