void fd_motor_on(void *arg) { struct fd_softc *fd = arg; struct fdc_softc *fdc = (void *)fd->sc_dev.dv_parent; int s; s = splbio(); fd->sc_flags &= ~FD_MOTOR_WAIT; if ((TAILQ_FIRST(&fdc->sc_link.fdlink.sc_drives) == fd) && (fdc->sc_state == MOTORWAIT)) (void) fdintr(fdc); splx(s); }
int fdcintr(void *arg) { #if NFD > 0 struct fdc_softc *fdc = arg; extern int fdintr(struct fdc_softc *); /* Will switch on device type, shortly. */ return (fdintr(fdc)); #else printf("fdcintr: got interrupt, but no devices!\n"); return (1); #endif }
void fdtimeout(void *arg) { struct fd_softc *fd = arg; struct fdc_softc *fdc = (void *)fd->sc_dev.dv_parent; int s; s = splbio(); #ifdef DEBUG log(LOG_ERR,"fdtimeout: state %d\n", fdc->sc_state); #endif fdcstatus(&fd->sc_dev, 0, "timeout"); if (fd->sc_bp != NULL) fdc->sc_state++; else fdc->sc_state = DEVIDLE; (void) fdintr(fdc); splx(s); }