diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2010-07-07 03:55:01 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2010-07-07 03:55:01 +0000 |
| commit | 310cb20a73370ed3aefcb88c895a6aec79baa910 (patch) | |
| tree | 2a820f971394c814bd3ff666072650c6c4ad9ee4 /sys | |
| parent | 6b006f0c29411acf5b3ff3b663bc5c6935822086 (diff) | |
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 (limited to 'sys')
| -rw-r--r-- | sys/dev/usb/ehci.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index e91047fa2d2..2b52fec3c38 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -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 @@ ehci_open(usbd_pipe_handle pipe) 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) { |
