-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
g_dbgp doesn't work #1907
Comments
I should also mention that dtoverlay=dwc2 is in /boot/config.txt and I have restarted to enable that. |
Here's some example dmesg output: [ 1562.027300] dwc2 20980000.usb: bound driver dbgp |
What kernel version are you using? i.e. |
Linux raspberrypi 4.9.13+ #974 Wed Mar 1 20:04:40 GMT 2017 armv6l GNU/Linux But I have also tried 4.4 and 4.9 on my way here. I also had an idea that maybe my Chromecast Ultra power supply mightn't be giving it enough juice or something and just bought another 2.1 amp charger to power it off, swapping cables over in case it was something to do with the micro-usb cables too. Also tried reading the ttyGS0 as root, in case it was some perms issue. |
Try updating. You probably want: #1887 |
Doing that now. |
On Linux raspberrypi 4.9.14+ #977 Mon Mar 13 18:21:04 GMT 2017 armv6l GNU/Linux and it's still the same. |
Check the the gadget is showing as "VID 0x0525 , PID 0xc0de" when connected to a PC, and you could try enabling:
|
c710@c710:~$ lsusb With printk I still don't get any console/dmesg output from the debug port on the c710. |
When the c710 reboots, I do get some more dmesg output about attached USB devices: [ 264.831851] dwc2 20980000.usb: bound driver dbgp |
I've enable debug, and I'm getting some more interesting output now: [ 794.098149] dwc2 20980000.usb: bound driver dbgp |
But apparently, even those "failure" messages are normal according to the EHCI Debug page. |
Enabling debug at the dwc2 level and using Gadget Only mode (was getting errors about "suspend" in dual mode) this is what I get: Also can't help feeling this is similar, if not the same as: |
It is going to take me a while to read your logs, but the "setup: failure req 6 v 200" message proves that you are getting packets from the usb host. The spinics bug report is due to the way that upstream have broken g-tx-fifo-size, and you need to be using the dwc2 overlay from rpi-linux-4.9.14 or later. You could try increasing g-rx-fifo-size, but I do not think that is significant. |
You can configure your coreboot side (in menuconfig): Once you get to OS, sudo cbmem -c should give you USB initialisation as seen from the c710 side. Failing USB request is this one: In the dwc2.txt log that's line 137 and the request times out on line 152. |
In dwc2_hsotg_process_req_feature(), you need to handle USB_DEVICE_DEBUG_MODE succesfully (nothing to do there). It's just a parallel case next to USB_DEVICE_TEST_MODE. |
Only thing that stood out to me was without Output verbose USB 2.0 EHCI debug dongle messages, and said: ehci_wait_td error - status=80090d40 Both cbmem outputs are attached. I don't really know what you mean in your last comment, but I will take a look. |
I think you either forgot to connect RPI or the USB port was otherwise completely stuck from previous boots. That cbmem_debug.txt should have been much more verbose. My second comment refers to this: |
You're right - forgot cable wasn't plugged in (had borrowed it for something else). |
Yep, adding that line did the trick. Although it is kicking out of the serial port halfway through output (presumably because I haven't applied what's left of the EHCI debug patches). Will add those later to confirm. Thank you. |
Yep, that worked. Changed the kernel back to stock, except for enabling the debug gadget and your one line addition, and then applied a carefully selected (read: guessed) subset of the EHCI debug patches of yours, and all is good. :) |
Please take the approriate actions and post patch, linux-usb list probably. I have no time for that atm. |
@jpl888 Do you plan to send an upstream patch? |
Closing this issue as questions answered/issue resolved. |
g_dbgp dbgp only work in dwc2? Does the dwc3 device not work at all? |
You've come to the wrong place to ask questions, especially about dwc3 - Raspberry Pi devices don't use it. |
Hi, I'm trying to use the g_dbgp module Gadget driver to debug Chromebook firmware, and it doesn't work. The module loads without problem, and /dev/ttyGS0 gets created but there is no output.
Using the module with a BeagleBone Black works without problem and I can see output from the firmware on boot, so I know the EHCI debug port on the Chromebook side of things is configured and working correctly.
I enabled the module by enabling EHCI debug gadget in menuconfig under rpi-source, then running:
make modules_prepare$f /lib/modules/$ (uname -r)/kernel/drivers/usb/gadget/ ; done
make M=drivers/usb/gadget, for f in $(find drivers/usb/gadget/ -name *.ko); do sudo cp
depmod -a
modprobe g_dbgp (with no other Gadget modules loaded).
Can you help me to get some debug output and get to the bottom of why it's not working?
Thanks.
The text was updated successfully, but these errors were encountered: