From owner-freebsd-usb@FreeBSD.ORG Fri Jul 6 06:53:38 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD0B416A421 for ; Fri, 6 Jul 2007 06:53:38 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 3ED2913C468 for ; Fri, 6 Jul 2007 06:53:38 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.lan) by mailfe07.swip.net (CommuniGate Pro SMTP 5.1.10) with ESMTPA id 539763926 for freebsd-usb@freebsd.org; Fri, 06 Jul 2007 08:53:36 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Fri, 6 Jul 2007 08:53:38 +0200 User-Agent: KMail/1.9.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707060853.38198.hselasky@c2i.net> Subject: New USB stack - update X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2007 06:53:38 -0000 Hi, I've just committed a bunch of improvements to my new USB stack. The changes will be committed to P4 later today. They are currently only available through my SVN repo. Could the ones that reported problems with memory sticks and my new stack, try again? And there was also someone that was not able to load the firmware on the printer. List of changes between revision 512 and 513: 1) Added a completely new FULL speed over HIGH speed USB HUB bandwidth allocator. See the "usbd_fs_isoc_xxx()" functions in usb_subr.c. Finally it should be possible to connect several FULL speed isochronous devices to a HIGH speed USB HUB at the same time, without problems. NOTE: The sum of the isochronous bandwidth must not exceed 6.0Mbit/s per HS USB HUB! This is because I have make a simple hack and reserved 3.0 Mbit/s for interrupt endpoints so that the scheduling becomes extremely fast. 2) Fixed a data-toggle error in the EHCI driver. Now the hardware/DMA data toggle value is used as reference for the next transfer. 3) Fixed a possible control transfer problem when using the Linux emulation layer with the UHCI driver. Part of this fix is to always use a fixup buffer independent of transfer type. This way it will also be easier to make virtual kernel mappings from the allocated memory pages. 4) Instead of comparing memory pointers with "less than", compute the end-pointer and use the "not equal to" comparison instead. This is safer and faster. 5) Removed interrupt counting in the interrupt handlers. 6) ISOCHRONOUS transfers will always have a timeout. If the driver does not specify a timeout, 250ms will be used. 7) Make sure that LOW speed devices cannot specify FULL speed ISOCHRONOUS transfers. The check is done in the host controller "pipe_init" callbacks. 8) EHCI-driver: Lower EHCI NAK-reload count to 1 for non-HIGH-speed devices. 9) New mechanism: If the "pipe_init" callback wants to say that it does not support a certain transfer type, it can do so by not setting "pipe->methods". 10) Added maximum string length arguments to "usbd_devinfo_vp()" and "usbd_printBCD()", instead of depending on some old assumptions. 11) Replaced the remaining "strcpy()" with "strlcpy()". This does not fix anything. 12) "usbd_page_fit_obj()" does no longer clobber the "page->length" variable, which turned out to not be a good idea. 13) Some optimizations and nits. --HPS http://www.turbocat.net/~hselasky/usb4bsd