Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB not working despite probably proper kernel configuration
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Sat Jan 13, 2018 11:45 am    Post subject: USB not working despite probably proper kernel configuration Reply with quote

Hi all for some reason USB is not working on my kernel despite probably proper kernel configuration so I hope someone could help me figure out what I possibly did of wrong here
EDIT:I'm posting it all on pastebin since it's too big to fit here


My kernel config:

https://pastebin.com/vcrSx6hS

My dmesg :

https://pastebin.com/jHbeXmhD


Last edited by nerd811 on Sat Jan 13, 2018 12:55 pm; edited 2 times in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7197

PostPosted: Sat Jan 13, 2018 12:17 pm    Post subject: Reply with quote

Try enable them, the HUB is for usb, the msi is for irq handling.
Code:
CONFIG_PCI_MSI
CONFIG_USB_EHCI_ROOT_HUB_TT
Back to top
View user's profile Send private message
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Sat Jan 13, 2018 12:22 pm    Post subject: Reply with quote

krinn wrote:
Try enable them, the HUB is for usb, the msi is for irq handling.
Code:
CONFIG_PCI_MSI
CONFIG_USB_EHCI_ROOT_HUB_TT

Gonna try that. I'll post results, but it will take a while since my computer is not that fast.
Back to top
View user's profile Send private message
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Sat Jan 13, 2018 12:47 pm    Post subject: Reply with quote

krinn wrote:
Try enable them, the HUB is for usb, the msi is for irq handling.
Code:
CONFIG_PCI_MSI
CONFIG_USB_EHCI_ROOT_HUB_TT

Thanks it worked!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44193
Location: 56N 3W

PostPosted: Sat Jan 13, 2018 12:48 pm    Post subject: Reply with quote

nerd811,

Code:
[    0.494386] ehci-pci: EHCI PCI platform driver
[    0.494510] ehci-pci 0000:00:1a.0: EHCI Host Controller
[    0.494547] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 1
[    0.494565] ehci-pci 0000:00:1a.0: debug port 2
[    0.498480] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[    0.498485] ehci-pci 0000:00:1a.0: irq 16, io mem 0xc0619000
[    0.505065] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
...
[    2.949389] irq 16: nobody cared (try booting with the "irqpoll" option)

Your USB 2 hardware is using irq 16. Then the kernel finds that there is no irq handler for irq 16.
That's game over. irq 16 is disabled so nothing using in works.

Putting irqpoll on the kernel command line is a (slow) workaround.

You have USB3 and USB2 hardware. The drivers for USB1 are in your kernel but dmesg suggests that there is no hardware.
USB3 works with all the earlier versions.
USB2 might too. Some USB hardware needs both
Code:
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
CONFIG_USB_EHCI_TT_NEWSCHED=y

Code:

# CONFIG_PCI_MSI is not set
Is generally a bad thing. Enable that.
When its off, several unrelated things may share an IRQ. They all get disabled when you get the "nobody cared" message.
For every IRQ, the kernel has to poll all the devices sharing the IRQ. That's slow and some devices don't like to share.
When Message Signalled Interrupts (MSI) are in use, there are a lot more IRQs, so sharing is unusual.
Each device is programmed with the address of the IRQ service routine at boot time. It passes this to the kernel with the IRQ, so there is no polling.
Its also safe. The kernel can mix and match if you still have a device that does not support MSI.

To see the difference look in /proc/interrupts before and after the change.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
nerd811
n00b
n00b


Joined: 21 Jul 2016
Posts: 36

PostPosted: Sat Jan 13, 2018 12:53 pm    Post subject: Reply with quote

NeddySeagoon wrote:
nerd811,

Code:
[    0.494386] ehci-pci: EHCI PCI platform driver
[    0.494510] ehci-pci 0000:00:1a.0: EHCI Host Controller
[    0.494547] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 1
[    0.494565] ehci-pci 0000:00:1a.0: debug port 2
[    0.498480] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[    0.498485] ehci-pci 0000:00:1a.0: irq 16, io mem 0xc0619000
[    0.505065] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
...
[    2.949389] irq 16: nobody cared (try booting with the "irqpoll" option)

Your USB 2 hardware is using irq 16. Then the kernel finds that there is no irq handler for irq 16.
That's game over. irq 16 is disabled so nothing using in works.

Putting irqpoll on the kernel command line is a (slow) workaround.

You have USB3 and USB2 hardware. The drivers for USB1 are in your kernel but dmesg suggests that there is no hardware.
USB3 works with all the earlier versions.
USB2 might too. Some USB hardware needs both
Code:
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
CONFIG_USB_EHCI_TT_NEWSCHED=y

Code:

# CONFIG_PCI_MSI is not set
Is generally a bad thing. Enable that.
When its off, several unrelated things may share an IRQ. They all get disabled when you get the "nobody cared" message.
For every IRQ, the kernel has to poll all the devices sharing the IRQ. That's slow and some devices don't like to share.
When Message Signalled Interrupts (MSI) are in use, there are a lot more IRQs, so sharing is unusual.
Each device is programmed with the address of the IRQ service routine at boot time. It passes this to the kernel with the IRQ, so there is no polling.
Its also safe. The kernel can mix and match if you still have a device that does not support MSI.

To see the difference look in /proc/interrupts before and after the change.

Thanks for the insight. Although I found sorta difficult to properly understand what the implications are I believe that the changes you pointed me to do are the same as krinn pointed me to. I'm going to mark the post as solved but please do tell me if only setting what krinn told me to set is not enough.
EDIT: uuhhh really akward to say this but my browser is sorta bugged right now so if a mod could mark this as solved I'd be thankful
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44193
Location: 56N 3W

PostPosted: Sat Jan 13, 2018 1:19 pm    Post subject: Reply with quote

nerd811,

It comes to the same conclusion as krinn. I've just added the why.
Your issue isn't fixed until its tested. Come back and tell us if it works and edit the topic in your original post then.
I would hate to mislead future readers.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum