3

A usb port has been mapped to an interrupt that I want to free up...

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

How do I remove the ehci_hcd:usb3 device properly?

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

gives me an error "bash: echo: write error: Invalid argument" yet dmesg output says "usb 3-1: USB disconnect, device number 2" yet still the device is using the interrupt. Is this a bug or is my approach wrong?

EDIT:

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: So I believe the device itself is an ECHI controller which is assigned under bus 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

SOLVED: moved the command back one level...

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

dmesg output now...

[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

No other error messages and the USB controller is no longer listed in lspci or devices shown in lsusb.

  • Welcome to Ask Ubuntu! ;-) Could you please go to a terminal by pressing [Ctrl][Alt][T] and type lsusb. Then edit your question and copy-paste the output of the command into your question so we can see what exact hardware you have. (Please help us help you!) Then leave a comment @Fabby. – Fabby Jan 29 '16 at 21:37
  • @Fabby updated with the info you requested, thanks. – Kelvin Jan 30 '16 at 10:37
  • Kelvin, it's unclear to me which USB peripheral you want to delete... (It's just a question of unloading the module and that'll free up the interrupt) – Fabby Jan 30 '16 at 11:54
  • @Fabby, I don't believe the device is actually a peripheral, I believe its a usb header which itself can host multiple usb ports and thus devices. My logic is that without any usb devices connected the ehci_hcd:usb3 device still exists and uses the same interrupt. – Kelvin Jan 30 '16 at 12:25
  • 2
    Gotcha, yes I understand I'll effectively loose those USB ports. Think I've just answered my own question actually... same approach but down one level so... /sys/devices/pci0000:00/0000:00:1a.0/# echo -n 1 > remove – Kelvin Jan 30 '16 at 12:37
2

SOLVED: moved the command back one level...

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

dmesg output now...

[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

No other error messages and the USB controller is no longer listed in lspci or devices shown in lsusb.

  • 1
    And upvoted both question and answer! Welcome to the group of problem solvers! ;-) – Fabby Jan 30 '16 at 16:43

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.