Module Name: src
Committed By: msaitoh
Date: Wed Jul 7 03:55:01 UTC 2010
Modified Files:
src/sys/dev/usb: ehci.c
Log Message:
For interrupt transfer, nak throttling must be disabled, but for the other
transfer type, nak throttling should be enabled from the veiwpoint that
avoids the memory thrashing. Fixes a problem that interrupt transfer stall
on some EHCI controllers (e.g. Geode LX). Fixed by Yamada Katsumi.
To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/dev/usb/ehci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.168 src/sys/dev/usb/ehci.c:1.169
--- src/sys/dev/usb/ehci.c:1.168 Wed Jun 2 18:53:39 2010
+++ src/sys/dev/usb/ehci.c Wed Jul 7 03:55:01 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.168 2010/06/02 18:53:39 jakllsch Exp $ */
+/* $NetBSD: ehci.c,v 1.169 2010/07/07 03:55:01 msaitoh Exp $ */
/*
* Copyright (c) 2004-2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.168 2010/06/02 18:53:39 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.169 2010/07/07 03:55:01 msaitoh Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -1581,7 +1581,13 @@
return USBD_INVAL;
}
- naks = 8; /* XXX */
+ /*
+ * For interrupt transfer, nak throttling must be disabled, but for
+ * the other transfer type, nak throttling should be enabled from the
+ * veiwpoint that avoids the memory thrashing.
+ */
+ naks = (xfertype == UE_INTERRUPT) ? 0
+ : ((speed == EHCI_QH_SPEED_HIGH) ? 4 : 0);
/* Allocate sqh for everything, save isoc xfers */
if (xfertype != UE_ISOCHRONOUS) {