公司一台Linux设备的U口突然出现故障,原来共16路USB端口都是正常的,出问题后只有7个正常,其余均不能使用。而且每次可用与不可用的数量不变,总是7个可用、9个不可用,但是具体的口并不固定,比如这一次键盘插入的U口不可用,重启后可能这个端口就好了,键盘可用了,但其它上一次好的端口本次又不行了。
通过dmesg或者/var/log/kern.log中的log进行截取日志,发现有以下错误:
……
[ 4.697293] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.703480] ehci-pci: EHCI PCI platform driver
[ 4.709968] ehci-pci 0000:00:1d.0: EHCI Host Controller
[ 4.716126] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 1
[ 4.728542] ehci-pci 0000:00:1d.0: debug port 2
[ 4.738761] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[ 4.738786] ehci-pci 0000:00:1d.0: irq 23, io mem 0xd0815000
[ 4.760163] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[ 4.766557] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.772823] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.785135] usb usb1: Product: EHCI Host Controller
[ 4.791382] usb usb1: Manufacturer: Linux 4.15.0-45-generic ehci_hcd
[ 4.797451] usb usb1: SerialNumber: 0000:00:1d.0
[ 4.803740] hub 1-0:1.0: USB hub found
[ 4.809460] hub 1-0:1.0: 8 ports detected
[ 4.815378] ehci-platform: EHCI generic platform driver
[ 4.820638] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 4.825716] ohci-pci: OHCI PCI platform driver
[ 4.830649] ohci-platform: OHCI generic platform driver
[ 4.835392] uhci_hcd: USB Universal Host Controller Interface driver
[ 4.840231] xhci_hcd 0000:00:14.0: xHCI Host Controller
[ 4.844621] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[ 4.854092] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0000000000009810
[ 4.862768] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[ 4.862990] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.867469] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.876393] usb usb2: Product: xHCI Host Controller
[ 4.880986] usb usb2: Manufacturer: Linux 4.15.0-45-generic xhci-hcd
[ 4.885545] usb usb2: SerialNumber: 0000:00:14.0
[ 4.890595] hub 2-0:1.0: USB hub found
[ 4.895188] hub 2-0:1.0: 6 ports detected
[ 4.900587] xhci_hcd 0000:00:14.0: xHCI Host Controller
[ 4.904917] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
[ 4.913713] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed
[ 4.918423] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.923098] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.932061] usb usb3: Product: xHCI Host Controller
[ 4.936656] usb usb3: Manufacturer: Linux 4.15.0-45-generic xhci-hcd
[ 4.941238] usb usb3: SerialNumber: 0000:00:14.0
[ 4.946271] hub 3-0:1.0: USB hub found
[ 4.950975] hub 3-0:1.0: 1 port detected
[ 4.955991] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[ 4.965929] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 4.970715] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 4.975881] mousedev: PS/2 mouse device common for all mice
[ 4.981913] rtc_cmos 00:00: RTC can wake from S4
[ 4.986865] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
[ 4.991418] rtc_cmos 00:00: alarms up to one month, y3k, 242 bytes nvram
[ 4.995859] i2c /dev entries driver
[ 5.000255] pcie_mp2_amd: AMD(R) PCI-E MP2 Communication Driver Version: 1.0
[ 5.004859] device-mapper: uevent: version 1.0.3
[ 5.009772] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
[ 5.018613] intel_pstate: Intel P-state driver initializing
[ 5.024188] ledtrig-cpu: registered to indicate activity on CPUs
[ 5.030837] NET: Registered protocol family 10
[ 5.046329] Segment Routing with IPv6
[ 5.050622] NET: Registered protocol family 17
[ 5.055271] Key type dns_resolver registered
[ 5.060782] RAS: Correctable Errors collector initialized.
[ 5.064949] microcode: sig=0x30679, pf=0x4, revision=0x90a
[ 5.069489] microcode: Microcode Update Driver: v2.2.
[ 5.069509] sched_clock: Marking stable (5069476405, 0)->(5050496504, 18979901)
[ 5.084297] registered taskstats version 1
[ 5.088293] Loading compiled-in X.509 certificates
[ 5.090409] ehci-pci 0000:00:1d.0: port 1 reset error -110
[ 5.102392] Loaded X.509 cert 'Build time autogenerated kernel key: e3b8f44ffaaceef3e3a84cfaebd8e5a9acebeaad'
[ 5.110270] zswap: loaded using pool lzo/zbud
[ 5.123313] Key type big_key registered
[ 5.127102] Key type trusted registered
[ 5.135240] Key type encrypted registered
[ 5.138888] AppArmor: AppArmor sha1 policy hashing enabled
[ 5.142557] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
[ 5.146284] ima: Allocated hash algorithm: sha1
[ 5.150007] evm: HMAC attrs: 0x1
[ 5.154169] Magic number: 2:904:478
[ 5.157755] rtc rtc0: hash matches
[ 5.161610] rtc_cmos 00:00: setting system clock to 2022-04-11 11:27:12 UTC (1649676432)
[ 5.169081] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 5.172743] EDD information not available.
[ 5.193999] Freeing unused kernel memory: 2408K
[ 5.208165] Write protecting the kernel read-only data: 20480k
[ 5.214302] Freeing unused kernel memory: 2008K
[ 5.227270] Freeing unused kernel memory: 1892K
[ 5.236181] usb 2-1: new low-speed USB device number 2 using xhci_hcd
[ 5.246871] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[ 5.250591] x86/mm: Checking user space page tables
[ 5.269923] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[ 5.394343] usb 2-1: New USB device found, idVendor=046d, idProduct=c31c
[ 5.398126] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5.401879] usb 2-1: Product: USB Keyboard
[ 5.405668] usb 2-1: Manufacturer: Logitech
[ 5.420020] hidraw: raw HID events driver (C) Jiri Kosina
[ 5.433853] usbcore: registered new interface driver usbhid
[ 5.437548] usbhid: USB HID core driver
[ 5.448781] input: Logitech USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/0003:046D:C31C.0001/input/input5
[ 5.463864] ahci 0000:00:13.0: version 3.0
[ 5.469046] ahci 0000:00:13.0: controller can't do DEVSLP, turning off
[ 5.483941] ahci 0000:00:13.0: AHCI 0001.0300 32 slots 2 ports 3 Gbps 0x1 impl SATA mode
[ 5.491568] ahci 0000:00:13.0: flags: 64bit ncq pm led clo pio slum part deso
[ 5.500943] scsi host0: ahci
[ 5.509317] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 5.513766] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 5.522253] scsi host1: ahci
[ 5.526578] hid-generic 0003:046D:C31C.0001: input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Keyboard] on usb-0000:00:14.0-1/input0
[ 5.526596] ata1: SATA max UDMA/133 abar m2048@0xd0816000 port 0xd0816100 irq 88
[ 5.526598] ata2: DUMMY
[ 5.527421] r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0x (ptrval), 68:ed:a4:39:70:79, XID 0c900800 IRQ 89
[ 5.527424] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 5.527473] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 5.527482] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 5.528124] r8169 0000:03:00.0 eth1: RTL8168evl/8111evl at 0x (ptrval), 68:ed:a4:39:70:7a, XID 0c900800 IRQ 90
[ 5.528127] r8169 0000:03:00.0 eth1: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 5.543595] usb 2-3: new high-speed USB device number 3 using xhci_hcd
[ 5.605559] input: Logitech USB Keyboard as /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.1/0003:046D:C31C.0002/input/input7
[ 5.647224] [drm] Memory usable by graphics device = 2048M
[ 5.652589] checking generic (a0000 10000) vs hw (c0000000 10000000)
[ 5.652591] fb: switching to inteldrmfb from EFI VGA
[ 5.657879] r8169 0000:02:00.0 enp2s0: renamed from eth0
[ 5.662960] Console: switching to colour dummy device 80x25
[ 5.663203] [drm] Replacing VGA console driver
[ 5.663642] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 5.663649] [drm] Driver supports precise vblank timestamp query.
[ 5.665635] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 5.676152] hid-generic 0003:046D:C31C.0002: input,hidraw1: USB HID v1.10 Device [Logitech USB Keyboard] on usb-0000:00:14.0-1/input1
[ 5.696446] r8169 0000:03:00.0 enp3s0: renamed from eth1
[ 5.709320] usb 2-3: New USB device found, idVendor=05e3, idProduct=0608
[ 5.709332] usb 2-3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 5.709338] usb 2-3: Product: USB2.0 Hub
[ 5.709915] hub 2-3:1.0: USB hub found
[ 5.710235] hub 2-3:1.0: 4 ports detected
[ 5.744152] [drm] failed to retrieve link info, disabling eDP
[ 5.757938] [drm] Initialized i915 1.6.0 20171023 for 0000:00:02.0 on minor 0
[ 5.760117] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 5.760503] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input8
[ 5.821544] i915 0000:00:02.0: HDMI-A-1: EDID is invalid:
[ 5.821557] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 5.821563] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 5.821568] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 5.821573] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 5.821578] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 5.821584] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 5.821589] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 5.821594] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 5.840169] usb 2-4: new high-speed USB device number 4 using xhci_hcd
[ 5.851058] random: fast init done
[ 5.865183] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 5.866161] ata1.00: ATA-9: W30S33-128GMP, RHY22A, max UDMA/133
[ 5.866171] ata1.00: 250069680 sectors, multi 2: LBA48 NCQ (depth 31/32), AA
[ 5.867039] ata1.00: configured for UDMA/133
[ 5.867697] scsi 0:0:0:0: Direct-Access ATA W30S33-128GMP 2A PQ: 0 ANSI: 5
[ 5.868163] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 5.868207] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 5.868222] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 5.868311] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 5.868606] sd 0:0:0:0: [sda] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[ 5.868701] sd 0:0:0:0: [sda] Write Protect is off
[ 5.868710] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 5.869049] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 5.871343] sda: sda1 sda2 sda3
[ 5.872333] sd 0:0:0:0: [sda] Attached SCSI disk
[ 5.990511] usb 2-4: New USB device found, idVendor=05e3, idProduct=0608
[ 5.990523] usb 2-4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 5.990530] usb 2-4: Product: USB2.0 Hub
[ 5.991585] hub 2-4:1.0: USB hub found
[ 5.991978] hub 2-4:1.0: 4 ports detected
[ 6.280158] usb 2-4.2: new full-speed USB device number 5 using xhci_hcd
[ 6.382121] usb 2-4.2: New USB device found, idVendor=1bc0, idProduct=0055
[ 6.382130] usb 2-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6.382138] usb 2-4.2: Product: Elite5 3.X
[ 6.382144] usb 2-4.2: Manufacturer: Senseshield
[ 6.386014] hid-generic 0003:1BC0:0055.0003: hiddev0,hidraw2: USB HID v1.10 Device [Senseshield Elite5 3.X] on usb-0000:00:14.0-4.2/input0
[ 6.433468] fbcon: inteldrmfb (fb0) is primary device
[ 6.463430] Console: switching to colour frame buffer device 128x48
[ 6.464171] usb 2-4.4: new high-speed USB device number 6 using xhci_hcd
[ 6.484856] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[ 6.573265] usb 2-4.4: New USB device found, idVendor=0bda, idProduct=5411
[ 6.573268] usb 2-4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6.573271] usb 2-4.4: Product: 4-Port USB 2.1 Hub
[ 6.573273] usb 2-4.4: Manufacturer: Generic
[ 6.574222] hub 2-4.4:1.0: USB hub found
[ 6.574802] hub 2-4.4:1.0: 4 ports detected
[ 6.860155] usb 2-4.4.1: new high-speed USB device number 7 using xhci_hcd
[ 6.973192] usb 2-4.4.1: New USB device found, idVendor=0bda, idProduct=5411
[ 6.973268] usb 2-4.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6.973334] usb 2-4.4.1: Product: 4-Port USB 2.1 Hub
[ 6.973379] usb 2-4.4.1: Manufacturer: Generic
[ 6.974358] hub 2-4.4.1:1.0: USB hub found
[ 6.976071] hub 2-4.4.1:1.0: 4 ports detected
[ 7.056167] usb 2-4.4.2: new high-speed USB device number 8 using xhci_hcd
[ 7.196247] raid6: sse2x1 gen() 2846 MB/s
[ 7.244234] raid6: sse2x1 xor() 2371 MB/s
[ 7.292239] raid6: sse2x2 gen() 3372 MB/s
[ 7.340233] raid6: sse2x2 xor() 2815 MB/s
[ 7.388242] raid6: sse2x4 gen() 4810 MB/s
[ 7.436233] raid6: sse2x4 xor() 2450 MB/s
[ 7.437851] raid6: using algorithm sse2x4 gen() 4810 MB/s
[ 7.439498] raid6: .... xor() 2450 MB/s, rmw enabled
[ 7.441174] raid6: using ssse3x2 recovery algorithm
[ 7.446174] xor: measuring software checksum speed
[ 7.451320] usb 2-4.4.2: New USB device found, idVendor=0bda, idProduct=5411
[ 7.452996] usb 2-4.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7.454654] usb 2-4.4.2: Product: 4-Port USB 2.1 Hub
[ 7.456306] usb 2-4.4.2: Manufacturer: Generic
[ 7.458810] hub 2-4.4.2:1.0: USB hub found
[ 7.461046] hub 2-4.4.2:1.0: 4 ports detected
[ 7.484219] prefetch64-sse: 7241.000 MB/sec
[ 7.524220] generic_sse: 6648.000 MB/sec
[ 7.525791] xor: using function: prefetch64-sse (7241.000 MB/sec)
[ 7.531012] async_tx: api initialized (async)
[ 7.584032] usb 2-4.4.1.1: new high-speed USB device number 9 using xhci_hcd
[ 7.643996] Btrfs loaded, crc32c=crc32c-intel
[ 7.685385] usb 2-4.4.1.1: New USB device found, idVendor=0bda, idProduct=0811
[ 7.687134] usb 2-4.4.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7.688905] usb 2-4.4.1.1: Product: 802.11ac WLAN Adapter
[ 7.690630] usb 2-4.4.1.1: Manufacturer: Realtek
[ 7.692318] usb 2-4.4.1.1: SerialNumber: 00e04c000001
[ 7.764029] usb 2-4.4.3: new high-speed USB device number 10 using xhci_hcd
[ 7.872590] usb 2-4.4.3: New USB device found, idVendor=0bda, idProduct=5411
[ 7.874350] usb 2-4.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7.876144] usb 2-4.4.3: Product: 4-Port USB 2.1 Hub
[ 7.877901] usb 2-4.4.3: Manufacturer: Generic
[ 7.880526] hub 2-4.4.3:1.0: USB hub found
[ 7.882859] hub 2-4.4.3:1.0: 4 ports detected
[ 7.944293] usb 2-4.4.2.1: new high-speed USB device number 11 using xhci_hcd
[ 8.044881] usb 2-4.4.2.1: New USB device found, idVendor=0bda, idProduct=0811
[ 8.046423] usb 2-4.4.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8.047961] usb 2-4.4.2.1: Product: 802.11ac WLAN Adapter
[ 8.049490] usb 2-4.4.2.1: Manufacturer: Realtek
[ 8.051005] usb 2-4.4.2.1: SerialNumber: 00e04c000001
[ 8.124170] usb 2-4.4.1.2: new high-speed USB device number 12 using xhci_hcd
[ 8.225163] usb 2-4.4.1.2: New USB device found, idVendor=0bda, idProduct=0811
[ 8.226770] usb 2-4.4.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8.228372] usb 2-4.4.1.2: Product: 802.11ac WLAN Adapter
[ 8.229956] usb 2-4.4.1.2: Manufacturer: Realtek
[ 8.231523] usb 2-4.4.1.2: SerialNumber: 00e04c000001
[ 8.304026] usb 2-4.4.4: new high-speed USB device number 13 using xhci_hcd
[ 8.412390] usb 2-4.4.4: New USB device found, idVendor=0bda, idProduct=5411
[ 8.413908] usb 2-4.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8.415399] usb 2-4.4.4: Product: 4-Port USB 2.1 Hub
[ 8.416858] usb 2-4.4.4: Manufacturer: Generic
[ 8.419382] hub 2-4.4.4:1.0: USB hub found
[ 8.421499] hub 2-4.4.4:1.0: 4 ports detected
[ 8.484371] usb 2-4.4.2.2: new high-speed USB device number 14 using xhci_hcd
[ 8.584951] usb 2-4.4.2.2: New USB device found, idVendor=0bda, idProduct=0811
[ 8.586383] usb 2-4.4.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8.587823] usb 2-4.4.2.2: Product: 802.11ac WLAN Adapter
[ 8.589250] usb 2-4.4.2.2: Manufacturer: Realtek
[ 8.590638] usb 2-4.4.2.2: SerialNumber: 00e04c000001
[ 8.664180] usb 2-4.4.3.1: new high-speed USB device number 15 using xhci_hcd
[ 8.765588] usb 2-4.4.3.1: New USB device found, idVendor=0bda, idProduct=0811
[ 8.766980] usb 2-4.4.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8.768379] usb 2-4.4.3.1: Product: 802.11ac WLAN Adapter
[ 8.769754] usb 2-4.4.3.1: Manufacturer: Realtek
[ 8.771122] usb 2-4.4.3.1: SerialNumber: 00e04c000001
[ 8.848171] usb 2-4.4.1.3: new high-speed USB device number 16 using xhci_hcd
[ 8.949528] usb 2-4.4.1.3: New USB device found, idVendor=0bda, idProduct=0811
[ 8.950954] usb 2-4.4.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8.952417] usb 2-4.4.1.3: Product: 802.11ac WLAN Adapter
[ 8.953883] usb 2-4.4.1.3: Manufacturer: Realtek
[ 8.955359] usb 2-4.4.1.3: SerialNumber: 00e04c000001
[ 9.028286] usb 2-4.4.2.3: new high-speed USB device number 17 using xhci_hcd
[ 9.129008] usb 2-4.4.2.3: New USB device found, idVendor=0bda, idProduct=0811
[ 9.130617] usb 2-4.4.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9.132201] usb 2-4.4.2.3: Product: 802.11ac WLAN Adapter
[ 9.133745] usb 2-4.4.2.3: Manufacturer: Realtek
[ 9.135301] usb 2-4.4.2.3: SerialNumber: 00e04c000001
[ 9.208170] usb 2-4.4.4.1: new high-speed USB device number 18 using xhci_hcd
[ 9.310213] usb 2-4.4.4.1: New USB device found, idVendor=0bda, idProduct=0811
[ 9.311887] usb 2-4.4.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9.313595] usb 2-4.4.4.1: Product: 802.11ac WLAN Adapter
[ 9.315265] usb 2-4.4.4.1: Manufacturer: Realtek
[ 9.316927] usb 2-4.4.4.1: SerialNumber: 00e04c000001
[ 9.319657] usb 2-4.4.4.1: Not enough host controller resources for new device state.
[ 9.321483] usb 2-4.4.4.1: can't set config #1, error -12
[ 9.388170] usb 2-4.4.3.2: new high-speed USB device number 19 using xhci_hcd
[ 9.466180] EXT4-fs: Warning: mounting with data=journal disables delayed allocation and O_DIRECT support!
[ 9.471411] EXT4-fs (sda1): mounted filesystem with journalled data mode. Opts: data=journal
[ 9.497592] usb 2-4.4.3.2: New USB device found, idVendor=0bda, idProduct=0811
[ 9.499428] usb 2-4.4.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9.501317] usb 2-4.4.3.2: Product: 802.11ac WLAN Adapter
[ 9.503188] usb 2-4.4.3.2: Manufacturer: Realtek
[ 9.505033] usb 2-4.4.3.2: SerialNumber: 00e04c000001
[ 9.507672] usb 2-4.4.3.2: Not enough host controller resources for new device state.
[ 9.509648] usb 2-4.4.3.2: can't set config #1, error -12
[ 9.576336] usb 2-4.4.1.4: new high-speed USB device number 20 using xhci_hcd
[ 9.681524] usb 2-4.4.1.4: New USB device found, idVendor=0bda, idProduct=0811
[ 9.683455] usb 2-4.4.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9.685383] usb 2-4.4.1.4: Product: 802.11ac WLAN Adapter
[ 9.687307] usb 2-4.4.1.4: Manufacturer: Realtek
[ 9.689232] usb 2-4.4.1.4: SerialNumber: 00e04c000001
[ 9.691926] usb 2-4.4.1.4: Not enough host controller resources for new device state.
[ 9.693912] usb 2-4.4.1.4: can't set config #1, error -12
[ 9.760420] usb 2-4.4.2.4: new high-speed USB device number 21 using xhci_hcd
[ 9.801194] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 9.819979] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[ 9.845338] systemd[1]: Detected architecture x86-64.
[ 9.861158] usb 2-4.4.2.4: New USB device found, idVendor=0bda, idProduct=0811
[ 9.861161] usb 2-4.4.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9.861163] usb 2-4.4.2.4: Product: 802.11ac WLAN Adapter
[ 9.861165] usb 2-4.4.2.4: Manufacturer: Realtek
[ 9.861167] usb 2-4.4.2.4: SerialNumber: 00e04c000001
[ 9.861768] usb 2-4.4.2.4: Not enough host controller resources for new device state.
[ 9.861813] usb 2-4.4.2.4: can't set config #1, error -12
[ 9.881131] systemd[1]: Set hostname to <HawkeyeTaaS>.
[ 9.940210] usb 2-4.4.4.2: new high-speed USB device number 22 using xhci_hcd
[ 9.984923] systemd[1]: /lib/systemd/system/systemd-udevd.service:31: Unknown lvalue 'RestrictSUIDSGID' in section 'Service'
[ 10.041215] usb 2-4.4.4.2: New USB device found, idVendor=0bda, idProduct=0811
[ 10.043467] usb 2-4.4.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 10.045727] usb 2-4.4.4.2: Product: 802.11ac WLAN Adapter
[ 10.047988] usb 2-4.4.4.2: Manufacturer: Realtek
[ 10.050229] usb 2-4.4.4.2: SerialNumber: 00e04c000001
[ 10.053190] usb 2-4.4.4.2: Not enough host controller resources for new device state.
[ 10.055503] usb 2-4.4.4.2: can't set config #1, error -12
[ 10.076940] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 10.087847] systemd[1]: Created slice User and Session Slice.
[ 10.094683] systemd[1]: Created slice System Slice.
[ 10.100776] systemd[1]: Listening on LVM2 metadata daemon socket.
[ 10.107352] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[ 10.113306] systemd[1]: Listening on fsck to fsckd communication Socket.
[ 10.120033] usb 2-4.4.3.3: new high-speed USB device number 23 using xhci_hcd
[ 10.224467] usb 2-4.4.3.3: New USB device found, idVendor=0bda, idProduct=0811
[ 10.224470] usb 2-4.4.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 10.224472] usb 2-4.4.3.3: Product: 802.11ac WLAN Adapter
[ 10.224474] usb 2-4.4.3.3: Manufacturer: Realtek
[ 10.224476] usb 2-4.4.3.3: SerialNumber: 00e04c000001
[ 10.225232] usb 2-4.4.3.3: Not enough host controller resources for new device state.
[ 10.225318] usb 2-4.4.3.3: can't set config #1, error -12
[ 10.280692] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[ 10.304065] usb 2-4.4.4.3: new high-speed USB device number 24 using xhci_hcd
[ 10.404400] usb 2-4.4.4.3: New USB device found, idVendor=0bda, idProduct=0811
[ 10.406253] usb 2-4.4.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 10.408087] usb 2-4.4.4.3: Product: 802.11ac WLAN Adapter
[ 10.409899] usb 2-4.4.4.3: Manufacturer: Realtek
[ 10.411672] usb 2-4.4.4.3: SerialNumber: 00e04c000001
[ 10.416771] usb 2-4.4.4.3: Not enough host controller resources for new device state.
[ 10.418636] usb 2-4.4.4.3: can't set config #1, error -12
[ 10.484033] usb 2-4.4.3.4: new high-speed USB device number 25 using xhci_hcd
[ 10.516046] Adding 1852176k swap on /swapfile. Priority:-2 extents:5 across:1884944k SSFS
[ 10.584680] usb 2-4.4.3.4: New USB device found, idVendor=0bda, idProduct=0811
[ 10.586574] usb 2-4.4.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 10.586576] usb 2-4.4.3.4: Product: 802.11ac WLAN Adapter
[ 10.586578] usb 2-4.4.3.4: Manufacturer: Realtek
[ 10.586580] usb 2-4.4.3.4: SerialNumber: 00e04c000001
[ 10.587349] usb 2-4.4.3.4: Not enough host controller resources for new device state.
[ 10.587416] usb 2-4.4.3.4: can't set config #1, error -12
[ 10.672042] usb 2-4.4.4.4: new high-speed USB device number 26 using xhci_hcd
[ 10.687338] systemd-journald[421]: Received request to flush runtime journal from PID 1
[ 10.780543] usb 2-4.4.4.4: New USB device found, idVendor=0bda, idProduct=0811
[ 10.782535] usb 2-4.4.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 10.784591] usb 2-4.4.4.4: Product: 802.11ac WLAN Adapter
[ 10.786547] usb 2-4.4.4.4: Manufacturer: Realtek
[ 10.788498] usb 2-4.4.4.4: SerialNumber: 00e04c000001
[ 10.792303] usb 2-4.4.4.4: Not enough host controller resources for new device state.
[ 10.794376] usb 2-4.4.4.4: can't set config #1, error -12
[ 10.844736] systemd-journald[421]: File /var/log/journal/478ce62e9ce04175f4dc87195fb52f25/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 10.996898] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
……
根据log来看,与宏观现象一致,确实是9路不正常(见红色字体部分),7路正常。
对比没有出问题的机器的log,如下所示:
……
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.701991] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.708161] ehci-pci: EHCI PCI platform driver
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.714613] ehci-pci 0000:00:1d.0: EHCI Host Controller
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.720725] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 1
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.733053] ehci-pci 0000:00:1d.0: debug port 2
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.743244] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.743272] ehci-pci 0000:00:1d.0: irq 23, io mem 0xd0805000
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.764254] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.770621] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.776850] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.789112] usb usb1: Product: EHCI Host Controller
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.795336] usb usb1: Manufacturer: Linux 4.15.0-45-generic ehci_hcd
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.801383] usb usb1: SerialNumber: 0000:00:1d.0
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.807714] hub 1-0:1.0: USB hub found
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.813432] hub 1-0:1.0: 8 ports detected
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.819345] ehci-platform: EHCI generic platform driver
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.824613] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.829709] ohci-pci: OHCI PCI platform driver
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.834657] ohci-platform: OHCI generic platform driver
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.839413] uhci_hcd: USB Universal Host Controller Interface driver
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.844136] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.853378] serio: i8042 KBD port at 0x60,0x64 irq 1
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.857649] serio: i8042 AUX port at 0x60,0x64 irq 12
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.862369] mousedev: PS/2 mouse device common for all mice
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.867839] rtc_cmos 00:00: RTC can wake from S4
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.872235] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.876456] rtc_cmos 00:00: alarms up to one month, y3k, 242 bytes nvram
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.880714] i2c /dev entries driver
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.884995] pcie_mp2_amd: AMD(R) PCI-E MP2 Communication Driver Version: 1.0
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.889454] device-mapper: uevent: version 1.0.3
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.894198] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.902728] intel_pstate: Intel P-state driver initializing
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.908361] ledtrig-cpu: registered to indicate activity on CPUs
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.914448] NET: Registered protocol family 10
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.927537] Segment Routing with IPv6
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.931584] NET: Registered protocol family 17
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.935863] Key type dns_resolver registered
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.941162] RAS: Correctable Errors collector initialized.
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.945266] microcode: sig=0x30679, pf=0x4, revision=0x90a
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.949664] microcode: Microcode Update Driver: v2.2.
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.949680] sched_clock: Marking stable (4949654126, 0)->(4930576516, 19077610)
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.962792] registered taskstats version 1
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.966804] Loading compiled-in X.509 certificates
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.976025] Loaded X.509 cert 'Build time autogenerated kernel key: e3b8f44ffaaceef3e3a84cfaebd8e5a9acebeaad'
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.983985] zswap: loaded using pool lzo/zbud
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 4.998239] Key type big_key registered
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.002159] Key type trusted registered
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.009983] Key type encrypted registered
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.013622] AppArmor: AppArmor sha1 policy hashing enabled
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.017341] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.021122] ima: Allocated hash algorithm: sha1
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.024894] evm: HMAC attrs: 0x1
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.029107] Magic number: 2:108:521
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.033208] rtc_cmos 00:00: setting system clock to 2022-04-12 07:31:02 UTC (1649748662)
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.041128] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.044954] EDD information not available.
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.066623] Freeing unused kernel memory: 2408K
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.092231] Write protecting the kernel read-only data: 20480k
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.098554] Freeing unused kernel memory: 2008K
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.111647] Freeing unused kernel memory: 1892K
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.131381] x86/mm: Checked W+X mappings: passed, no W+X pages found.
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.135203] x86/mm: Checking user space page tables
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.154690] x86/mm: Checked W+X mappings: passed, no W+X pages found.
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.156190] usb 1-1: new high-speed USB device number 2 using ehci-pci
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.316530] usb 1-1: New USB device found, idVendor=8087, idProduct=07e6
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.320483] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.324939] hub 1-1:1.0: USB hub found
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.329769] hub 1-1:1.0: 4 ports detected
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.363542] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.367935] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.376475] r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0x (ptrval), 68:ed:a4:39:74:3d, XID 0c900800 IRQ 87
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.384756] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.393538] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.398091] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.408443] ahci 0000:00:13.0: version 3.0
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.409066] ahci 0000:00:13.0: controller can't do DEVSLP, turning off
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.414984] r8169 0000:03:00.0 eth1: RTL8168evl/8111evl at 0x (ptrval), 68:ed:a4:39:74:3e, XID 0c900800 IRQ 89
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.424362] r8169 0000:03:00.0 eth1: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.434137] ahci 0000:00:13.0: AHCI 0001.0300 32 slots 2 ports 3 Gbps 0x1 impl SATA mode
Apr 12 15:31:14 HawkeyeTaaS kernel: [ 5.443926] ahci 0000:00:13.0: flags: 64bit ncq pm led clo pio slum part deso
……
可以看到,正常的机器中是没有usb2和usb3的,只有usb1。
经过与相关人员沟通确认,是出问题的这台机器前段时间主板上的BIOS电池被拔出了,BIOS恢复为默认设置了,默认打开了XHCI,这才导致上述问题的出现。将BIOS按照生产厂家给出的BIOS标准设置进行配置(其中包括不打开XHCI),问题解决。