Como faço para remover uma porta usb?

3

Uma porta usb foi mapeada para uma interrupção que eu quero liberar ...

cat /proc/interrupts | grep 16:
16:         31          0          0          0          0          0          0          0  IR-IO-APIC  16-fasteoi   ehci_hcd:usb3

Como faço para remover o dispositivo ehci_hcd: usb3 corretamente?

root@blackserver:/sys/devices/pci0000:00/0000:00:1a.0/usb3# echo -n 1 > remove

me dá um erro "bash: echo: write error: Argumento inválido" mas a saída do dmesg diz "usb 3-1: USB disconnect, device number 2" mas ainda assim o dispositivo está usando a interrupção. Isso é um erro ou minha abordagem está errada?

EDITAR:

Bus 004 Device 002: ID 8087:8001 Intel Corp. 
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:8009 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 2109:0812 VIA Labs, Inc. VL812 Hub
Bus 002 Device 003: ID 2109:0812 VIA Labs, Inc. VL812 Hub
Bus 002 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 009: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 001 Device 008: ID 046d:0826 Logitech, Inc. HD Webcam C525
Bus 001 Device 007: ID 2109:2812 VIA Labs, Inc. VL812 Hub
Bus 001 Device 006: ID 045e:02d1 Microsoft Corp. XBOX One Controller for Windows
Bus 001 Device 004: ID 2109:2812 VIA Labs, Inc. VL812 Hub
Bus 001 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 001 Device 002: ID 0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

EDIT: Então eu acredito que o dispositivo em si é um controlador ECHI que é atribuído no barramento 003.

kelvin@blackserver:~$ dmesg | grep :1a
[    0.178287] pci 0000:00:1a.0: [8086:8cad] type 00 class 0x0c0320
[    0.178310] pci 0000:00:1a.0: reg 0x10: [mem 0xefd3b000-0xefd3b3ff]
[    0.178369] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    0.178403] pci 0000:00:1a.0: System wakeup disabled by ACPI
[    0.675933] DMAR: Setting identity map for device 0000:00:1a.0 [0xade98000 - 0xadea6fff]
[    0.676154] iommu: Adding device 0000:00:1a.0 to group 7
[    0.837462] ehci-pci 0000:00:1a.0: EHCI Host Controller
[    0.837481] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 3
[    0.837509] ehci-pci 0000:00:1a.0: debug port 2
[    0.842160] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[    0.842174] ehci-pci 0000:00:1a.0: irq 16, io mem 0xefd3b000
[    0.853306] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[    0.857162] usb usb3: SerialNumber: 0000:00:1a.0

RESOLVIDO: movido o comando de volta um nível ...

root@blackserver:/sys/devices/pci0000:00/0000:00:1a.0# echo -n 1 > remove

saída dmesg agora ...

[65207.355668] ehci-pci 0000:00:1a.0: remove, state 4
[65207.355680] usb usb3: USB disconnect, device number 1
[65207.355682] usb 3-1: USB disconnect, device number 2
[65207.360110] ehci-pci 0000:00:1a.0: USB bus 3 deregistered
[65207.475341] iommu: Removing device 0000:00:1a.0 from group 7

Nenhuma outra mensagem de erro e o controlador USB não estão mais listados no lspci ou nos dispositivos mostrados em lsusb.

    
por Kelvin 29.01.2016 / 20:48

1 resposta

2

RESOLVIDO: movido o comando de volta um nível ...

root@blackserver:/sys/devices/pci0000:00/0000:00:1a.0# echo -n 1 > remove

saída dmesg agora ...

[65207.355668] ehci-pci 0000:00:1a.0: remove, state 4
[65207.355680] usb usb3: USB disconnect, device number 1
[65207.355682] usb 3-1: USB disconnect, device number 2
[65207.360110] ehci-pci 0000:00:1a.0: USB bus 3 deregistered
[65207.475341] iommu: Removing device 0000:00:1a.0 from group 7

Nenhuma outra mensagem de erro e o controlador USB não estão mais listados no lspci ou nos dispositivos mostrados em lsusb.

    
por Kelvin 30.01.2016 / 17:11

Tags