English 中文(简体)
Relation between USB and PCI
原标题:

I m bit confused by the following statement in linux device drivers book. http://www.linuxdriver.co.il/ldd3/

13.2. USB and Sysfs To help understand what this long device path means, we describe how the kernel labels the USB devices. The first USB device is a root hub. This is the USB controller, usually contained in a PCI device. The controller is so named because it controls the whole USB bus connected to it. The controller is a bridge between the PCI bus and the USB bus, as well as being the first USB device on that bus.

Especially the statement "The controller is a bridge between the PCI bus and the USB bus"

Is it so? I m under the impression that PCI and USB are both distinct Buses. Please clarify.

最佳回答

The "Controller" refer to above is a piece of Hardware. It houses functionality to "bridge" communications between a USB interface and a PCI interface.

By "bridging" it is meant that USB protocol packets are transferred to/from the CPU / USB ports but usually through a PCI "bus".

The reasons a hop through a PCI bus is used probably comes down to 2:

  • 1 interface is better than two (cost & complexity wise)
  • USB is much slower speed than PCI (certainly PCI-Express): it is easy just to "encapsulate" USB protocol packets onto PCI for shuttling those around the motherboard.

Note: there is often confusion when it comes to naming hardware chips. For efficient (read $$) reasons, it is quite common to have chips that house multiple functions. It is not because the main function of a chip is "PCI bridge" that it must be limited to perform "PCI bridging".

问题回答

They are indeed distinct busses, which is why you need a bridge between them so the CPU can, over PCI, through the bridge, communicate with stuff on the USB bus.

CPU ---(front-side bus)----  PCI controller ----(PCI-bus)-+--   USB controller ----(USB-bus)--+-- USB mouse
                                                          |                                   +--- USB printer
                                                          +--   SATA controller

Two very simple flow diagrams:

Userspace -> Kernel -> PCI -> USB Controller -> USB Device

USB Device -> USB Controller -> PCI -> Kernel -> Userspace

Or, better put:

Userspace -> Kernel -> [CARD_ARCHITECTURE] -> USB Controller -> USB Device

USB Device -> USB Controller -> [CARD_ARCHITECTURE] -> Kernel -> Userspace

... as you see, PCI is rather incidental. Are you writing a device driver?

The USB controller communicates both USB and PCI. USB does not directly talk to the CPU, but rather across the PCI bus first.





相关问题
Configuration of Java Developer s Notebook

For Java Platform, i use Eclipse Galileo IDE, Jboss Tools plugin, SpringSource IDE, MyEclipse IDE, Tomcat as Service, Mysql as Service, Oracle Sql Developer Client, Netbeans, Aptana Studio, also ...

deviceID format for PS/2 mouse

I would like to know the DeviceID and PNPDeviceID format for PS/2 Mouse. On my system Device ID for PS/2 mouse is ACPIPNP0F134&1F1D307&0. So is the format is ACPIPNPxxxx{something} or some ...

Java Hardware Interrupt Handling

I would like to know if it is possible to automatically invoke a Java method when a hardware interrupt is raised.

Determine VRAM size on windows

I need to determine roughly how much VRAM a system s graphics card has. I know all the reasons why I shouldn t but I do. It doesn t need to be perfect (some cards lie etc.) but I need a ballpark. On ...

Relation between USB and PCI

I m bit confused by the following statement in linux device drivers book. http://www.linuxdriver.co.il/ldd3/ 13.2. USB and Sysfs To help understand what this long device path means, we describe ...

Do bitwise operations distribute over addition?

I m looking at an algorithm I m trying to optimize, and it s basically a lot of bit twiddling, followed by some additions in a tight feedback. If I could use carry-save addition for the adders, it ...

热门标签