Communication between USB and PCI

I am a little confused in the following example in the Linux device driver book. http://www.linuxdriver.co.il/ldd3/

13.2. USB and Sysfs To understand what this long path of the device means, we describe how the kernel marks USB devices. The first USB device is a root hub. This is a USB controller typically found in a PCI device. the controller is named so because it controls the entire connected USB bus to it. The controller is the bridge between the PCI bus and the USB bus, as well as the first USB device on this bus.

In particular, the statement "The controller is a bridge between the PCI bus and the USB bus"

This is true? I get the impression that PCI and USB are both different buses. Please clarify.

+6
linux-kernel hardware
source share
4 answers

The “controller” mentioned above is part of the hardware. It contains functions for the “bridge” of communication between the USB interface and the PCI interface.

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

The reasons for using the host through the PCI bus are probably reduced to 2:

  • 1 interface is better than two (cost and complexity)
  • USB is much slower than PCI (of course, PCI-Express): just simply “encapsulate” the USB protocol packets on PCI to switch between them on the motherboard.

Note : there is often confusion when it comes to naming hardware chips. For effective (read $$) reasons, quite often there are chips in which there are several . It’s not that the main function of the chip is the “PCI bridge”, which should be limited to the implementation of the “PCI bridge”.

+5
source share

They are really different buses, so you need a bridge between them, so the processor can communicate with things on the USB bus through PCI through the bridge.

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

The USB controller transmits both USB and PCI. USB does not directly talk to the CPU, but rather via the PCI bus.

+2
source share

Two very simple flowcharts:

User Space → Kernel → PCI → USB Controller → USB Device

USB device → USB controller → PCI → Kernel → user space

Or better put:

User Space → Core → [CARD_ARCHITECTURE] → USB Controller → USB Device

USB device → USB controller → [CARD_ARCHITECTURE] → Kernel → Userpace

... as you can see, PCI is pretty random. Are you writing a device driver?

+2
source share

All Articles