diff options
author | simokawa <simokawa@FreeBSD.org> | 2003-08-04 05:43:02 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2003-08-04 05:43:02 +0000 |
commit | ab808e6a79957a6c8ff27491694ddda4c5cd929a (patch) | |
tree | ea7d6fd07372d1061e8f09bca0f1582282dec77d /sys/dev/firewire/fwohci_pci.c | |
parent | 71cdd2eb3d19206d1112c7b8d3298a79e8ed670f (diff) | |
download | FreeBSD-src-ab808e6a79957a6c8ff27491694ddda4c5cd929a.zip FreeBSD-src-ab808e6a79957a6c8ff27491694ddda4c5cd929a.tar.gz |
- Don't mess with TX queue in fwohci_stop() if we failed to attach the device.
Tested by: wilko
- Detect memory mapping failure of registers by checking OHCI version.
Tested by: KONDOU, Kazuhiro <kazuhiro@alib.jp>
Diffstat (limited to 'sys/dev/firewire/fwohci_pci.c')
-rw-r--r-- | sys/dev/firewire/fwohci_pci.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c index 0ac6b00..513343a 100644 --- a/sys/dev/firewire/fwohci_pci.c +++ b/sys/dev/firewire/fwohci_pci.c @@ -346,8 +346,14 @@ fwohci_pci_detach(device_t self) s = splfw(); - fwohci_stop(sc, self); + if (sc->bsr) + fwohci_stop(sc, self); + bus_generic_detach(self); + if (sc->fc.bdev) { + device_delete_child(self, sc->fc.bdev); + sc->fc.bdev = NULL; + } /* disable interrupts that might have been switched on */ if (sc->bst && sc->bsh) @@ -366,11 +372,6 @@ fwohci_pci_detach(device_t self) sc->ih = NULL; } - if (sc->fc.bdev) { - device_delete_child(self, sc->fc.bdev); - sc->fc.bdev = NULL; - } - if (sc->irq_res) { bus_release_resource(self, SYS_RES_IRQ, 0, sc->irq_res); sc->irq_res = NULL; |