raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.22k stars 5.02k forks source link

F/W 4.14.x causes dwc_otg_handle_mode_mismatch_intr:68: messages on boot with C-Media Electronics Inc. USB PnP Sound Device #2408

Closed hofnarr132 closed 6 years ago

hofnarr132 commented 6 years ago

Looks like an issue with dwc_otg was introduced with 4.14.x versions - 4.9.80 does not show issue.

When booting RPi 3, 2 or ZeroW with 4.14.x versions with a "C-Media Electronics Inc. USB PnP Sound Device" connected** get the following boot messages (extracted from dmesg):

[    3.292306] usb 1-1.3.4: new full-speed USB device number 7 using dwc_otg
[    3.320586] uart-pl011 3f201000.serial: no DMA platform data
[    3.450503] usb 1-1.3.4: New USB device found, idVendor=0d8c, idProduct=013c
[    3.467395] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.484570] usb 1-1.3.4: Product: USB PnP Sound Device          
[    3.500214] usb 1-1.3.4: Manufacturer: C-Media Electronics Inc.      
[    3.522058] input: C-Media Electronics Inc.       USB PnP Sound Device           as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4:1.3/0003:0D8C:013C.0003/input/input2
[    3.622573] hid-generic 0003:0D8C:013C.0003: input,hidraw2: USB HID v1.00 Device [C-Media Electronics Inc.       USB PnP Sound Device          ] on usb-3f980000.usb-1.3.4/input3
.
.
.
[    6.170183] bcm2835_alsa bcm2835_alsa: card created with 8 channels
[    6.374754] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[    6.374820] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[    6.376756] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[    6.406816] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[    6.410315] usbcore: registered new interface driver snd-usb-audio
[    7.518782] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[    7.520726] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[    7.712309] usb 1-1.5: reset high-speed USB device number 5 using dwc_otg
.
.
.
[    7.913820] usbcore: registered new interface driver rt2800usb
.
.
.
[   24.342952] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[   24.343077] usb 1-1.3.4: 1:1: cannot set freq 44100 to ep 0x1
[   24.432846] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[   24.512751] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[   24.512823] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[   24.526869] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[   24.527122] usb 1-1.3.4: 2:1: cannot get freq at ep 0x82
[   24.528811] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[   24.576791] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

[   24.576821] WARN::dwc_otg_handle_mode_mismatch_intr:68: Mode Mismatch Interrupt: currently in Host mode

Tested and errors with 4.14.18 (and 4.14.22).

uname -a
Linux raspberrypi 4.14.18-v7+ #1093 SMP Fri Feb 9 15:33:07 GMT 2018 armv7l GNU/Linux

Back revved to 4.9.80 where the error messages do not show:

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.9.80-v7+ #1092 SMP Fri Feb 9 13:56:00 GMT 2018 armv7l GNU/Linux

** note: the "C-Media Electronics Inc. USB PnP Sound Device" is actually embedded in a 4-Port HDMI & USB KVM Switch (this one from ModMyPi) - there is a push button switch to turn off audio which disables the Sound Device - the RPi will then boot without error (but then no sound..)

popcornmix commented 6 years ago

@malacalypse your problem doesn't look related to this issue. Probably best to start a new issue.

jkuek commented 6 years ago

This makes me so happy, great work guys! I'm going to update and see if I can validate this fixes my issue.

@P33M Do we know when this issue was introduced? Looks like it's been there from day one?

Is it confirmed that this issue won't affect 4.9.x kernels? I have a number of systems still using Jessie.

TheNetStriker commented 6 years ago

I can also confirm that the issue is now solved with the latest kernel. I had not a single error since the update. Thanks for the fix!

P33M commented 6 years ago

It's a regression in 4.14, not present in 4.9 - https://github.com/raspberrypi/linux/commit/aa3c8cd4ea9e49269e0c0e1072c0b91c7b49e14e#diff-1d4760cae1bb22f857c0b933bd6c5900

Wierdly, I was positively testing this new path as a fix for another issue so the copy-paste fail must have happened while cleaning up the patch.

Closing as fixed

mypiandrew commented 6 years ago

Still broken for me as of 4.14.72

flyser commented 6 years ago

@mypiandrew same here

P33M commented 6 years ago

Define "broken". Have you seen a recurrence of "Mode Mismatch Interrupt" messages appearing in the kernel log since this patch was pushed?

flyser commented 6 years ago

No. Broken as described in https://github.com/raspberrypi/linux/issues/2692

mypiandrew commented 6 years ago

@P33M No, none of the int 68 stuff, it's still a mess of errors with devices not enumerating correctly though

I've commented to #2692 as that seems more clean than keeping this going

I'm in the UK so if you want me to mail you some test hardware (assuming that helps you) we can arrange that.

3x-M4ch1nA commented 5 years ago

I'd like to add something in. Y'all are all steering towards USB power related issue. I am currently getting this issue, and have found a read this thread all the way through. So I unplugged devices and tried to boot. Doesn't help anything. Here's my other problem. After passing all those errors in boot (the 2 out of 10 times it does pass them) I then get a black screen with my pointer arrow glitching in and out even tho no devices were connected). Instead of it loading the login screen, it gets stuck there. Just glitching away So I cannot try other fixes.

I have tried plugging keyboard in AFTER passing boot and getting this screen. I tried crtl + alt + F1, and saw the terminal version pop up for a quick second before glitching out again back to pointer screen. (When plugging in, it does show power logo now though) I have tried logging in with keyboard on the messed up login splash, to see if it'd let me in. Nothing.