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
This commit is contained in:
Ian Dowse 2003-11-25 02:23:29 +00:00
parent 985b09e826
commit 5bc9164667

View File

@ -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;