Re: Tegra3 ehci_suspend and ehci_resume

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

 



On 12.12.2012 16:20, Alan Stern wrote:
On Wed, 12 Dec 2012, Timur wrote:

- Unplugging and re-plugging the slave device works well.
- Unplugging the Y-cable (disconnecting slave and external power at the
same time) then re-plugging the Y-cable works well.
- Disconnecting external power to both devices, then waiting for the
host screen to go off and waiting for up to 20 seconds longer (staying
in light sleep) does also work well. Please note: slave device was
completely off power for roughly 20 seconds and is not causing any issues.

The problem only occurs, when I pull external power, wait for the host
screen to go off, then wait another 60s or 10 minutes, this way making
sure the host will indeed transition into deep sleep. Plugging external
power then will wake both devices, but the host can no longer talk to
the slave.

What happens if you: pull external power, wait for the host screen to
go off, then wait another 60s or 10 minutes, then plug external power
back to both devices (but leave the USB connection between the host and
slave unplugged), then wait 10 seconds, then plug in the USB
connection?

Nexus 7 and USB slave get their power via USB cable. This makes it a little difficult to connect power, but leave the USB connection unplugged. I'm not sure how to proceed with this.

This is the USB Y-adapter I am using: https://sites.google.com/site/sonicboomworld/_/rsrc/1345753009582/my-projects/otg-diagrams/Y_OTG_CABLE.png

A photo of all components (USB cables excluded): http://mehrvarz.github.com/img/n7-otg-power.png

Is this not strong evidence the problem is with the host?

Yes, it is.  Can you force the host to go into deep sleep while the
external power remains connected?

Alan Stern

I investigated this. Unfortunately, the answer seems to be no. I cannot convince the Nexus 7 to move into deep sleep mode (LP0), when a powered USB cable is connected to it (despite WiFi, Bt, ADB, etc. being off).

A new finding: when the N7 is coming out of deep sleep (in the problematic scenario), I see that method hub_port_reset() is being called. It seems to succeed. Because the following shows up in the log: "usb 2-1: new full speed USB device number 3 using tegra-ehci". However, this is then followed by hub_set_address() failing and "tegra-ehci tegra-ehci.0: detected XactErr len 0/8 retry x" and "device not accepting address 3, error -71" being logged.

I ran this modified test: while the N7 was in deep sleep, I unplugged (stole) the USB slave. Then I plugged external power and this time hub_port_reset() did not succeed and no entry "usb 2-1: new full speed USB device number 3 using tegra-ehci" was logged. I think this shows that, after LP0, a connected USB slave device _is_ still detectable. The problem strikes a moment later, when the host tries to set the address.

Can I try anything in code, to "reset" the slave, so it will accept an address?

Timur

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


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

  Powered by Linux