我最近购买了 PCI Express x1 USB 3.0 控制卡(包含 NEC USB 3.0 控制器),目的是将 USB 3.0 外置硬盘与 Linux 机器一起使用。我将卡安装在主板上的一个空 PCIe 插槽中,将卡连接到电源线,在其中一个新端口和我的外置硬盘之间拉了一根 USB 3.0 电缆,然后将硬盘连接到墙上插座以供电。启动系统后,硬盘 100% 正常工作,但吞吐量除外:它似乎没有使用 SuperSpeed 4.8 Gbps 连接,而是回落到高速 480 Mbps USB 2.0 式吞吐量。磁盘实用程序将其显示为 480 Mbps 设备,运行几个磁盘实用程序和 dd 基准测试证实,尽管硬盘是 SSD,但其速度远超 40 MB/s(USB 2.0 的近似极限),但它无法超过约 40 MB/s(USB 2.0 的近似极限)。
当我连接 USB 3.0 HDD 时,dmesg
显示以下内容:
[ 3923.280018] usb 3-2: new high speed USB device using ehci_hcd and address 6
我希望在哪里找到这个:
[ 3923.280018] usb 3-2: new SuperSpeed USB device using xhci_hcd and address 6
当时我的系统运行的是内核 2.6.35-25-generic。然后,我偶然发现此论坛主题有人发现,2.6.37-rc5 之前的内核中存在的一个错误可能是此类问题的罪魁祸首。因此,我安装了 2.6.37-generic 主线 Ubuntu 内核,以确定问题是否会消失。但问题并未解决,因此我尝试了 2.6.38-rc3-generic,甚至从 2010.02.01 开始尝试了 2.6.38 nightly,但都无济于事。
简而言之,我想确定为什么在内核支持 USB 3.0 的情况下,我的 USB 3.0 驱动器无法以全 SuperSpeed 吞吐量运行。
有关更多详细信息,请参阅此问题下的评论。
可能与问题相关的输出(从 2.6.38-rc3 启动时):
相关内容来自dmesg
:
[ 19.589491] xhci_hcd 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 19.589512] xhci_hcd 0000:03:00.0: setting latency timer to 64
[ 19.589516] xhci_hcd 0000:03:00.0: xHCI Host Controller
[ 19.589623] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 12
[ 19.650492] xhci_hcd 0000:03:00.0: irq 17, io mem 0xf8100000
[ 19.650556] xhci_hcd 0000:03:00.0: irq 47 for MSI/MSI-X
[ 19.650560] xhci_hcd 0000:03:00.0: irq 48 for MSI/MSI-X
[ 19.650563] xhci_hcd 0000:03:00.0: irq 49 for MSI/MSI-X
[ 19.653946] xHCI xhci_add_endpoint called for root hub
[ 19.653948] xHCI xhci_check_bandwidth called for root hub
相关章节sudo lspci -v
:
03:00.0 USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03) (prog-if 30)
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at f8100000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [50] Power Management version 3
Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [90] MSI-X: Enable+ Count=8 Masked-
Capabilities: [a0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Device Serial Number ff-ff-ff-ff-ff-ff-ff-ff
Capabilities: [150] #18
Kernel driver in use: xhci_hcd
Kernel modules: xhci-hcd
相关章节sudo lsusb -v
:
Bus 012 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 3
bMaxPacketSize0 9
idVendor 0x1d6b Linux Foundation
idProduct 0x0003 3.0 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.38-020638rc3-generic xhci_hcd
iProduct 2 xHCI Host Controller
iSerial 1 0000:03:00.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x0009
Per-port power switching
Per-port overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
完整、不详细的lsusb
:
Bus 012 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 011 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 003: ID 04d9:0702 Holtek Semiconductor, Inc.
Bus 009 Device 002: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 006: ID 174c:5106 ASMedia Technology Inc.
Bus 003 Device 004: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)
Bus 003 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 006: ID 1687:0163 Kingmax Digital Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 046d:081b Logitech, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
完整输出:
答案1
您确定磁盘已插入正确的 (USB 3.0) 端口吗?您的 USB 3.0 控制器似乎正在提供 USB 总线 #12,但磁盘已连接到 USB 总线 #3。
根据您的 dmesg,USB 总线 #3 由 PCI 设备“06:01.2: USB 控制器: VIA Technologies, Inc. USB 2.0 (rev 65)”提供,该设备仅为 USB 2.0。