diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/firewire/firewire.c | 14 | ||||
-rw-r--r-- | sys/dev/firewire/firewire.h | 2 | ||||
-rw-r--r-- | sys/dev/firewire/firewirereg.h | 2 | ||||
-rw-r--r-- | sys/dev/firewire/fwdev.c | 16 | ||||
-rw-r--r-- | sys/dev/firewire/fwohci.c | 11 |
5 files changed, 35 insertions, 10 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index eb31387..7252cea 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -127,11 +127,8 @@ static driver_t firewire_driver = { int fw_tbuf_update(struct firewire_comm *fc, int sub, int flag){ struct fw_bulkxfer *bulkxfer, *bulkxfer2 = NULL; - struct fw_dvbuf *dvbuf = NULL; struct fw_xferq *it; - int s, err = 0, i, j, chtag; - struct fw_pkt *fp; - u_int64_t cycle, dvsync; + int s, err = 0; it = fc->it[sub]; @@ -144,7 +141,9 @@ fw_tbuf_update(struct firewire_comm *fc, int sub, int flag){ STAILQ_REMOVE_HEAD(&it->stvalid, link); it->stdma->flag = 0; STAILQ_INSERT_TAIL(&it->stfree, it->stdma, link); +#ifdef FWXFERQ_DV if(!(it->flag & FWXFERQ_DV)) +#endif wakeup(it); } bulkxfer = STAILQ_FIRST(&it->stvalid); @@ -166,7 +165,13 @@ fw_tbuf_update(struct firewire_comm *fc, int sub, int flag){ it->stdma = bulkxfer; it->stdma2 = bulkxfer2; +#ifdef FWXFERQ_DV if(it->flag & FWXFERQ_DV){ + struct fw_dvbuf *dvbuf = NULL; + int i, j, chtag; + struct fw_pkt *fp; + u_int64_t cycle, dvsync; + chtag = it->flag & 0xff; dvloop: if(it->dvdma == NULL){ @@ -245,6 +250,7 @@ dvloop: } } out: +#endif splx(s); return err; } diff --git a/sys/dev/firewire/firewire.h b/sys/dev/firewire/firewire.h index f31496b..6ac583c 100644 --- a/sys/dev/firewire/firewire.h +++ b/sys/dev/firewire/firewire.h @@ -445,7 +445,9 @@ struct fw_crom_buf { /* * FireWire specific system requests. */ +#if 0 #define FW_SSTDV _IOWR('S', 85, unsigned int) +#endif #define FW_SSTBUF _IOWR('S', 86, struct fw_isobufreq) #define FW_GSTBUF _IOWR('S', 87, struct fw_isobufreq) #define FW_SRSTREAM _IOWR('S', 88, struct fw_isochreq) diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h index 3b2b929..05f6d3e 100644 --- a/sys/dev/firewire/firewirereg.h +++ b/sys/dev/firewire/firewirereg.h @@ -186,7 +186,9 @@ struct fw_xferq { #define FWXFERQ_PACKET (1 << 10) #define FWXFERQ_BULK (1 << 11) +#if 0 #define FWXFERQ_DV (1 << 12) +#endif #define FWXFERQ_MODEMASK (7 << 10) #define FWXFERQ_EXTBUF (1 << 13) diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index 6c61bd9..d096ba1 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -110,7 +110,6 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td) int unit = DEV2UNIT(dev); int sub = DEV2DMACH(dev); struct fw_xfer *xfer; - struct fw_dvbuf *dvbuf; struct fw_bind *fwb; int err = 0; @@ -136,7 +135,10 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td) sc->fc->it[sub]->flag &= ~FWXFERQ_RUNNING; sc->fc->itx_disable(sc->fc, sub); } +#ifdef FWXFERQ_DV if(sc->fc->it[sub]->flag & FWXFERQ_DV){ + struct fw_dvbuf *dvbuf; + if((dvbuf = sc->fc->it[sub]->dvproc) != NULL){ free(dvbuf->buf, M_DEVBUF); sc->fc->it[sub]->dvproc = NULL; @@ -156,6 +158,7 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td) free(sc->fc->it[sub]->dvbuf, M_DEVBUF); sc->fc->it[sub]->dvbuf = NULL; } +#endif if(sc->fc->ir[sub]->flag & FWXFERQ_EXTBUF){ free(sc->fc->ir[sub]->buf, M_DEVBUF); sc->fc->ir[sub]->buf = NULL; @@ -359,7 +362,11 @@ fw_write (dev_t dev, struct uio *uio, int ioflag) splx(s); it->stproc = NULL; } +#ifdef FWXFERQ_DV if(xferq == NULL && !(it->flag & FWXFERQ_DV)){ +#else + if (xferq == NULL) { +#endif isoloop: if(it->stproc == NULL){ it->stproc = STAILQ_FIRST(&it->stfree); @@ -400,7 +407,9 @@ isoloop: err = sc->fc->itx_enable(sc->fc, sub); } return err; - } if(xferq == NULL && it->flag & FWXFERQ_DV){ + } +#ifdef FWXFERQ_DV + if(xferq == NULL && it->flag & FWXFERQ_DV){ dvloop: if(it->dvproc == NULL){ it->dvproc = STAILQ_FIRST(&it->dvfree); @@ -448,6 +457,7 @@ dvloop: } return err; } +#endif if(xferq != NULL){ xfer = fw_xfer_alloc(); if(xfer == NULL){ @@ -562,6 +572,7 @@ fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td) ichreq->tag =(sc->fc->ir[sub]->flag) >> 2 & 0x3; err = 0; break; +#ifdef FWXFERQ_DV case FW_SSTDV: ibufreq = (struct fw_isobufreq *) malloc(sizeof(struct fw_isobufreq), M_DEVBUF, M_NOWAIT); @@ -604,6 +615,7 @@ fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td) &sc->fc->it[sub]->dvbuf[i], link); } break; +#endif case FW_SSTBUF: ir = sc->fc->ir[sub]; it = sc->fc->it[sub]; diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 4a29261..94f763d 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -1427,8 +1427,6 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach) int err = 0; unsigned short tag, ich; struct fwohci_dbch *dbch; - struct fw_pkt *fp; - struct fwohcidb_tr *db_tr; int cycle_now, sec, cycle, cycle_match; u_int32_t stat; @@ -1495,12 +1493,17 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach) (dbch->xferq.stdma->start))->db) | dbch->ndesc); #define CYCLE_OFFSET 1 if ((stat & OHCI_CNTL_DMA_RUN) == 0) { +#ifdef FWXFERQ_DV if(dbch->xferq.flag & FWXFERQ_DV){ + struct fw_pkt *fp; + struct fwohcidb_tr *db_tr; + db_tr = (struct fwohcidb_tr *)dbch->xferq.stdma->start; fp = (struct fw_pkt *)db_tr->buf; dbch->xferq.dvoffset = CYCLE_OFFSET; fp->mode.ld[2] |= htonl(dbch->xferq.dvoffset << 12); } +#endif /* 2bit second + 13bit cycle */ cycle_now = (fc->cyctimer(fc) >> 12) & 0x7fff; cycle = cycle_now & 0x1fff; @@ -1963,7 +1966,6 @@ fwohci_tbuf_update(struct fwohci_softc *sc, int dmach) { int stat; struct firewire_comm *fc = &sc->fc; - struct fw_pkt *fp; struct fwohci_dbch *dbch; struct fwohcidb_tr *db_tr; @@ -1994,11 +1996,12 @@ fwohci_tbuf_update(struct fwohci_softc *sc, int dmach) stat = OREAD(sc, OHCI_ITCTL(dmach)) & 0x1f; switch(stat){ case FWOHCIEV_ACKCOMPL: -#if 1 +#ifdef FWXFERQ_DV if (dbch->xferq.flag & FWXFERQ_DV) { struct ciphdr *ciph; int timer, timestamp, cycl, diff; static int last_timer=0; + struct fw_pkt *fp; timer = (fc->cyctimer(fc) >> 12) & 0xffff; db_tr = (struct fwohcidb_tr *)dbch->xferq.stdma->start; |