RE: No carrier lost information with gadget RNDIS/ECM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Peter Chen writes:
> That's very strange, that means the SoC doesn't know VBUS fails down after detaching from the host.
> You could measure the VBUS value at the board, then read the VBUS value at register to confirm it.

I have put a scope on VBUS. With kernel 4.9 after detaching, it discharges all the way down to about 500 mV, with 4.19 this discharging stops after about 4 seconds at about 2.4V and remains there.

> I just tried my board (imx6sx-sdb), it worked OK at at v5.2-rc5. If you have
> memtool (the tool to read physical memory), you could read register OTGSC
> at that time using below command:

It's already part of /sys/kernel/debug/ci_hdrc.0/registers, but reading from its memory address works equally well.
> 0x021841A4:  09242F20
Yup, I have 021841a4: 09240f20, which only differs by TOG_1MS.

> # cable detach
> 0x021841A4:  09341120
021841a4: 09340d20
With BSV reflecting the stopped discharge.

> You could poll the /sys/class/udc/ci_hdrc.0/state to know the connection.
>
> root@imx6qpdlsolox:~# [  230.074850] configfs-gadget gadget: high-speed config #1: c
>
> root@imx6qpdlsolox:~# cat /sys/class/udc/ci_hdrc.0/state  <=== cable attached
> configured
> root@imx6qpdlsolox:~# cat /sys/class/udc/ci_hdrc.0/state  <=== cable detached
> not attached

Good to know. The latter turns out as "suspended", though.

Thanks and cheers
Kai

Attachment: kernel-4.9-vbus.PNG
Description: kernel-4.9-vbus.PNG

Attachment: kernel-4.19-vbus.PNG
Description: kernel-4.19-vbus.PNG


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux