diff options
| author | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-03-24 04:06:21 +0000 |
|---|---|---|
| committer | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-03-24 04:06:21 +0000 |
| commit | 73aa55ba0a42907a46c8ab1b42078bdb40d45906 (patch) | |
| tree | f4acab0b89720d877fc3a306ebd1a157c393a5ec /sys/dev | |
| parent | a84fda13bb2df0c83be594d4cf2dfa23c0028a70 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/firewire/fwmem.c | 2 | ||||
| -rw-r--r-- | sys/dev/firewire/fwohci.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/firewire/fwmem.c b/sys/dev/firewire/fwmem.c index 891fc7a433d52..13bd092a9323f 100644 --- a/sys/dev/firewire/fwmem.c +++ b/sys/dev/firewire/fwmem.c @@ -163,7 +163,7 @@ fwmem_write_quad( fp->mode.wreqq.dest_hi = htons(dst_hi); fp->mode.wreqq.dest_lo = htonl(dst_lo); - fp->mode.wreqq.data = htonl(data); + fp->mode.wreqq.data = data; if (fwmem_debug) printf("fwmem_write_quad: %d %04x:%08x %08x\n", fwdev->dst, diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 29901c5fb1bcf..1f45cb92438ed 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -169,6 +169,7 @@ void fwohci_txbufdb __P((struct fwohci_softc *, int , struct fw_bulkxfer *)); #define NDVDB (DVBUF * NDB) #define OHCI_VERSION 0x00 +#define OHCI_ATRETRY 0x08 #define OHCI_CROMHDR 0x18 #define OHCI_BUS_OPT 0x20 #define OHCI_BUSIRMC (1 << 31) @@ -810,6 +811,10 @@ txloop: for( i = 0 ; i < hdr_off ; i+= 4){ ohcifp->mode.ld[i/4] = ntohl(fp->mode.ld[i/4]); } + /* XXX payload must be network byte order */ + if (tcode == FWTCODE_WREQQ || tcode == FWTCODE_RRESQ) { + ohcifp->mode.ld[3] = htonl(ohcifp->mode.ld[3]); + } ohcifp->mode.common.spd = xfer->spd; if (tcode == FWTCODE_STREAM ){ hdr_len = 8; @@ -1882,6 +1887,8 @@ busresetout: OWRITE(sc, OHCI_PREQHI, 0x7fffffff); OWRITE(sc, OHCI_PREQLO, 0xffffffff); OWRITE(sc, OHCI_PREQUPPER, 0x10000); + /* Set ATRetries register */ + OWRITE(sc, OHCI_ATRETRY, 1<<(13+16) | 0xfff); /* ** Checking whether the node is root or not. If root, turn on ** cycle master. @@ -2795,7 +2802,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count) switch(stat){ case FWOHCIEV_ACKPEND: #if 0 - printf("fwohci_arcv: ack pending..\n"); + printf("fwohci_arcv: ack pending tcode=0x%x..\n", fp->mode.common.tcode); #endif /* fall through */ case FWOHCIEV_ACKCOMPL: |
