- Fix panic on detach.

- Fix a comment.

MFC after: 2 weeks
This commit is contained in:
Hidetoshi Shimokawa 2008-05-10 13:40:42 +00:00
parent e15864efd8
commit d219022c4c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178915
2 changed files with 4 additions and 4 deletions

View File

@ -508,6 +508,9 @@ firewire_detach(device_t dev)
printf("firewire probe thread didn't die\n");
mtx_unlock(&fc->wait_lock);
if (fc->arq !=0 && fc->arq->maxq > 0)
fw_drain_txq(fc);
if ((err = fwdev_destroydev(sc)) != 0)
return err;
@ -518,7 +521,7 @@ firewire_detach(device_t dev)
callout_stop(&fc->bmr_callout);
callout_stop(&fc->busprobe_callout);
/* XXX xfree_free and untimeout on all xfers */
/* XXX xfer_free and untimeout on all xfers */
for (fwdev = STAILQ_FIRST(&fc->devices); fwdev != NULL;
fwdev = fwdev_next) {
fwdev_next = STAILQ_NEXT(fwdev, link);

View File

@ -1758,9 +1758,6 @@ fwohci_stop(struct fwohci_softc *sc, device_t dev)
OWRITE(sc, OHCI_ITCTLCLR(i), OHCI_CNTL_DMA_RUN);
}
if (sc->fc.arq !=0 && sc->fc.arq->maxq > 0)
fw_drain_txq(&sc->fc);
#if 0 /* Let dcons(4) be accessed */
/* Stop interrupt */
OWRITE(sc, FWOHCI_INTMASKCLR,