aboutsummaryrefslogtreecommitdiff
path: root/sys/pc98/cbus/fdc_cbus.c
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2004-07-13 13:14:37 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2004-07-13 13:14:37 +0000
commit64c232e6727e3aa5a1d9ca2904d35a38f3d3c770 (patch)
tree21d59bcb35426803bab85848b59f7f31781bd58c /sys/pc98/cbus/fdc_cbus.c
parent65bba83fefbfb8aa59abfe0a68cc3fc9a93ce34a (diff)
downloadsrc-64c232e6727e3aa5a1d9ca2904d35a38f3d3c770.tar.gz
src-64c232e6727e3aa5a1d9ca2904d35a38f3d3c770.zip
Merged from recent fdc driver changes.
Make a separate function to check FDD type.
Notes
Notes: svn path=/head/; revision=132103
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 73757c229d65..643b9c9d1d41 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 }