Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Define and use EHCI_QTD_MAXTRANSFER. No fu...
details: https://anonhg.NetBSD.org/src/rev/c5dfe0ecc987
branches: nick-nhusb
changeset: 334107:c5dfe0ecc987
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Feb 01 08:45:04 2015 +0000
description:
Define and use EHCI_QTD_MAXTRANSFER. No functional change.
diffstat:
sys/dev/usb/ehci.c | 8 ++++----
sys/dev/usb/ehcireg.h | 5 +++--
2 files changed, 7 insertions(+), 6 deletions(-)
diffs (52 lines):
diff -r ab8857c5c361 -r c5dfe0ecc987 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c Sun Feb 01 08:39:43 2015 +0000
+++ b/sys/dev/usb/ehci.c Sun Feb 01 08:45:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.234.2.29 2015/02/01 06:15:41 skrll Exp $ */
+/* $NetBSD: ehci.c,v 1.234.2.30 2015/02/01 08:45:04 skrll Exp $ */
/*
* Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.29 2015/02/01 06:15:41 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.30 2015/02/01 08:45:04 skrll Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -2786,12 +2786,12 @@
/* The EHCI hardware can handle at most 5 pages. */
va_offs = (vaddr_t)KERNADDR(dma, curoffs);
va_offs = EHCI_PAGE_OFFSET(va_offs);
- if (len-curoffs < EHCI_QTD_NBUFFERS*EHCI_PAGE_SIZE - va_offs) {
+ if (len-curoffs < EHCI_QTD_MAXTRANSFER - va_offs) {
/* we can handle it in this QTD */
curlen = len - curoffs;
} else {
/* must use multiple TDs, fill as much as possible. */
- curlen = EHCI_QTD_NBUFFERS * EHCI_PAGE_SIZE - va_offs;
+ curlen = EHCI_QTD_MAXTRANSFER - va_offs;
/* the length must be a multiple of the max size */
curlen -= curlen % mps;
diff -r ab8857c5c361 -r c5dfe0ecc987 sys/dev/usb/ehcireg.h
--- a/sys/dev/usb/ehcireg.h Sun Feb 01 08:39:43 2015 +0000
+++ b/sys/dev/usb/ehcireg.h Sun Feb 01 08:45:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehcireg.h,v 1.34.14.3 2015/02/01 08:39:43 skrll Exp $ */
+/* $NetBSD: ehcireg.h,v 1.34.14.4 2015/02/01 08:45:04 skrll Exp $ */
/*
* Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -281,7 +281,8 @@
#define EHCI_SITD_ALIGN 32
/* Queue Element Transfer Descriptor */
-#define EHCI_QTD_NBUFFERS 5
+#define EHCI_QTD_NBUFFERS 5
+#define EHCI_QTD_MAXTRANSFER (EHCI_QTD_NBUFFERS * EHCI_PAGE_SIZE)
typedef struct {
volatile ehci_link_t qtd_next;
volatile ehci_link_t qtd_altnext;
Home |
Main Index |
Thread Index |
Old Index