Subject: kern/11805: isa_ntwoc hangs on reboot
To: None <,>
From: None <>
List: netbsd-bugs
Date: 12/23/2000 17:22:14
>Number:         11805
>Category:       kern
>Synopsis:       isa_ntwoc hangs on reboot
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 23 17:22:00 PST 2000
>Originator:     Charlie Root
>Release:        NetBSD-1.5
System: NetBSD 1.5 NetBSD 1.5 (ROUTER) #4: Thu Dec 21 19:13:26 PST 2000 i386

	Adding an SDL Riscom/N2 ISA card and configuring the GENERIC kernel to use this
        card causes the system to hang after the "reboot" command is given.
	Very repeatable as mentioned above and with non-GENERIC kernels.

	change the shutdown routine to look like the one below (based on pci version of driver):

	in /sys/dev/isa/if_ntwoc_isa.c, add a line to turn off the card:

 * shut down interrupts and DMA, so we don't trash the kernel on warm
 * boot.  Also, lower DTR on each port and disable card interrupts.
static void
ntwoc_isa_shutdown(void *aux)
	struct ntwoc_isa_softc *sc = aux;
	u_int16_t mcr;

	 * shut down the SCA ports

	 * lower DTR on both ports
	mcr = bus_space_read_1(sc->sc_sca.sc_iot, sc->sc_sca.sc_ioh, NTWOC_MCR);
	bus_space_write_1(sc->sc_sca.sc_iot, sc->sc_sca.sc_ioh, NTWOC_MCR, mcr);

	/* turn off the card */
	bus_space_write_1(sc->sc_sca.sc_iot, sc->sc_sca.sc_ioh, NTWOC_PCR, 0);