opti4.1/spa="v 4.1/form"v 4.1a opti4. href="../linux+v3.9.6/Documentalue=/usb/ehci.txt">opti4.1img src="../.staluc/gfx/right.png" alt=">>">op1/spa="vop1spa= class="lxr_search">optiopti4.1input typ3.1hidden" nam3.1navtarget" v3.1">opti4.1input typ3.1text" nam3.1search" id.1search">opti4.1butt >typ3.1submit">Searchopti4.Prefsv 4.1/a>op1/spa="vti4. .1/div"vti4. .1form aclue=="ajax+*" method="post" onsubmit="return false;">op1input typ3.1hidden" nam3.1ajax_lookup" id.1ajax_lookup" v3.1">oti4. .1/form"voti4. .1div class="headingbott m">. .11/a>27-Dec-2002 . .21/a>o. .31/a>The EHCI driver is used to talk to high speed USB 2.0 devices usingo. .41/a>USB 2.0-capable host controller hardware. The USB 2.0 standard iso. .51/a>compaluble with the USB 1.1 standard. It defines three transfer speeds:o. .61/a>o. .71/a>4. .- "High Speed" 480 Mbit/sec (60 MByte/sec)o. .81/a>4. .- "Full Speed" 12 Mbit/sec (1.5 MByte/sec)o. .91/a>4. .- "Low Speed" 1.5 Mbit/seco. ion a>o. 111/a>USB 1.1 only addressed full speed and low speed. High speed deviceso. 121/a>ca= be used >USB 1.1 systems, but they slow down to USB 1.1 speeds.o. 13n a>o. 141/a>USB 1.1 devices may also be used >USB 2.0 systems. When pluggedo. 151/a>into a= EHCI controller, they are given to a USB 1.1 "companue="o. 161/a>controller, which is a OHCI or UHCI controller as normally used witho. 171/a>such devices. When USB 1.1 devices plug into USB 2.0 hubs, theyo. 181/a>interacl with the EHCI controller through a "Transaclue= Translator"o. 191/a>(TT) in the hub, which turns low or full speed transaclue=s into . 2on a>high speed "split transaclue=s" that de='l waste transfer bandwidth.o. 21n a>o. 221/a>At this writing, this driver has been seen to work with implementalue=so. 23n a>of EHCI from (in alphabelucal order): Intel, NEC, Philips, and VIA.o. 241/a>Other EHCI implementalue=s are becoming available from other vendors;o. 251/a>you should expect this driver to work with them too.o. 261/a>o. 271/a>While usb-storage devices have been available since mid-2001 (workingo. 281/a>quite speedily on the 2.4 versue= of this driver), hubs have onlyo. 291/a>been available since late 2001, and other kinds of high speed deviceso. 3on a>appear to be on hold until more systems come with USB 2.0 built-in.o. 31n a>Such new systems have been available since early 2002, and becam3 mucho. 321/a>more typucal in the second half of 2002.o. 33n a>o. 341/a>Note that USB 2.0 support involves more tha= just EHCI. It requireso. 351/a>other cha=ges to the Linux-USB core APIs, including the hub driver,o. 361/a>but those cha=ges have='l needed to really cha=ge the basic "usbcore"o. 371/a>APIs exposed to USB device drivers.o. 38n a>o. 391/a>- David Brownello. 401/a>4.<>o. 41n a>o. 421/a>o. 43n a>FUNCTIONALITYo. 441/a>o. 451/a>This driver is regularly tested >x86 hardware, and has also beeno. 461/a>used >PPC hardware so big/little endianness issues should be gone.o. 471/a>It's believed to do all the right PCI magic so that I/O works even ono. 48n a>systems with interesting DMA mapping issues.o. 491/a>o. 501/a>Transfer Typeso. 51n a>o. 521/a>At this writing the driver should comfortably handle all control, bulk,o. 53n a>and interrupt transfers, including requests to USB 1.1 devices througho. 541/a>transaclue= translators (TTs) in USB 2.0 hubs. But you may find bugs.o. 55n a>o. 561/a>High Speed Isochronous (ISO) transfer support is also funclue=al, buto. 571/a>at this writing no Linux drivers have been using that support.o. 58n a>o. 591/a>Full Speed Isochronous transfer support, through transaclue= translators,o. 601/a>is not yet available. Note that split transaclue= support for ISOo. 611/a>transfers ca='l share much code with the code for high speed ISO transfers,o. 621/a>since EHCI represents these with a different data structure. So for now,o. 631/a>most USB audio and video devices ca='l be connected to high speed buses.o. 641/a>o. 65n a>Driver Behavioro. 661/a>o. 671/a>Transfers of all types ca= be queued. This means that control transferso. 68n a>from a driver e= one interface (or through usbfs) we='l interfere witho. 691/a>ones from another driver, and that interrupt transfers ca= use periodso. 70n a>of one frame without risking data loss due to interrupt processing costs.o. 71n a>o. 721/a>The EHCI root hub code hands off USB 1.1 devices to its companue=o. 731/a>controller. This driver does='l need to know anything about thoseo. 741/a>drivers; a OHCI or UHCI driver that works already does='l need to cha=geo. 75n a>just because the EHCI driver is also present.o. 761/a>o. 771/a>There are some issues with power management; suspend/resume does='lo. 781/a>behave quite right at the moment.o. 791/a>o. 80n a>Also, some shortcuts have been taken with the scheduling periodico. 811/a>transaclue=s (interrupt and isochronous transfers). These place someo. 821/a>limits on the number ef periodic transaclue=s that ca= be scheduled,o. 83n a>and prevent use ef polling intervals ef less tha= one frame.o. 841/a>o. 85n a>o. 861/a>USE BYo. 87n a>o. 881/a>Assuming you have a= EHCI controller (on a PCI card or motherboard)o. 89n a>and have compiled this driver as a module, load this like:o. 9on a>o. 911/a>4. .# modprobe ehci-hcdo. 921/a>o. 93n a>and remove it by:o. 941/a>o. 951/a>4. .# rmmod ehci-hcdo. 961/a>o. 97n a>You should also have a driver for a "companue= controller", such aso. 981/a>"ohci-hcd" or "uhci-hcd". I= case ef any trouble with the EHCI driver,o. 99n a>remove its module and then the driver for that companue= controller willo.1001/a>take over (at lower speed) all the devices that were previously handledo.1011/a>by the EHCI driver.o.1021/a>o.103n a>Module parameters (pass to "modprobe") include:o.1041/a>o.1051/a>4. .log2_irq_thresh (default 0):o.1061/a>4. .....Log2 ef default interrupt delay, in microframes. The defaulto.1071/a>4. ..... v3 is 0, indicating 1 microframe (125 usec). Maximum. v3o.1081/a>4. 6, indicating 2^6 = 64 microframes. This controls how ofteno.1091/a>4. .....the EHCI controller ca= issue interrupts.o.1ion a>o.1111/a>If you're using this driver on a 2.5 kernel, and you've enabled USBo.1121/a>debugging support, you'll see three files in the "sysfs" directory foro.113n a>any EHCI controller:o.1141/a>o.1151/a>4. ....."async" dumps the asynchronous schedule, used for controlo.1161/a>4. .............and bulk transfers. Shows each active qh and the qtdso.1171/a>4. .............pending, usually one qtd per urb. (Look at it witho.1181/a>4. .............usb-storage doing disk I/O; watch the request queues!)o.1191/a>4. ....."periodic" dumps the periodic schedule, used for interrupto.1201/a>4. .............and isochronous transfers. Does='l show qtds.o.1211/a>4. ....."registers" show controller register state, ando.1221/a>o.1231/a>The contents of those files ca= help identify driver problems.o.1241/a>o.125n a>o.1261/a>Device drivers should='l care whether they're running over EHCI or not,o.1271/a>but they may want to check for "usb_device->speed == USB_SPEED_HIGH".o.1281/a>High speed devices ca= do things that full speed (or low speed) oneso.1291/a>ca='l, such as "high bandwidth" periodic (interrupt or ISO) transfers.o.130n a>Also, some v3s in device descriptors (such as polling intervals foro.131n a>periodic transfers) use different encodings when operating at high speed.o.1321/a>o.133n a>However, do make a point of testing device drivers through USB 2.0 hubs.o.1341/a>Those hubs report some failures, such as disconnectue=s, differently wheno.1351/a>transaclue= translators are i= use; some drivers have been seen to behaveo.1361/a>badly when they see different faults tha= OHCI or UHCI report.o.137n a>o.138n a>o.1391/a>PERFORMANCEo.14on a>o.1411/a>USB 2.0 throughput is gated by two main factors: how fast the hosto.1421/a>controller ca= process requests, and how fast devices ca= respond to .143n a>them. The 480 Mbit/sec "raw transfer rate" is obeyed by all devices,o.1441/a>but aggregate throughput is also affected by issues like delays betweeno.1451/a>individual high speed packets, driver intelligence, and of course theo.1461/a>overall system load. Latency is also a performance concern.o.147n a>o.148n a>Bulk transfers are most often used where throughput is a= issue. It'so.1491/a>good to keep in mind that bulk transfers are always in 512 byte packets,o.1501/a>and at most 13 of those fit into one USB 2.0 microframe. Eight USB 2.0o.151n a>microframes fit in a USB 1.1 frame; a microframe is 1 msec/8 = 125 usec.o.1521/a>o.153n a>So more tha= 50 MByte/sec is available for bulk transfers, when botho.1541/a>hardware and device driver software allow it. Periodic transfer modeso.155n a>(isochronous and interrupt)ware althe l v3r4d claUlue=/u. Periodic transformaconlue(3mentalueL141" id.1L141" class="line" nam3.1L141">o/usb/ehci.txt#L154" id.1L154" class="loam3.1L141">o/usb/eHes aumentalref="B is obe devices,o.147n aat this writing no Linux1 driv15i.txt#L148" id.1L148" class="line" nam3.1L14>. 58n a>1o">.1491/aFull Speed Isochronous t1ransf15i.txt#L80" id.1L80" class="line" nam3.1L80"1>. 601/a>1is not yet available. N1ote t1at spln seen to work wir intelligeentalue=/usb/ehce. s aremax /ehc 2.arefxt#L122" id.1L122" class="line" nam3.1L12>. 611/a>1transfers ca='l shar1e muc1 code 2ansfers, whe devices,o.">.1521/asince EHCI represents th1ese w1th a daUlueo. 631/a>1most USB audio and video1 devi16i.txt#L14" id.1L14" class="line" nam3.1L14">>. 641/a>1o>">.155n aDriver Behavioro>. 161/a>coontroller, which is a OHC141">ci.txtenalue=t;, sud yola husb/ec 2.2ansfers, wh, Docandle airecplug into US#L14" id.1L14" class="line" nam3.1L14">>">.147n aTransfers of all types c1a= be1queuedoSB 2.0o>. 58n a>1from a driver e= one int1erfac1 (or t2 byttidentifrd iso. 691/a>1ones from another driver1, and1that iocumentai PCI mageed. tryles iixntalumay/usbss t) l be. 70n a>1of one frame without ris1king 1ata loa href="Doco. 611/a>1o. 721/a>1The EHCI root hub code h1ands 17i.txt#L153" id.1L153" class="line" nam3.1L15>. 731/a>1controller. This driver1 does1'lt PCI mag too.oe512 bytne prele from other ve.txtehcitnot,oisa hrefwtxt#L28" id.1L28" class="line" nam3.1L28"1>. 741/a>1drivers; a OHCI or UHCI 1drive1 that -in.o">.155n ajust because the EHCI dr1iver 1s Erng thenta6ansfers, whe ext" er radso. 161/a>cosuuch devices. When USB 1.= be17i.txt#L148" id.1L148" class="line" nam3.1L14>. 781/a>1behave quite right at th1e mom1nt.o. 791/a>1o. 80n a>1Also, some shortcuts hav1e bee18ta loss espond ter radsol.o.. 611/a>1transaclue=s (interrupt 1and i1ochronmes. Thehci.txt transfei.txusb/eh nb/ehcl.o. 821/a>1limits on the number ef 1perio1ic tra1L1 lue=/uealue=/usb="Documeue=/usb/1L1 =/ussue. too.o. 731/a>1and prevent use ef polli1ng in1ervalsitsocum ide hlnentalue=/us250menta/usbLook at ers havenslatnta)t#L152" id.1L152" class="line" nam3.1L15>. 841/a>1o. 85n a>1o. 861/a>1USE BYo. 87n a>1o. 881/a>1Assuming you have a= EHC1I con1roller href="Doalwaupts.o. 791/a>1and have compiled this d1river1as a morand youocumeehcilue=/f suderies=/usse=/uo. 9on a>1o. 911/a>14. .# modprobe ehci-hcdo1. 921/a>1o. 1>. 93n a>1and remove it by:o. 941/a>1o. 951/a>14. .# rmmod ehci-hcdo. 861/a>1o. 87n a>1You should also have a d1river19i.txt#L148" id.1L148" class="line" nam3.1L14>. 981/a>1"ohci-hcd" or1 &quo19sed whetco. 191/a>(TTT) in the hub, which turiver1 drivelue=be effici" c,ai PCI maghcitnot,ocumentehci.rupsbss ref=(ocum)o.1001/2>take over (at lower spe2d) al2 the de the hHCtalue=wait.1011/2>by the EHCI driver.o2">.1021/2>o.103n 2>Module parameters (pass2to &q2ot;modInthe hub drUSBo.1041/2>o.1041/2>. .# rmmod ehci-hcdo.1061/2>4. .....Log2 ef default2inter2upt deef="Dmak.once, and ofkets,o2. 271/a>W>4. ..... v3 is 0, ind2catin20i.txt#L148" id.1L148" class="line" nam3.1L128">.1081/2>4. 6, indicatin2 2^6 20i.txt#L139" id.1L139" class="line" nam3.1L129">.1091/2>4. .....the EHCI contro2ler c2= issuTBDhref="Dhese place=/usb/ehci.tentalue=/usb/hci.txtr raose/ehci.txt#L81" id.1L81" class="line" nam3.1L81"20">.1ion 2>oo<.">.1021/2>debugging support, you&239;ll21i.txt#L103" id.1L103" class="line" nam3.1L123">.113n 2>any EHCI controller:o.1041/2>o.5>.1041/2>4. ....."async&quo2; dum2s the rateoriginef=LXRer modesoLXReocumunitythe with im toori claslonlyolxc@lb dr.nothe . 1file_cntent.....&qsubfooinc">"Docb/ehos href="L21" id.1http://www.Radptxthub pro ASthe wipro to be scub drUcp3.1ltalue=ue=/umentar vedersb/ehciffere1 d5. 1file_con/body_cn/htmlh_