Subject: kern/6998: epintr after epshutdown hangs in the driver.
To: None <gnats-bugs@gnats.netbsd.org>
From: Marc Horowitz <marc@horowitz.ne.mediaone.net>
List: netbsd-bugs
Date: 02/13/1999 19:43:40
>Number:         6998
>Category:       kern
>Synopsis:       epintr after epshutdown hangs in the driver.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 13 16:50:00 1999
>Last-Modified:
>Originator:     Marc Horowitz
>Organization:

>Release:        Feb 2 (but nothing relevant has changed since)
>Environment:
System: NetBSD 1.3I (MARC) #50: Tue Feb  2 20:01:53 EST 1999 
marc@horowitz:/u1/netbsd/src/sys/arch/i386/compile/MARC

>Description:

rebooting on a busy network causes a hang in epstop (probably in the
one spin loop) after printing "ep0: adapter failure (0xffff)".  This
is presumably because the adapter is in a hard reset state.

This is actually two bugs.  First, nothing in any device driver should
spin forever.  Second, the interrupt handler should be disabled in
epshutdown().  I'm not sure what the better fix is: putting a disable
hook in every bus attachment, and calling epdisable() in epshutdown,
or just setting sc->enabled = 0 in epshutdown so that future calls to
epintr() return immediately.

>How-To-Repeat:

	reboot a kernel with an isa ep0 device.  (on inspection, pci
should fail the same way)

>Fix:
	see above.  I'll implement this if someone gives me a good
reason for one fix or the other.
>Audit-Trail:
>Unformatted: