USB是Universal Serial Bus,是一個讓電腦跟週邊設備 (包括usb storage,HID, 數位相機等)。版本區分為1.1,2.0,以及最新的3.0。其頻寬從1.5MB/s, 60MB/s,提升到625MB/s。新版皆向前相容。另一特色就是hotplug。

架構上是由host controller和hubs組成,其中最上層的稱為root hub,支援到127個devices,包括串接的hub。host controller是介於os和usb device之間的一層hardware interface。目前有三種interfaces (register level): OHCI (open, by compaq, 1.1),UHCI (universal, by intel,1,1),EHCI (Enhanced, by intel,2.0)。

hardware vendor也提供一層HCD (Host Controller Device) interface讓system software跟device互動

USB 2.0 support

用lspci查詢,可看出目前支援UHCI和EHCI。

usb20support

 

Kernel message

插入usb device後,看看kernel顯示什麼訊息:

usb 2-3: new high speed USB device using ehci_hcd and address 35  ==>usb 2.0的device,其address是35
usb 2-3: configuration #1 chosen from 1 choice
scsi15 : SCSI emulation for USB Mass Storage devices  ==> SCSI emulation
usb-storage: device found at 35
usb-storage: waiting for device to settle before scanning
scsi 16:0:0:0: Direct-Access              USB FLASH DRIVE  PMAP PQ: 0 ANSI: 0 CCS  ==>device information
sd 16:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete 
sd 16:0:0:0: [sdb] 15646720 512-byte logical blocks: (8.01 GB/7.46 GiB)
sd 16:0:0:0: [sdb] Write Protect is off
sd 16:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 16:0:0:0: [sdb] Assuming drive cache: write through
sd 16:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 16:0:0:0: [sdb] Assuming drive cache: write through
sd 16:0:0:0: [sdb] Attached SCSI removable disk ==>hotplug完成,device node為/dev/sdb1

Reference

Gentoo Linux USB Guide

arrow
arrow
    全站熱搜

    kezeodsnx 發表在 痞客邦 留言(5) 人氣()