diff options
author | julian <julian@FreeBSD.org> | 2005-01-03 08:09:05 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2005-01-03 08:09:05 +0000 |
commit | f19a6b0905dd691cb2dbd7c3b3da31f885bfea0b (patch) | |
tree | 8d0c1c812b98511f86c63cdd210321c08050f749 /sys/dev/usb | |
parent | 25055237733d52a62256f03d27a5604377dcbaef (diff) | |
download | FreeBSD-src-f19a6b0905dd691cb2dbd7c3b3da31f885bfea0b.zip FreeBSD-src-f19a6b0905dd691cb2dbd7c3b3da31f885bfea0b.tar.gz |
A much simpler way to work out if the required transfer can be done in 2
scatter gather segments.
MFC after: 1 week
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ohci.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 575bafb..ff343a2 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -553,9 +553,8 @@ ohci_alloc_std_chain(struct ohci_pipe *opipe, ohci_softc_t *sc, * We can describe the above using maxsegsz = 4k and nsegs = 2 * in the future. */ - if (OHCI_PAGE(dataphys) == OHCI_PAGE(DMAADDR(dma, offset + - len - 1)) || len - (OHCI_PAGE_SIZE - - OHCI_PAGE_OFFSET(dataphys)) <= OHCI_PAGE_SIZE) { + if ((OHCI_PAGE_OFFSET(dataphys) + len) <= + (2 * OHCI_PAGE_SIZE)) { /* we can handle it in this TD */ curlen = len; } else { |