VMware CentOS/Ubuntu 虚拟机识别USB3.0接口硬盘/U盘/TF卡

背景

    最近在测试TF卡,有时需要插入电脑VMware虚拟机Linux系统中进行dd命令的测试与查看,但插入USB3.0读卡器后提示错误:usb 1-1: can't set config #1, error -32,下面来做实验并探明原因。

实验

    4GB卡插USB3.0读卡器到USB3.0口:不能识别

[333359.697303] usb 1-1: new high-speed USB device number 2 using ehci-pci
[333359.965561] usb 1-1: New USB device found, idVendor=05e3, idProduct=0743
[333359.965565] usb 1-1: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[333359.965567] usb 1-1: Product: USB Storage
[333359.965601] usb 1-1: Manufacturer: Generic
[333359.965603] usb 1-1: SerialNumber: 000000000819
[333360.148494] usb 1-1: can't set config #1, error -32

[333455.883824] usb 1-1: USB disconnect, device number 2

    4GB卡插USB3.0读卡器到USB2.0口:不能识别

 4GB卡插USB3.0读卡器到USB2.0口:
[333902.337594] usb 1-1: new high-speed USB device number 4 using ehci-pci
[333902.590521] usb 1-1: New USB device found, idVendor=05e3, idProduct=0743
[333902.590525] usb 1-1: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[333902.590527] usb 1-1: Product: USB Storage
[333902.590529] usb 1-1: Manufacturer: Generic
[333902.590530] usb 1-1: SerialNumber: 000000000819
[333902.659265] usb 1-1: can't set config #1, error -32

[333963.930173] usb 1-1: USB disconnect, device number 4

     4GB卡插USB2.0读卡器到USB2.0口:成功识别

[333496.714505] usb 1-1: new high-speed USB device number 3 using ehci-pci
[333497.052042] usb 1-1: New USB device found, idVendor=1908, idProduct=0226
[333497.052087] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[333497.444186] usb-storage 1-1:1.0: USB Mass Storage device detected
[333497.445933] scsi host3: usb-storage 1-1:1.0
[333497.470255] usbcore: registered new interface driver usb-storage
[333497.484528] usbcore: registered new interface driver uas
[333498.497310] scsi 3:0:0:0: Direct-Access     Generic  Mass-Storage     1.11 PQ: 0 ANSI: 2
[333498.520320] sd 3:0:0:0: Attached scsi generic sg2 type 0
[333499.289409] sd 3:0:0:0: [sdb] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
[333499.299542] sd 3:0:0:0: [sdb] Write Protect is off
[333499.299546] sd 3:0:0:0: [sdb] Mode Sense: 03 00 00 00
[333499.308152] sd 3:0:0:0: [sdb] No Caching mode page found
[333499.318078] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[333499.373321]  sdb: sdb1
[333499.406621] sd 3:0:0:0: [sdb] Attached SCSI removable disk

[333843.240644] usb 1-1: USB disconnect, device number 3

    说明USB2.0接口只能识别2.0接口设备,且3.0接口不起作用;

支持USB3.0

    修改虚拟机设置,USB兼容性2.0改为3.0,点击确定使其生效:

    VMware CentOS/Ubuntu 虚拟机识别USB3.0接口硬盘/U盘/TF卡_第1张图片  

    VMware CentOS/Ubuntu 虚拟机识别USB3.0接口硬盘/U盘/TF卡_第2张图片 

    USB兼容性3.0生效打印:

