]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
If we failed to probe/attach somehow, we never have a sc->sc_hcca
authorJulian Elischer <julian@FreeBSD.org>
Fri, 11 Dec 1998 06:02:06 +0000 (06:02 +0000)
committerJulian Elischer <julian@FreeBSD.org>
Fri, 11 Dec 1998 06:02:06 +0000 (06:02 +0000)
commit8cbe8a3ebf28ce66538485e6595539ea30098356
tree96e8fc5cb77ff17ee4798ad4eaff9716489a26eb
parent57c2edb48fd1d523c13d1b205d9f54596188e1c6
If we failed to probe/attach somehow, we never have a sc->sc_hcca
but the present PCI probe code still thinks we are there as the pci attach
can't return an error code.

This means we are in the shared interrupt list, but have not been set up.
If we are sharing ints with another device, ohci_intr will be called and will
coredump on a NULL reference. So just return if it is called when not set up.

This fixes the symptom and not the cause.
The right answer is to let the PCI system know that the attach failed,
or to fail earlier (in the PCI probe).
The attach() is a void fn() so it can't return failure..
sys/dev/usb/ohci.c