From 57ceda5d843396c1ad98cf7e979fa2a3f2825620 Mon Sep 17 00:00:00 2001 From: Lukas Ertl Date: Sat, 26 Jun 2004 09:19:31 +0000 Subject: [PATCH] MFNetBSD. ohci.c (1.147), author: mycroft Failure to properly mask off UE_DIR_IN from the endpoint address was causing OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set spuriously, causing rather interesting lossage. Suddenly I get MUCH better performance with ehci... ohci.c (1.148), author: mycroft Adjust a couple of comments to make it clear WTF is going on. Obtained from: NetBSD --- sys/dev/usb/ohci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index bf0e33fd05c..a8dfe3f4c67 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -8,6 +8,8 @@ * $NetBSD: ohci.c,v 1.144 2003/11/23 19:18:06 augustss Exp $ * $NetBSD: ohci.c,v 1.145 2003/11/23 19:20:25 augustss Exp $ * $NetBSD: ohci.c,v 1.146 2003/12/29 08:17:10 toshii Exp $ + * $NetBSD: ohci.c,v 1.147 2004/06/22 07:20:35 mycroft Exp $ + * $NetBSD: ohci.c,v 1.148 2004/06/22 18:27:46 mycroft Exp $ */ #include @@ -1727,7 +1729,8 @@ ohci_device_request(usbd_xfer_handle xfer) sed = opipe->sed; opipe->u.ctl.length = len; - /* Update device address and length since they may have changed. */ + /* Update device address and length since they may have changed + during the setup of the control pipe in usbd_new_device(). */ /* XXX This only needs to be done once, but it's too early in open. */ /* XXXX Should not touch ED here! */ sed->ed.ed_flags = htole32( @@ -2123,7 +2126,7 @@ ohci_open(usbd_pipe_handle pipe) } sed->ed.ed_flags = htole32( OHCI_ED_SET_FA(addr) | - OHCI_ED_SET_EN(ed->bEndpointAddress) | + OHCI_ED_SET_EN(UE_GET_ADDR(ed->bEndpointAddress)) | (dev->speed == USB_SPEED_LOW ? OHCI_ED_SPEED : 0) | fmt | OHCI_ED_SET_MAXP(UGETW(ed->wMaxPacketSize)));