Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 585
kumar Avatar asked Nov 12 '09 16:11

kumar


2 Answers

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
like image 114
Wim Avatar answered Oct 06 '22 13:10

Wim


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".

like image 45
jldupont Avatar answered Oct 06 '22 14:10

jldupont