diff options
author | simokawa <simokawa@FreeBSD.org> | 2003-01-09 10:25:07 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2003-01-09 10:25:07 +0000 |
commit | 212d0ee2a6ab1c2ee797409349d541f7f0b84d7e (patch) | |
tree | e819ae8afb01ad5a663eb00bee6b088821615e02 | |
parent | c240e83a3ca06600d24e6d9ad42cc60a63078447 (diff) | |
download | FreeBSD-src-212d0ee2a6ab1c2ee797409349d541f7f0b84d7e.zip FreeBSD-src-212d0ee2a6ab1c2ee797409349d541f7f0b84d7e.tar.gz |
- Add error messages for bulkxfer.
- Reduce register access.
-rw-r--r-- | sys/dev/firewire/firewire.c | 1 | ||||
-rw-r--r-- | sys/dev/firewire/fwohci.c | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index e6023cb..7ed2fd1 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -289,6 +289,7 @@ fw_rbuf_update(struct firewire_comm *fc, int sub, int flag){ STAILQ_REMOVE_HEAD(&ir->stfree, link); } }else{ + device_printf(fc->bdev, "no free chunk available\n"); bulkxfer = STAILQ_FIRST(&ir->stvalid); STAILQ_REMOVE_HEAD(&ir->stvalid, link); } diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index ea8532e..4fbdcad 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -1485,11 +1485,12 @@ fwohci_irxbuf_enable(struct firewire_comm *fc, int dmach) struct fwohci_softc *sc = (struct fwohci_softc *)fc; int err = 0; unsigned short tag, ich; - tag = (sc->ir[dmach].xferq.flag >> 6) & 3; - ich = sc->ir[dmach].xferq.flag & 0x3f; - OWRITE(sc, OHCI_IRMATCH(dmach), tagbit[tag] | ich); if(!(sc->ir[dmach].xferq.flag & FWXFERQ_RUNNING)){ + tag = (sc->ir[dmach].xferq.flag >> 6) & 3; + ich = sc->ir[dmach].xferq.flag & 0x3f; + OWRITE(sc, OHCI_IRMATCH(dmach), tagbit[tag] | ich); + sc->ir[dmach].xferq.queued = 0; sc->ir[dmach].ndb = sc->ir[dmach].xferq.bnpacket * sc->ir[dmach].xferq.bnchunk; @@ -1539,8 +1540,8 @@ fwohci_irxbuf_enable(struct firewire_comm *fc, int dmach) OWRITE(sc, OHCI_IRCMD(dmach), vtophys(((struct fwohcidb_tr *)(sc->ir[dmach].xferq.stdma->start))->db) | sc->ir[dmach].ndesc); OWRITE(sc, OHCI_IRCTL(dmach), OHCI_CNTL_DMA_RUN); + OWRITE(sc, FWOHCI_INTMASK, OHCI_INT_DMA_IR); } - OWRITE(sc, FWOHCI_INTMASK, OHCI_INT_DMA_IR); return err; } @@ -1922,6 +1923,7 @@ fwohci_rbuf_update(struct fwohci_softc *sc, int dmach) fwohci_irx_enable(&sc->fc, dmach); break; default: + device_printf(sc->fc.dev, "Isochronous receive err %02x\n", stat); break; } } |