summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/fdc_cbus.c
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2004-07-13 13:14:37 +0000
committernyan <nyan@FreeBSD.org>2004-07-13 13:14:37 +0000
commit2c6fa2f70b5ff8428723747a5327b2ba2d4dabd7 (patch)
tree21d59bcb35426803bab85848b59f7f31781bd58c /sys/pc98/cbus/fdc_cbus.c
parent6bbfebb2615bbd5e1e50cb13dc3d2dad83d6e799 (diff)
downloadFreeBSD-src-2c6fa2f70b5ff8428723747a5327b2ba2d4dabd7.zip
FreeBSD-src-2c6fa2f70b5ff8428723747a5327b2ba2d4dabd7.tar.gz
Merged from recent fdc driver changes.
Make a separate function to check FDD type.
Diffstat (limited to 'sys/pc98/cbus/fdc_cbus.c')
-rw-r--r--sys/pc98/cbus/fdc_cbus.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/pc98/cbus/fdc_cbus.c b/sys/pc98/cbus/fdc_cbus.c
index 73757c2..643b9c9 100644
--- a/sys/pc98/cbus/fdc_cbus.c
+++ b/sys/pc98/cbus/fdc_cbus.c
@@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$");
#include <sys/rman.h>
#include <sys/systm.h>
+#include <machine/bus.h>
+
#include <pc98/pc98/fdcvar.h>
#include <pc98/pc98/fdreg.h>
@@ -50,7 +52,6 @@ fdc_cbus_probe(device_t dev)
struct fdc_data *fdc;
fdc = device_get_softc(dev);
- bzero(fdc, sizeof *fdc);
fdc->fdc_dev = dev;
/* Check pnp ids */
@@ -59,16 +60,9 @@ fdc_cbus_probe(device_t dev)
/* Attempt to allocate our resources for the duration of the probe */
error = fdc_alloc_resources(fdc);
- if (error)
- goto out;
-
- /* see if it can handle a command */
- if (fd_cmd(fdc, 3, NE7CMD_SPECIFY, NE7_SPEC_1(4, 240),
- NE7_SPEC_2(2, 0), 0)) {
- error = ENXIO;
- }
+ if (!error)
+ error = fdc_initial_reset(fdc);
-out:
fdc_release_resources(fdc);
return (error);
}
@@ -85,6 +79,7 @@ static device_method_t fdc_methods[] = {
/* Bus interface */
DEVMETHOD(bus_print_child, fdc_print_child),
DEVMETHOD(bus_read_ivar, fdc_read_ivar),
+ DEVMETHOD(bus_write_ivar, fdc_write_ivar),
/* Our children never use any other bus interface methods. */
{ 0, 0 }
OpenPOWER on IntegriCloud