All of lore.kernel.org
 help / color / mirror / Atom feed
* ehci-tegra issue with deep sleep
@ 2012-12-11 22:23 Timur
       [not found] ` <50C7B250.7020409-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Timur @ 2012-12-11 22:23 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi. I discovered a problem with USB host mode on a Nexus 7 running 
Android 4.2.x: USB slave devices will become undetectable ("not 
accepting address xx, error -71") after the host goes through a deep 
sleep cycle (60+ seconds loss of external power; running on battery). In 
this situation the methods tegra_ehci_suspend() and tegra_ehci_resume() 
are being called. I am _not_ experiencing this issue at all, when the 
host only goes through a light sleep cycle (less than 20 seconds of 
power loss). During light sleep, the methods tegra_ehci_suspend() and 
tegra_ehci_resume() are _not_ being called.

The slave device (a USB DAC; many different products have been tested) 
is loosing power in both cases. But this does not seem to be the 
problem, because slave devices stays accessible, when the host (N7) only 
goes through light sleep.

Is anyone aware of this problem? Has it been fixed since 3.1.10?
Thank you.

Timur

Project on github:
http://mehrvarz.github.com/usb-host-mode-power-management-nexus7

Discussion: "Can you charge & USB Host mode simultaneously?"
http://rootzwiki.com/forum/512-nexus-7

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ehci-tegra issue with deep sleep
       [not found] ` <50C7B250.7020409-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
@ 2012-12-12 17:52   ` Stephen Warren
       [not found]     ` <50C8C47A.1080809-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2012-12-12 17:52 UTC (permalink / raw)
  To: Timur; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 12/11/2012 03:23 PM, Timur wrote:
> Hi. I discovered a problem with USB host mode on a Nexus 7 running
> Android 4.2.x:

Timur,

This mailing list is intended for discussion of the mainline Linux
kernel, rather than NVIDIA's modified (and older) downstream kernel, as
used on shipping Android devices.

Your best bet for support is to report the issue to
linux-tegra-bugs-DDmLM1+adcqXj1p+fO2waQ@public.gmane.org It may help if you've tried the Ubuntu/L4T
install described at:

https://wiki.ubuntu.com/Nexus7

... and reproduced the issue there too; at least some people working on
the downstream kernel do have access to Nexus 7s with that software setup.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ehci-tegra issue with deep sleep
       [not found]     ` <50C8C47A.1080809-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2013-01-03 11:52       ` Timur
       [not found]         ` <50E570F1.4030706-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Timur @ 2013-01-03 11:52 UTC (permalink / raw)
  To: Stephen Warren; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 12.12.2012 18:52, Stephen Warren wrote:
> On 12/11/2012 03:23 PM, Timur wrote:
>> Hi. I discovered a problem with USB host mode on a Nexus 7 running
>> Android 4.2.x:
>
> Timur,
>
> This mailing list is intended for discussion of the mainline Linux
> kernel, rather than NVIDIA's modified (and older) downstream kernel, as
> used on shipping Android devices.
>
> Your best bet for support is to report the issue to
> linux-tegra-bugs-DDmLM1+adcqXj1p+fO2waQ@public.gmane.org It may help if you've tried the Ubuntu/L4T
> install described at:
>
> https://wiki.ubuntu.com/Nexus7
>
> ... and reproduced the issue there too; at least some people working on
> the downstream kernel do have access to Nexus 7s with that software setup.

Hi Stephen,

maybe you remember this brief conversation in December. I found the root 
cause of the reported issue (tegra specific) and I can provide a patch. 
The outcome is stable, externally powered USB host mode for Nexus 7.

Do you happen to know anyone responsible for the Ubuntu Nexus7 kernel? I 
would like to contribute the fix, as I think it would be beneficial to 
that implementation.

Thank you.
Timur

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ehci-tegra issue with deep sleep
       [not found]         ` <50E570F1.4030706-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
@ 2013-01-04 17:33           ` Stephen Warren
       [not found]             ` <50E71272.5090107-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2013-01-04 17:33 UTC (permalink / raw)
  To: Timur; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 01/03/2013 04:52 AM, Timur wrote:
...
> maybe you remember this brief conversation in December. I found the root
> cause of the reported issue (tegra specific) and I can provide a patch.
> The outcome is stable, externally powered USB host mode for Nexus 7.

Isn't USB host mode by definition internally powered, and USB device
mode by definition externally powered? An externally powered USB host
mode sounds quite non-standard. If you allow that mode, how does the
system know whether it should be a host or a device when external power
is applied; it sounds like this new mode completely breaks the ability
to connect the tablet to a PC and use it for Android application
development, or MTP (Media Transfer Protocol) to download pictures/movies.

