Usb2 patch



Keywords: usb2 patch
Description: A new bandwidth scheduler for EHCI (USB 2.0) controllers. This patch addresses 'cannot submit datapipe: error -28' (out of bandwidth), at least some number of 'error -71' (protocol error) and

A new bandwidth scheduler for EHCI (USB 2.0) controllers. This patch addresses 'cannot submit datapipe: error -28' (out of bandwidth), at least some number of 'error -71' (protocol error) and various performance/correctness problems with EHCI USB 2.0 controllers, USB 2.0 hubs when plugged into an EHCI controller, and USB 1.1 devices plugged into USB 2.0 hubs.

  • Improved use of periodic bandwidth for low, full and high speed transfers
  • FSTN and sITD frame spanning support
  • Lower worst-case per-submission CPU usage; all scheduling decisions are made up-front when an endpoint is started
  • Reliable underrun detection (present but broken in old scheduler)
  • Delayed periodic schedule shutdown; reduces the liklihood and severity of underruns
  • Guaranteed bandwidth to isochronous streams once stream is started; spurious ENOSPC no longer possible.
  • Strict overlapped transaction ordering
This is a different patch than the "improved transaction translator support" patch offered in the 2.6.18 kernel. These two schedulers are mutually exclusive; the 2.6.18 version of my patch removes the mainline 'improvements' because it eliminates all the old mainline scheduler code. Just so you know.

Please report bugs to xiphmont@gmail.com. This patch adds a runtime module option ['modprobe ehci-sched sched_verbose=1'] which dumps a ton of debugging information to the syslog (use this only for debugging; do not use it on a production machine as it will cause isoch loss of sync conditions). If possible, send a copy of this log along with a bug report.

This is bleeding edge code that has not yet been reviewed in detail by the kernel team and has not yet seen wide testing. Although it addresses several performance and capability problems in the EHCI driver, it is a large, complex patch that is certainly full of new bugs that haven't been found yet. Do not trust this code in unsupervised production as yet. Keep it away from pets and children.

This code also fixes overrun/underrun detection, which existed in the old scheduler but was non-functional due to bugs. Unfortunately, this triggers a preexisting bug in the USB audio driver. Applications such as sox, xmms, and 'play' (a script that actually calls sox) will often abort immediately with 'error -45'.

Back in the day, I used two eMagic eight-channel capture/playback devices on a PowerBook running Linux to make field recordings. One nice thing about old PowerBooks was that although they only had USB 1.1 ports, each was on an fully independent controller. So, even though each eMagic box required the full bandwidth of a single USB 1.1 bus, I could use two on the same machine because the PowerBook had two full controllers.

After five years, I retired the PowerBook and replaced it with a ThinkPad with two USB 2.0 ports. I didn't think this would be a problem-- after all, USB 2.0 supports 480Mbps while USB 1.1 only supported 12Mbps; using two eMagic boxes on the ThinkPad, I thought, would not be a problem. Wrong, wrong, wrong.

USB 2.0 allows use of USB 1.0 (low speed) and USB 1.1 (full speed) devices as part of a USB 2.0 (high speed) system in two ways:

  1. A USB 2.0 host controller is paired with a USB 1.1 compliant 'companion controller'; when plugging a FS (full speed) or LS (low speed) device directly into a USB 2.0 controller it hands them off to the companion. In this case, the device is actually driven by a UHCI or OHCI controller, even though it's plugged into a 'USB 2.0' port.
  2. FS/LS devices may also be plugged into a USB 2.0 hub; this situation uses what is called a 'Transaction Translator' (TT) in the hub to translate USB 2.0 transactions into USB 1.1 transactions on that port. This is where most of the complication occurs; USB passes the responsibility for budgeting and driving the translation machinery on the USB 2.0 controller, and EHCI USB controllers pass the responsibility on the software driver.
When I plug an eMagic device directly into the ThinkPad, it is assigned to the USB 1.1 companion controller. The ThinkPad has two USB 2.0 ports but only one companion controller shared between them, so I could only use one eMagic device at a time.

So what about a hub? USB 2.0 hubs come in two flavors; single-TT and multi-TT. Most hubs are single-TT, which means one translator is shared between all the ports; the 12Mbps of full-speed bandwidth is shared between all devices plugged into it. Multi-TT hubs (such as the Belkin TetraHub model F5U231, which is highly recommended) have a seperate TT for each port which means you can have 480Mbps to/from the hub, as well as full 12Mbps to/from each USB 1.1 device plugged into it. Perfect! Now, I thought, I can have *four* of these wonderful little sampling boxes running on one USB 2.0 bus! Unfortunately, I was wrong again.

Because EHCI is rather overcomplicated, writing a good scheduler is no simple task. Even though EHCI support in Linux is now several years old, the scheduler [as of Linux 2.6.17] is still mostly a placeholder waiting to be filled in. It is incapable of using either 2.0 or 1.1 bandwidth effectively although you notice it more with 1.1 devices because they're generally pushing bandwidth limits harder. It was enough for keyboards, mice and 'bulk' devices, and if you were lucky, it could barely handle some simple stereo audio devices.

Most of the problems in the EHCI scheduler up until now have to do with managing the Transaction Translator mechanism; This is why, for example, multichannel USB audio devices (which are usually USB 1.1 devices) work when plugged directly into a computer but not when plugged into a USB 2.0 hub. When you plug a device into an EHCI controller and get a an 'error -28' when trying to use it, the EHCI scheduler is what's at fault.

The new ehci bandwidth scheduler (above) now correctly reports schedule sync errors to the USB audio driver; unfortunately, this trips a previously hidden bug in USB audio playback setup. Usbaudio pushes out a packet of silence during device preparation before real audio begins to flow. If there is a long delay between playback hardware preparation and actual playback, usbaudio will see a harmless loss of sync error (which couldn't happen before as the loss of sync detection was broken), causing usbaudio to abort playback just as it's starting. This bug is the source of 'error -45: unknown'.

The patch corrects the handling of -EL2NSYNC during playback startup. You definitely want this patch if you're using the ehci-scheduler patch above.






Photogallery Usb2 patch:


All Copper Full cover mini USB2.0 socket female mini usb 5pin ...


All Copper Full cover mini USB2.0 socket female mini usb 5pin ...


All Copper Full cover mini USB2.0 socket female mini usb 5pin ...


All Copper Full cover mini USB2.0 socket female mini usb 5pin ...


XIMEA - USB 2.0 Patch Cable 1m


Imapi sys driver | bloodmine.eu | Reviews Source


Promocin de Cable De Parche - Compra Cable De Parche ...


Hot Products (U) Page(61): Popular keywords for searching ...


1m 10m 10 Ft Soft Usb 2.0 Am/bm Printer Cable For Pc Sp300 Am/bm ...


faceplate RJ11 wall outlet 45*22.5mm french cat3 toolless keystone ...


20 Cm 50 Cm Short Jumper Wire Lan Cable Patch Cord Cable Rj45 ...


Excel Parche - Compra lotes baratos de Excel Parche de China ...


Free shipping Unitek USB2.0 A male convert Mini 5pin patch cord ...


Driver for at fireball ide 15gb - free for Windows femu.606h.net


USB 2.0 High Speed (480Mbps)


Driver for at fireball ide 15gb - free for Windows femu.606h.net


Fifa manager 14 patch - free for Windows onejikugaj.ye.vc


Excel Parche - Compra lotes baratos de Excel Parche de China ...


20 Cm 50 Cm Short Jumper Wire Lan Cable Patch Cord Cable Rj45 ...


faceplate RJ11 wall outlet 45*22.5mm french cat3 toolless keystone ...