Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb For interrupt transfer, nak throttling must be d...
details: https://anonhg.NetBSD.org/src/rev/2a51616e4aee
branches: trunk
changeset: 756141:2a51616e4aee
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Jul 07 03:55:01 2010 +0000
description:
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.
diffstat:
sys/dev/usb/ehci.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 7b4f7e40ba05 -r 2a51616e4aee sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c Wed Jul 07 01:37:35 2010 +0000
+++ b/sys/dev/usb/ehci.c Wed Jul 07 03:55:01 2010 +0000
@@ -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) {
Home |
Main Index |
Thread Index |
Old Index