Re: dwc2 ff540000.usb: dwc2_hc_chhltd_intr_dma: Channel 11 - ChHltd set, but reason is unknown

2018-04-17 Thread Rodrigo Stuffs
Hi there Minas,

On Tue, Apr 17, 2018 at 8:10 AM, Rodrigo Stuffs <r...@brasilia.br> wrote:
> Hello Minas,

[...]

> Will monitor it and will let the list know about the results. Thank
> you very much again!
>
> - RF.

Well, the problem happened again. And I'm damn sure it is a bug in the
UPS hardware.

However, there were no printk() this time (running patched kernel).

But it's ok. I have hacked it by:

1. Detect more than a hour with the same voltage
2. When voltage is stable; stop the UPS monitor daemon
3. Run a usb reset program that I found in
http://www.roman10.net/2011/05/04/how-to-reset-usb-device-in-linux/
4. Start the UPS monitor daemon again

Thanks for your help and attention man! o/

My best regards,

- RF.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: dwc2 ff540000.usb: dwc2_hc_chhltd_intr_dma: Channel 11 - ChHltd set, but reason is unknown

2018-04-17 Thread Rodrigo Stuffs
Hello Minas,

On Tue, Apr 17, 2018 at 4:51 AM, Minas Harutyunyan
 wrote:
> Hi Rodrigo,
>
>> == COMPILE BARFS ==
>>CC  drivers/usb/dwc2/hcd.o
>> drivers/usb/dwc2/hcd.c: In function ‘dwc2_core_init’:
>> drivers/usb/dwc2/hcd.c:2191:22: error: ‘trdtrim’ undeclared (first use
>> in this function); did you mean ‘strstrip’?
>>u32 usbcfg, otgctl; trdtrim;
>
> Your backport is wrong, you used semicolon instead of comma. Should be:
>  u32 usbcfg, otgctl, trdtrim;
>
> Thanks,
> Minas

Those... Punctuations!

Thank you very much! Kernel was built successfully and is now running.

Will monitor it and will let the list know about the results. Thank
you very much again!

- RF.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


dwc2 ff540000.usb: dwc2_hc_chhltd_intr_dma: Channel 11 - ChHltd set, but reason is unknown

2018-04-16 Thread Rodrigo Stuffs
Hi there Minas / linux-usb ;

I have a good ole APC Back-UPS ES 600N that from time to time resolves
that it should stop talking to my SBCs.

This issue happened in my Raspberry Pi, and when it stopped I had the
following printk:

Apr 11 14:10:15 localhost kernel: [9416331.806123] hid-generic
0003:051D:0002.000A: usb_submit_urb(ctrl) failed: -1

All I had to do is monitor the graphics and when it flatlined, unplug
and plug the UPS usb port. Until the next occurrence. Well, I lived
with it for some good years.

Last weekend I changed the Raspberry Pi with a TinkerBoard. And the
cranky UPS is also tickling TinkerBoard's USB port. Now the issue
manifests in a slightly different way:

== DEVICE ENUMERATION ==
[56529.462106] usb 1-1.1.3: new low-speed USB device number 9 using dwc2
[56530.222538] usb 1-1.1.3: New USB device found, idVendor=051d, idProduct=0002
[56530.222638] usb 1-1.1.3: New USB device strings: Mfr=3, Product=1,
SerialNumber=2
[56530.222697] usb 1-1.1.3: Product: Back-UPS ES 600N FW:876.Q1j.D USB FW:Q1j
[56530.222772] usb 1-1.1.3: Manufacturer: APC
[56530.222821] usb 1-1.1.3: SerialNumber: 5B1017T20483
[56535.075030] hid-generic 0003:051D:0002.0003: hiddev0,hidraw1: USB
HID v1.10 Device [APC Back-UPS ES 600N FW:876.Q1j.D USB FW:Q1j] on
usb-ff54.usb-1.1.3/input0

== KERNEL WHINES ==
[105243.156331] dwc2 ff54.usb: dwc2_hc_chhltd_intr_dma: Channel 11
- ChHltd set, but reason is unknown
[105243.156414] dwc2 ff54.usb: hcint 0x0002, intsts 0x06600029
[105273.536188] dwc2 ff54.usb: dwc2_hc_chhltd_intr_dma: Channel 13
- ChHltd set, but reason is unknown
[105273.536268] dwc2 ff54.usb: hcint 0x0002, intsts 0x06600029

Well, in spirit to getting things going nicely in the new system, I
have found the thread:
https://www.spinics.net/lists/linux-usb/msg161854.html

Where Minas suggests a patch to tackle it.

I tried to backport the patch to my 4.4 Kernel and it was not really
happy about it:

== COMPILE BARFS ==
  CC  drivers/usb/dwc2/hcd.o
drivers/usb/dwc2/hcd.c: In function ‘dwc2_core_init’:
drivers/usb/dwc2/hcd.c:2191:22: error: ‘trdtrim’ undeclared (first use
in this function); did you mean ‘strstrip’?
  u32 usbcfg, otgctl; trdtrim;
  ^~~
  strstrip
drivers/usb/dwc2/hcd.c:2191:22: note: each undeclared identifier is
reported only once for each function it appears in
drivers/usb/dwc2/hcd.c:2192:2: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
error, forbidden warning: hcd.c:2192
scripts/Makefile.build:277: recipe for target 'drivers/usb/dwc2/hcd.o' failed
make[3]: *** [drivers/usb/dwc2/hcd.o] Error 1
scripts/Makefile.build:484: recipe for target 'drivers/usb/dwc2' failed
make[2]: *** [drivers/usb/dwc2] Error 2
scripts/Makefile.build:484: recipe for target 'drivers/usb' failed
make[1]: *** [drivers/usb] Error 2
Makefile:1016: recipe for target 'drivers' failed
make: *** [drivers] Error 2



Patchset: https://pastebin.com/v1ink6fJ

== QUESTIONS ==
1. What are the odds that the OP patchset will also help my issue?
2. IF 1 == true ; then what am I doing wrong in my patch? :-)

Appreciate your time.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html