Sync with sys/isa/fd.c revision 1.168.

This commit is contained in:
Yoshihiro Takahashi 1999-11-18 11:34:26 +00:00
parent f3335fa93f
commit e5f8b3d483
2 changed files with 2 additions and 40 deletions

View File

@ -51,11 +51,8 @@
*
*/
#include "fd.h"
#include "opt_fdc.h"
#if NFDC > 0
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@ -451,9 +448,6 @@ static int yeinit(struct pccard_devinfo *devi)
{
fdc_p fdc = &fdc_data[devi->isahd.id_unit];
/* validate unit number. */
if (devi->isahd.id_unit >= NFDC)
return(ENODEV);
fdc->baseport = devi->isahd.id_iobase;
/*
* reset controller
@ -1009,14 +1003,6 @@ fdc_attach(device_t dev)
#endif
bufq_init(&fdc->head);
#ifdef FIFO_BEFORE_MOTORON
/* Hmm, this doesn't work here - is set_motor() magic? -Peter */
if (fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN
&& enable_fifo(fdc) == 0) {
device_print_prettyname(dev);
printf("FIFO enabled, %d bytes threshold\n", fifo_threshold);
}
#endif
/*
* Probe and attach any children as were configured above.
*/
@ -1071,9 +1057,7 @@ fd_probe(device_t dev)
struct fd_data *fd;
struct fdc_data *fdc;
fdsu_t fdsu;
#ifndef FIFO_BEFORE_MOTORON
static int fd_fifo = 0;
#endif
fdsu = *(int *)device_get_ivars(dev); /* xxx cheat a bit... */
fd = device_get_softc(dev);
@ -1159,14 +1143,13 @@ fd_probe(device_t dev)
set_motor(fdc, fdsu, TURNON);
DELAY(1000000); /* 1 sec */
#ifndef FIFO_BEFORE_MOTORON
/* XXX This doesn't work before the first set_motor() */
if (fd_fifo == 0 && fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN
&& enable_fifo(fdc) == 0) {
device_print_prettyname(device_get_parent(dev));
printf("FIFO enabled, %d bytes threshold\n", fifo_threshold);
}
fd_fifo = 1;
#endif
if ((fd_cmd(fdc, 2, NE7CMD_SENSED, fdsu, 1, &st3) == 0)
&& (st3 & NE7_ST3_T0)) {
@ -2773,8 +2756,6 @@ fdioctl(dev, cmd, addr, flag, p)
return (error);
}
#endif /* NFDC > 0 */
/*
* Hello emacs, these are the
* Local Variables:

View File

@ -51,11 +51,8 @@
*
*/
#include "fd.h"
#include "opt_fdc.h"
#if NFDC > 0
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@ -451,9 +448,6 @@ static int yeinit(struct pccard_devinfo *devi)
{
fdc_p fdc = &fdc_data[devi->isahd.id_unit];
/* validate unit number. */
if (devi->isahd.id_unit >= NFDC)
return(ENODEV);
fdc->baseport = devi->isahd.id_iobase;
/*
* reset controller
@ -1009,14 +1003,6 @@ fdc_attach(device_t dev)
#endif
bufq_init(&fdc->head);
#ifdef FIFO_BEFORE_MOTORON
/* Hmm, this doesn't work here - is set_motor() magic? -Peter */
if (fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN
&& enable_fifo(fdc) == 0) {
device_print_prettyname(dev);
printf("FIFO enabled, %d bytes threshold\n", fifo_threshold);
}
#endif
/*
* Probe and attach any children as were configured above.
*/
@ -1071,9 +1057,7 @@ fd_probe(device_t dev)
struct fd_data *fd;
struct fdc_data *fdc;
fdsu_t fdsu;
#ifndef FIFO_BEFORE_MOTORON
static int fd_fifo = 0;
#endif
fdsu = *(int *)device_get_ivars(dev); /* xxx cheat a bit... */
fd = device_get_softc(dev);
@ -1159,14 +1143,13 @@ fd_probe(device_t dev)
set_motor(fdc, fdsu, TURNON);
DELAY(1000000); /* 1 sec */
#ifndef FIFO_BEFORE_MOTORON
/* XXX This doesn't work before the first set_motor() */
if (fd_fifo == 0 && fdc->fdct != FDC_NE765 && fdc->fdct != FDC_UNKNOWN
&& enable_fifo(fdc) == 0) {
device_print_prettyname(device_get_parent(dev));
printf("FIFO enabled, %d bytes threshold\n", fifo_threshold);
}
fd_fifo = 1;
#endif
if ((fd_cmd(fdc, 2, NE7CMD_SENSED, fdsu, 1, &st3) == 0)
&& (st3 & NE7_ST3_T0)) {
@ -2773,8 +2756,6 @@ fdioctl(dev, cmd, addr, flag, p)
return (error);
}
#endif /* NFDC > 0 */
/*
* Hello emacs, these are the
* Local Variables: