summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2003-11-25 02:23:29 +0000
committeriedowse <iedowse@FreeBSD.org>2003-11-25 02:23:29 +0000
commit36326ca6deb3efc1d462508ef72f326ccda358e3 (patch)
tree3aaa19e3b078581a2d46ac1c95a281578787e8b3 /sys
parent3d91d7a63c4b1799a9a377b3601e738abaeafaf5 (diff)
downloadFreeBSD-src-36326ca6deb3efc1d462508ef72f326ccda358e3.zip
FreeBSD-src-36326ca6deb3efc1d462508ef72f326ccda358e3.tar.gz
Write the correct value to `td_be' for the second and further
transfer descriptors when a large request needs to be split into more than one 8k chunk. The bug was that the calculation did not take into account the offset of the chunk within the overall request. This is reported to fix crashes and data corruption on ohci controllers. Submitted by: green Approved by: re
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ohci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 65fcf61..ce54cdf 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -569,7 +569,7 @@ ohci_alloc_std_chain(struct ohci_pipe *opipe, ohci_softc_t *sc,
cur->td.td_cbp = htole32(dataphys);
cur->nexttd = next;
cur->td.td_nexttd = htole32(next->physaddr);
- cur->td.td_be = htole32(DMAADDR(dma, curlen - 1));
+ cur->td.td_be = htole32(DMAADDR(dma, offset + curlen - 1));
cur->len = curlen;
cur->flags = OHCI_ADD_LEN;
cur->xfer = xfer;
OpenPOWER on IntegriCloud