Hi,

   I solved very curious problem with rarely system (FreeBSD-9)
freezing during reboot. Finally, I found out that system freezes in ep
device callout. The part of device tree is following:

   -> pccbb -> pccard -> ep

   cbb_pci_shutdown() method in pccbb device places the cards in
reset, turns off the interrupts and powers down the socket. No child
has a chance to know about it. Thus, if ep device callout fires
between device_shutdown() is called on root device and interrupts are
disabled, the callout freezes in never-ending while loop, which reads
status from hardware (now without power).

   I propose following change (editted by hand) in cbb_pci_shutdown():

        struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev);
+
+       /* Inform all childs. */
+       bus_generic_shutdown(brdev);
+
        /*
         * We're about to pull the rug out from the card, so mark it as
         * gone to prevent harm.
         */
        sc->cardok = 0;

    Futhermore, ep device (ed device too, ... ?) has not implemented
device_shutdown method. So, fixing pccbb device is not enough to solve
the freezing problem. I somehow patched the mentioned devices too, but
maybe someone more competent should do it for FreeBSD tree.

            Svata
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to