> Do you happen to know anyone responsible for the Ubuntu Nexus7 kernel? I
> would like to contribute the fix, as I think it would be beneficial to
> that implementation.

Sorry, I don't know what kernel they're using; the best place to ask
would be the Ubuntu project itself.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ehci-tegra issue with deep sleep
       [not found]             ` <50E71272.5090107-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2013-01-07 17:19               ` Timur Mehrvarz
       [not found]                 ` <50EB03A6.9040509-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Timur Mehrvarz @ 2013-01-07 17:19 UTC (permalink / raw)
  To: Stephen Warren; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 01/04/2013 06:33 PM, Stephen Warren wrote:
> On 01/03/2013 04:52 AM, Timur wrote:
> ...
>> maybe you remember this brief conversation in December. I found the root
>> cause of the reported issue (tegra specific) and I can provide a patch.
>> The outcome is stable, externally powered USB host mode for Nexus 7.
> Isn't USB host mode by definition internally powered, and USB device
> mode by definition externally powered? An externally powered USB host
> mode sounds quite non-standard. If you allow that mode, how does the
> system know whether it should be a host or a device when external power
> is applied; it sounds like this new mode completely breaks the ability
> to connect the tablet to a PC and use it for Android application
> development, or MTP (Media Transfer Protocol) to download pictures/movies.
What I am proposing does not result in any loss of original
functionality (ADB, MTP, etc.). Also, the described added functionality
is fully standard when I look at it. No typical PC needs to switch to
battery power, only to connect USB slave devices. You can operate a
Nexus 7 on external power. But in order to connect USB slave devices,
you *have* to switch to internal battery. Not being able to run USB host
mode at all, while using external power, is a serious shortcoming. One
that is only caused by the installed kernel. In December, I was having
this last difficulty: preserving USB host operations through LP0 phases.
But this problem has been solved. Really wanted to clarify this.

>
>> Do you happen to know anyone responsible for the Ubuntu Nexus7 kernel? I
>> would like to contribute the fix, as I think it would be beneficial to
>> that implementation.
> Sorry, I don't know what kernel they're using; the best place to ask
> would be the Ubuntu project itself.
No, I did not ask what kernel they are using.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ehci-tegra issue with deep sleep
       [not found]                 ` <50EB03A6.9040509-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
@ 2013-01-08 22:19                   ` Stephen Warren
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Warren @ 2013-01-08 22:19 UTC (permalink / raw)
  To: Timur Mehrvarz; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 01/07/2013 10:19 AM, Timur Mehrvarz wrote:
> On 01/04/2013 06:33 PM, Stephen Warren wrote:
>> On 01/03/2013 04:52 AM, Timur wrote:
>> ...
>>> maybe you remember this brief conversation in December. I found the root
>>> cause of the reported issue (tegra specific) and I can provide a patch.
>>> The outcome is stable, externally powered USB host mode for Nexus 7.
>> Isn't USB host mode by definition internally powered, and USB device
>> mode by definition externally powered? An externally powered USB host
>> mode sounds quite non-standard. If you allow that mode, how does the
>> system know whether it should be a host or a device when external power
>> is applied; it sounds like this new mode completely breaks the ability
>> to connect the tablet to a PC and use it for Android application
>> development, or MTP (Media Transfer Protocol) to download pictures/movies.
>
> What I am proposing does not result in any loss of original
> functionality (ADB, MTP, etc.). Also, the described added functionality
> is fully standard when I look at it.

IIUC, a system usually determines if it's a USB host or a USB device
based on whether the USB port is being fed with +5v or not; if +5v is
fed from the cable, it's a device and if not it's a host.

In order to allow +5v to be fed in from the cable, but operate in host
mode, isn't the above convention broken?

Also, doesn't feeding power into the device while it operates in host
mode require some kind of non-standard cable in order to inject the power?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-08 22:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 22:23 ehci-tegra issue with deep sleep Timur
     [not found] ` <50C7B250.7020409-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2012-12-12 17:52   ` Stephen Warren
     [not found]     ` <50C8C47A.1080809-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-03 11:52       ` Timur
     [not found]         ` <50E570F1.4030706-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2013-01-04 17:33           ` Stephen Warren
     [not found]             ` <50E71272.5090107-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-07 17:19               ` Timur Mehrvarz
     [not found]                 ` <50EB03A6.9040509-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2013-01-08 22:19                   ` Stephen Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.