Remove FW_SSTDV ioctl. It is not used anymore.
This commit is contained in:
parent
e715bfae6c
commit
9190691bd0
@ -127,11 +127,8 @@ static driver_t firewire_driver = {
|
|||||||
int
|
int
|
||||||
fw_tbuf_update(struct firewire_comm *fc, int sub, int flag){
|
fw_tbuf_update(struct firewire_comm *fc, int sub, int flag){
|
||||||
struct fw_bulkxfer *bulkxfer, *bulkxfer2 = NULL;
|
struct fw_bulkxfer *bulkxfer, *bulkxfer2 = NULL;
|
||||||
struct fw_dvbuf *dvbuf = NULL;
|
|
||||||
struct fw_xferq *it;
|
struct fw_xferq *it;
|
||||||
int s, err = 0, i, j, chtag;
|
int s, err = 0;
|
||||||
struct fw_pkt *fp;
|
|
||||||
u_int64_t cycle, dvsync;
|
|
||||||
|
|
||||||
it = fc->it[sub];
|
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);
|
STAILQ_REMOVE_HEAD(&it->stvalid, link);
|
||||||
it->stdma->flag = 0;
|
it->stdma->flag = 0;
|
||||||
STAILQ_INSERT_TAIL(&it->stfree, it->stdma, link);
|
STAILQ_INSERT_TAIL(&it->stfree, it->stdma, link);
|
||||||
|
#ifdef FWXFERQ_DV
|
||||||
if(!(it->flag & FWXFERQ_DV))
|
if(!(it->flag & FWXFERQ_DV))
|
||||||
|
#endif
|
||||||
wakeup(it);
|
wakeup(it);
|
||||||
}
|
}
|
||||||
bulkxfer = STAILQ_FIRST(&it->stvalid);
|
bulkxfer = STAILQ_FIRST(&it->stvalid);
|
||||||
@ -166,7 +165,13 @@ fw_tbuf_update(struct firewire_comm *fc, int sub, int flag){
|
|||||||
it->stdma = bulkxfer;
|
it->stdma = bulkxfer;
|
||||||
it->stdma2 = bulkxfer2;
|
it->stdma2 = bulkxfer2;
|
||||||
|
|
||||||
|
#ifdef FWXFERQ_DV
|
||||||
if(it->flag & 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;
|
chtag = it->flag & 0xff;
|
||||||
dvloop:
|
dvloop:
|
||||||
if(it->dvdma == NULL){
|
if(it->dvdma == NULL){
|
||||||
@ -245,6 +250,7 @@ dvloop:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
|
#endif
|
||||||
splx(s);
|
splx(s);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -445,7 +445,9 @@ struct fw_crom_buf {
|
|||||||
/*
|
/*
|
||||||
* FireWire specific system requests.
|
* FireWire specific system requests.
|
||||||
*/
|
*/
|
||||||
|
#if 0
|
||||||
#define FW_SSTDV _IOWR('S', 85, unsigned int)
|
#define FW_SSTDV _IOWR('S', 85, unsigned int)
|
||||||
|
#endif
|
||||||
#define FW_SSTBUF _IOWR('S', 86, struct fw_isobufreq)
|
#define FW_SSTBUF _IOWR('S', 86, struct fw_isobufreq)
|
||||||
#define FW_GSTBUF _IOWR('S', 87, struct fw_isobufreq)
|
#define FW_GSTBUF _IOWR('S', 87, struct fw_isobufreq)
|
||||||
#define FW_SRSTREAM _IOWR('S', 88, struct fw_isochreq)
|
#define FW_SRSTREAM _IOWR('S', 88, struct fw_isochreq)
|
||||||
|
@ -186,7 +186,9 @@ struct fw_xferq {
|
|||||||
|
|
||||||
#define FWXFERQ_PACKET (1 << 10)
|
#define FWXFERQ_PACKET (1 << 10)
|
||||||
#define FWXFERQ_BULK (1 << 11)
|
#define FWXFERQ_BULK (1 << 11)
|
||||||
|
#if 0
|
||||||
#define FWXFERQ_DV (1 << 12)
|
#define FWXFERQ_DV (1 << 12)
|
||||||
|
#endif
|
||||||
#define FWXFERQ_MODEMASK (7 << 10)
|
#define FWXFERQ_MODEMASK (7 << 10)
|
||||||
|
|
||||||
#define FWXFERQ_EXTBUF (1 << 13)
|
#define FWXFERQ_EXTBUF (1 << 13)
|
||||||
|
@ -110,7 +110,6 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td)
|
|||||||
int unit = DEV2UNIT(dev);
|
int unit = DEV2UNIT(dev);
|
||||||
int sub = DEV2DMACH(dev);
|
int sub = DEV2DMACH(dev);
|
||||||
struct fw_xfer *xfer;
|
struct fw_xfer *xfer;
|
||||||
struct fw_dvbuf *dvbuf;
|
|
||||||
struct fw_bind *fwb;
|
struct fw_bind *fwb;
|
||||||
int err = 0;
|
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->it[sub]->flag &= ~FWXFERQ_RUNNING;
|
||||||
sc->fc->itx_disable(sc->fc, sub);
|
sc->fc->itx_disable(sc->fc, sub);
|
||||||
}
|
}
|
||||||
|
#ifdef FWXFERQ_DV
|
||||||
if(sc->fc->it[sub]->flag & FWXFERQ_DV){
|
if(sc->fc->it[sub]->flag & FWXFERQ_DV){
|
||||||
|
struct fw_dvbuf *dvbuf;
|
||||||
|
|
||||||
if((dvbuf = sc->fc->it[sub]->dvproc) != NULL){
|
if((dvbuf = sc->fc->it[sub]->dvproc) != NULL){
|
||||||
free(dvbuf->buf, M_DEVBUF);
|
free(dvbuf->buf, M_DEVBUF);
|
||||||
sc->fc->it[sub]->dvproc = NULL;
|
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);
|
free(sc->fc->it[sub]->dvbuf, M_DEVBUF);
|
||||||
sc->fc->it[sub]->dvbuf = NULL;
|
sc->fc->it[sub]->dvbuf = NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if(sc->fc->ir[sub]->flag & FWXFERQ_EXTBUF){
|
if(sc->fc->ir[sub]->flag & FWXFERQ_EXTBUF){
|
||||||
free(sc->fc->ir[sub]->buf, M_DEVBUF);
|
free(sc->fc->ir[sub]->buf, M_DEVBUF);
|
||||||
sc->fc->ir[sub]->buf = NULL;
|
sc->fc->ir[sub]->buf = NULL;
|
||||||
@ -359,7 +362,11 @@ fw_write (dev_t dev, struct uio *uio, int ioflag)
|
|||||||
splx(s);
|
splx(s);
|
||||||
it->stproc = NULL;
|
it->stproc = NULL;
|
||||||
}
|
}
|
||||||
|
#ifdef FWXFERQ_DV
|
||||||
if(xferq == NULL && !(it->flag & FWXFERQ_DV)){
|
if(xferq == NULL && !(it->flag & FWXFERQ_DV)){
|
||||||
|
#else
|
||||||
|
if (xferq == NULL) {
|
||||||
|
#endif
|
||||||
isoloop:
|
isoloop:
|
||||||
if(it->stproc == NULL){
|
if(it->stproc == NULL){
|
||||||
it->stproc = STAILQ_FIRST(&it->stfree);
|
it->stproc = STAILQ_FIRST(&it->stfree);
|
||||||
@ -400,7 +407,9 @@ isoloop:
|
|||||||
err = sc->fc->itx_enable(sc->fc, sub);
|
err = sc->fc->itx_enable(sc->fc, sub);
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
} if(xferq == NULL && it->flag & FWXFERQ_DV){
|
}
|
||||||
|
#ifdef FWXFERQ_DV
|
||||||
|
if(xferq == NULL && it->flag & FWXFERQ_DV){
|
||||||
dvloop:
|
dvloop:
|
||||||
if(it->dvproc == NULL){
|
if(it->dvproc == NULL){
|
||||||
it->dvproc = STAILQ_FIRST(&it->dvfree);
|
it->dvproc = STAILQ_FIRST(&it->dvfree);
|
||||||
@ -448,6 +457,7 @@ dvloop:
|
|||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if(xferq != NULL){
|
if(xferq != NULL){
|
||||||
xfer = fw_xfer_alloc();
|
xfer = fw_xfer_alloc();
|
||||||
if(xfer == NULL){
|
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;
|
ichreq->tag =(sc->fc->ir[sub]->flag) >> 2 & 0x3;
|
||||||
err = 0;
|
err = 0;
|
||||||
break;
|
break;
|
||||||
|
#ifdef FWXFERQ_DV
|
||||||
case FW_SSTDV:
|
case FW_SSTDV:
|
||||||
ibufreq = (struct fw_isobufreq *)
|
ibufreq = (struct fw_isobufreq *)
|
||||||
malloc(sizeof(struct fw_isobufreq), M_DEVBUF, M_NOWAIT);
|
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);
|
&sc->fc->it[sub]->dvbuf[i], link);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case FW_SSTBUF:
|
case FW_SSTBUF:
|
||||||
ir = sc->fc->ir[sub];
|
ir = sc->fc->ir[sub];
|
||||||
it = sc->fc->it[sub];
|
it = sc->fc->it[sub];
|
||||||
|
@ -1427,8 +1427,6 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach)
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
unsigned short tag, ich;
|
unsigned short tag, ich;
|
||||||
struct fwohci_dbch *dbch;
|
struct fwohci_dbch *dbch;
|
||||||
struct fw_pkt *fp;
|
|
||||||
struct fwohcidb_tr *db_tr;
|
|
||||||
int cycle_now, sec, cycle, cycle_match;
|
int cycle_now, sec, cycle, cycle_match;
|
||||||
u_int32_t stat;
|
u_int32_t stat;
|
||||||
|
|
||||||
@ -1495,12 +1493,17 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach)
|
|||||||
(dbch->xferq.stdma->start))->db) | dbch->ndesc);
|
(dbch->xferq.stdma->start))->db) | dbch->ndesc);
|
||||||
#define CYCLE_OFFSET 1
|
#define CYCLE_OFFSET 1
|
||||||
if ((stat & OHCI_CNTL_DMA_RUN) == 0) {
|
if ((stat & OHCI_CNTL_DMA_RUN) == 0) {
|
||||||
|
#ifdef FWXFERQ_DV
|
||||||
if(dbch->xferq.flag & 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;
|
db_tr = (struct fwohcidb_tr *)dbch->xferq.stdma->start;
|
||||||
fp = (struct fw_pkt *)db_tr->buf;
|
fp = (struct fw_pkt *)db_tr->buf;
|
||||||
dbch->xferq.dvoffset = CYCLE_OFFSET;
|
dbch->xferq.dvoffset = CYCLE_OFFSET;
|
||||||
fp->mode.ld[2] |= htonl(dbch->xferq.dvoffset << 12);
|
fp->mode.ld[2] |= htonl(dbch->xferq.dvoffset << 12);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* 2bit second + 13bit cycle */
|
/* 2bit second + 13bit cycle */
|
||||||
cycle_now = (fc->cyctimer(fc) >> 12) & 0x7fff;
|
cycle_now = (fc->cyctimer(fc) >> 12) & 0x7fff;
|
||||||
cycle = cycle_now & 0x1fff;
|
cycle = cycle_now & 0x1fff;
|
||||||
@ -1963,7 +1966,6 @@ fwohci_tbuf_update(struct fwohci_softc *sc, int dmach)
|
|||||||
{
|
{
|
||||||
int stat;
|
int stat;
|
||||||
struct firewire_comm *fc = &sc->fc;
|
struct firewire_comm *fc = &sc->fc;
|
||||||
struct fw_pkt *fp;
|
|
||||||
struct fwohci_dbch *dbch;
|
struct fwohci_dbch *dbch;
|
||||||
struct fwohcidb_tr *db_tr;
|
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;
|
stat = OREAD(sc, OHCI_ITCTL(dmach)) & 0x1f;
|
||||||
switch(stat){
|
switch(stat){
|
||||||
case FWOHCIEV_ACKCOMPL:
|
case FWOHCIEV_ACKCOMPL:
|
||||||
#if 1
|
#ifdef FWXFERQ_DV
|
||||||
if (dbch->xferq.flag & FWXFERQ_DV) {
|
if (dbch->xferq.flag & FWXFERQ_DV) {
|
||||||
struct ciphdr *ciph;
|
struct ciphdr *ciph;
|
||||||
int timer, timestamp, cycl, diff;
|
int timer, timestamp, cycl, diff;
|
||||||
static int last_timer=0;
|
static int last_timer=0;
|
||||||
|
struct fw_pkt *fp;
|
||||||
|
|
||||||
timer = (fc->cyctimer(fc) >> 12) & 0xffff;
|
timer = (fc->cyctimer(fc) >> 12) & 0xffff;
|
||||||
db_tr = (struct fwohcidb_tr *)dbch->xferq.stdma->start;
|
db_tr = (struct fwohcidb_tr *)dbch->xferq.stdma->start;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user