diff options
author | simokawa <simokawa@FreeBSD.org> | 2003-03-05 01:50:57 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2003-03-05 01:50:57 +0000 |
commit | 2a8b565223c8867f5b7912cb979c2ab7df6885a7 (patch) | |
tree | fc7559f4db75cccdb6b8e4193f7a201354500d78 | |
parent | ead4a3adcb48f6996c512802a54a9d9d41cab6b5 (diff) | |
download | FreeBSD-src-2a8b565223c8867f5b7912cb979c2ab7df6885a7.zip FreeBSD-src-2a8b565223c8867f5b7912cb979c2ab7df6885a7.tar.gz |
Set ldesc after dbch->ndesc has initialized.
-rw-r--r-- | sys/dev/firewire/fwohci.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index b6db991..1821e50 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -1585,7 +1585,6 @@ fwohci_irxbuf_enable(struct firewire_comm *fc, int dmach) dbch = &sc->ir[dmach]; ir = &dbch->xferq; - ldesc = dbch->ndesc - 1; if ((ir->flag & FWXFERQ_RUNNING) == 0) { tag = (ir->flag >> 6) & 3; @@ -1609,8 +1608,6 @@ fwohci_irxbuf_enable(struct firewire_comm *fc, int dmach) if(err) return err; - s = splfw(); - first = STAILQ_FIRST(&ir->stfree); if (first == NULL) { device_printf(fc->dev, "IR DMA no free chunk\n"); @@ -1618,6 +1615,8 @@ fwohci_irxbuf_enable(struct firewire_comm *fc, int dmach) return 0; } + ldesc = dbch->ndesc - 1; + s = splfw(); prev = STAILQ_LAST(&ir->stdma, fw_bulkxfer, link); while ((chunk = STAILQ_FIRST(&ir->stfree)) != NULL) { volatile struct fwohcidb *db; |