Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Make sure all packets (except the last) have the...
details: https://anonhg.NetBSD.org/src/rev/ade08030fb8d
branches: trunk
changeset: 483868:ade08030fb8d
user: augustss <augustss%NetBSD.org@localhost>
date: Mon Mar 20 00:37:00 2000 +0000
description:
Make sure all packets (except the last) have the maximum packet size even
when using multiple TDs.
diffstat:
sys/dev/usb/ohci.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 4d9e3412b9da -r ade08030fb8d sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c Mon Mar 20 00:27:11 2000 +0000
+++ b/sys/dev/usb/ohci.c Mon Mar 20 00:37:00 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.77 2000/03/19 22:24:57 augustss Exp $ */
+/* $NetBSD: ohci.c,v 1.78 2000/03/20 00:37:00 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
/*
@@ -507,6 +507,12 @@
/* must use multiple TDs, fill as much as possible. */
curlen = 2 * OHCI_PAGE_SIZE -
(dataphys & (OHCI_PAGE_SIZE-1));
+ /* the length must be a multiple of the max size */
+ curlen -= curlen % UGETW(opipe->pipe.endpoint->edesc->wMaxPacketSize);
+#ifdef DIAGNOSTIC
+ if (curlen == 0)
+ panic("ohci_alloc_std: curlen == 0\n");
+#endif
}
DPRINTFN(4,("ohci_alloc_std_chain: dataphys=0x%08x "
"dataphysend=0x%08x len=%d curlen=%d\n",
Home |
Main Index |
Thread Index |
Old Index