Re: USB device just moves



Eric <Scorpus@xxxxxxxxxxxxxx> writes:

[...]

USB is a really terrible architecture, lowers performance of the computer in
general, and hopefully someday it will be replaced with something interrupt
driven.

USB is basically a polled LAN-technology where the host passes a token
to each device one after another, and the device currently owning the
token may then send or receive data over the USB. While this is the
typical brain damage hardware people come up with and nobody is using
these approach on actual LANs anymore, the implementation is not as
bad as you believe it to be. The polling-nonsense is completely
implemented in hardware (that's what the host controller does) and the
interface to system software is an 'ordinary', shared-interrupt driven
one.

[...]

USB must be polled at regular intervals, if a so called interrupt packet is
received (after it was polled for) then an SMI handler is invoked, and while
that handler is running **ALL** other code execution stops dead!
This can happen many times a second depending on whats connected and the system
design. The usb keyboard is the worst offender with a transaction going something like
this:

pc formats and sends packet to keyboard -> do you have a key for me?

[...]

-- repeated 50 - 100 times a second --

A so-called 'USB interrupt endpoint' is supposed to be polled by the
host controller at a certain frequency. The USB-keyboard I am using
specifies 10ms, meaning, it is polled every tenth USB frame interval
(1ms), 100 times per second in total, BUT (as I wrote above), this is
done by the host controller independently of what the other parts of
the PC are doing. Assuming the host controller receives a reply
instead of a NAK-handshake, it causes an interrupt to the hcd (host
controller driver), which will then call the completion handler of the
URB (USB request block) the keyboard driver had submitted for its
particular endpoint. The (USB) keyboard driver then extracts
information about key presses from the data payload of the URB and
forwards it to the appropiate kernel subsystem (this is heavily
simplified, but generally correct).
.



Relevant Pages

  • Re: What do i need to activate my USB host
    ... > There are bluetooth driver in my dev. ... But since no usb host ... You should determine what kind of host controller your PXA250 platform ...
    (microsoft.public.windowsce.platbuilder)
  • ieee1394 and fbdev oops in 2.6.3rc2
    ... Found UniNorth PCI host bridge at 0xf0000000. ... Firmware bus number: 0->0 ... PMU driver 2 initialized for Core99, ... ohci_hcd 0001:02:08.0: new USB bus registered, ...
    (Linux-Kernel)
  • [patch 26/29] USB: add S3C24XX USB Host driver support
    ... USB Host driver for S3C2410/S3C2440 based systems ... * OHCI HCD (Host Controller Driver) for USB. ...
    (Linux-Kernel)
  • Re: USB Bulk transfers, General questions
    ... I am implementing bulk transfer on the 1161 USB chip. ... I have a few questions about the concept of USB bulk transfer. ... Interrupt Transfer Packet Size Constraints ... bulk transfer - it simplifies stuff on both your device and in your host ...
    (comp.arch.embedded)
  • Re: External drives not installing or working properly on USB
    ... thanks for clarifying the setup of the USB host controllers. ... As you have 5 host ports, ... operating system to recognise the four additional 'drives'. ...
    (microsoft.public.windowsxp.general)