[333996.694723] pciehp 0000:00:15.0:pcie04: Button pressed on Slot(160)
[333996.694785] pciehp 0000:00:15.0:pcie04: Card present on Slot(160)
[333996.694797] pciehp 0000:00:15.0:pcie04: slot(160): Link Up event
[333996.697434] pciehp 0000:00:15.0:pcie04: PCI slot #160 - powering on due to button press
[333996.697469] pciehp 0000:00:15.0:pcie04: Link Up event ignored on slot(160): already powering on
[333996.798826] pci 0000:03:00.0: [15ad:0779] type 00 class 0x0c0330
[333996.799105] pci 0000:03:00.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
[333996.800552] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
[333996.801523] pci 0000:03:00.0: System wakeup disabled by ACPI
[333996.802060] pci 0000:03:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[333996.802470] pci 0000:03:00.0: BAR 0: assigned [mem 0xfd400000-0xfd41ffff 64bit]
[333996.802560] pcieport 0000:00:15.0: PCI bridge to [bus 03]
[333996.802597] pcieport 0000:00:15.0:   bridge window [io  0x4000-0x4fff]
[333996.802636] pcieport 0000:00:15.0:   bridge window [mem 0xfd400000-0xfd4fffff]
[333996.802663] pcieport 0000:00:15.0:   bridge window [mem 0xe7a00000-0xe7afffff 64bit pref]
[333996.802807] pci 0000:03:00.0: enabling device (0000 -> 0002)
[333996.806409] xhci_hcd 0000:03:00.0: xHCI Host Controller
[333996.807308] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 3
[333996.808026] xhci_hcd 0000:03:00.0: hcc params 0x0388f081 hci version 0x100 quirks 0x00000010
[333996.808052] xhci_hcd 0000:03:00.0: cache line size of 64 is not supported
[333996.808373] xhci_hcd 0000:03:00.0: irq 58 for MSI/MSI-X
[333996.808436] xhci_hcd 0000:03:00.0: irq 59 for MSI/MSI-X
[333996.808603] xhci_hcd 0000:03:00.0: irq 60 for MSI/MSI-X
[333996.808631] xhci_hcd 0000:03:00.0: irq 61 for MSI/MSI-X
[333996.808667] xhci_hcd 0000:03:00.0: irq 62 for MSI/MSI-X
[333996.809642] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[333996.809646] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[333996.809648] usb usb3: Product: xHCI Host Controller
[333996.809649] usb usb3: Manufacturer: Linux 3.10.0-514.2.2.el7.x86_64 xhci-hcd
[333996.809650] usb usb3: SerialNumber: 0000:03:00.0
[333996.810180] hub 3-0:1.0: USB hub found
[333996.810235] hub 3-0:1.0: 4 ports detected
[333996.810625] xhci_hcd 0000:03:00.0: xHCI Host Controller
[333996.810694] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 4
[333996.810757] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[333996.810789] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
[333996.810790] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[333996.810792] usb usb4: Product: xHCI Host Controller
[333996.810793] usb usb4: Manufacturer: Linux 3.10.0-514.2.2.el7.x86_64 xhci-hcd
[333996.810794] usb usb4: SerialNumber: 0000:03:00.0
[333996.810936] hub 4-0:1.0: USB hub found
[333996.810973] hub 4-0:1.0: 4 ports detected

    4GB卡插USB3.0读卡器到USB3.0口:成功识别

[334159.715015] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd
[334159.737057] usb 4-1: New USB device found, idVendor=05e3, idProduct=0743
[334159.737063] usb 4-1: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[334159.737124] usb 4-1: Product: USB Storage
[334159.737167] usb 4-1: Manufacturer: Generic
[334159.737169] usb 4-1: SerialNumber: 000000000819
[334159.744759] usb-storage 4-1:1.0: USB Mass Storage device detected
[334159.746249] scsi host4: usb-storage 4-1:1.0
[334160.746490] scsi 4:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0819 PQ: 0 ANSI: 6
[334160.748396] sd 4:0:0:0: Attached scsi generic sg2 type 0
[334161.024732] sd 4:0:0:0: [sdb] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
[334161.026615] sd 4:0:0:0: [sdb] Write Protect is off
[334161.026622] sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
[334161.028651] sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[334161.043890]  sdb: sdb1
[334161.050912] sd 4:0:0:0: [sdb] Attached SCSI removable disk

    128GB卡插USB3.0读卡器到USB3.0口:成功识别

[334325.374730] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd
[334325.393594] usb 4-1: New USB device found, idVendor=05e3, idProduct=0743
[334325.393600] usb 4-1: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[334325.393604] usb 4-1: Product: USB Storage
[334325.393607] usb 4-1: Manufacturer: Generic
[334325.393609] usb 4-1: SerialNumber: 000000000819
[334325.400270] usb-storage 4-1:1.0: USB Mass Storage device detected
[334325.401149] scsi host5: usb-storage 4-1:1.0
[334326.406752] scsi 5:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0819 PQ: 0 ANSI: 6
[334326.407791] sd 5:0:0:0: Attached scsi generic sg2 type 0
[334326.760295] sd 5:0:0:0: [sdb] 245415936 512-byte logical blocks: (125 GB/117 GiB)
[334326.762386] sd 5:0:0:0: [sdb] Write Protect is off
[334326.762393] sd 5:0:0:0: [sdb] Mode Sense: 23 00 00 00
[334326.764815] sd 5:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[334326.782308] sd 5:0:0:0: [sdb] Attached SCSI removable disk

 

你可能感兴趣的:(Linux)