From: David Brownell <david-b@pacbell.net>
To: linux-usb-devel@lists.sourceforge.net
Cc: David Liontooth <liontooth@cogweb.net>, Greg KH <greg@kroah.com>,
Andrew Morton <akpm@osdl.org>,
Alan Stern <stern@rowland.harvard.edu>,
linux-kernel@vger.kernel.org
Subject: Re: [linux-usb-devel] USB devices fail unnecessarily on unpowered hubs
Date: Thu, 1 Jun 2006 18:53:30 -0700 [thread overview]
Message-ID: <200606011853.31277.david-b@pacbell.net> (raw)
In-Reply-To: <447F8057.4000109@cogweb.net>
On Thursday 01 June 2006 5:03 pm, David Liontooth wrote:
>
> However, obeying the USB power rules is not an end in itself -- the
> relevant question is the minimum power the device requires to operate
> correctly and without damage.
We don't know the minimum, or much care about it since the minimum is
generally not what gets drawn.
We know the maximum, which is declared in the configuration descriptor.
And we don't know how much of that maximum a given device uses at any
given moment ... ergo, power budgeting assumes the worst case.
> The MaxPower value does not appear to be a reliable index of this. My
> USB stick has a MaxPower value of 178mA and works flawlessly off an
> unpowered hub.
So you're saying that four of those can work off the same hub? Or
just that one of them can draw two ports' worth of current, because
of the fact that current-limiting is usually on the upstream link,
not individual downstream ones? (If indeed there is current limiting
and/or overcurrent handling in that hub ...) Try that experiment,
and put four on one hub ... now write critical data to all of them
at the same time.
> What are the reasons not to do this? What happens if a USB stick is
> underpowered to one unit? Nothing? Slower transmission? Data loss? Flash
> memory destruction? If it's just speed, it's a price well worth paying.
You mis-understand what's going on. There's a power budget, and if
it gets exceeded then "overcurrent" conditions can happen ... leading
to errors, disconnection, data loss, and yes potentially even memory
destruction; those are all device-specific failure modes, which are
by definition out-of-spec.
The reason to enforce the power budget is that devices guarantee they'll
behave to spec if they can draw that much current. And if they can't
draw enough current, all those rude failure modes happen. Devices
enter brown-out modes if you're lucky, or maybe the hub will cleanly shut
things down before much nastiness happens. The budget is analagous
to a circuit breaker; exceed it and things shut off, which is safer
than most alternatives.
> This is a great opportunity for a small exercise in empathy, utilizing
> that little long-neglected mirror neuron.
Exactly. Preventing random glitchey failure modes makes everyone's
experience a lot better. It's the same reason to fix driver races;
they may not happen all that often, but when they do happen the
result can be disastrous.
- Dave
next prev parent reply other threads:[~2006-06-02 1:53 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 9:18 USB devices fail unnecessarily on unpowered hubs David Liontooth
2006-05-30 20:01 ` Pavel Machek
2006-06-03 9:29 ` Oliver Neukum
2006-06-05 14:32 ` [linux-usb-devel] " David Brownell
2006-06-06 7:43 ` Oliver Neukum
2006-06-08 7:01 ` Pavel Machek
2006-06-08 8:34 ` [PATCH] limit power budget on spitz Pavel Machek
2006-06-08 8:50 ` Richard Purdie
2006-06-08 9:02 ` Pavel Machek
2006-06-08 9:22 ` Richard Purdie
2006-06-08 17:09 ` Russell King
2006-06-08 18:26 ` David Brownell
2006-06-08 20:06 ` Richard Purdie
2006-06-08 20:38 ` [linux-usb-devel] " David Brownell
2006-06-08 21:22 ` Richard Purdie
2006-06-08 21:40 ` David Brownell
2006-06-08 21:49 ` Richard Purdie
2006-06-08 23:44 ` David Brownell
2006-06-09 1:25 ` Nicolas Pitre
2006-06-09 2:03 ` David Brownell
2006-06-09 2:34 ` Nicolas Pitre
2006-06-01 10:01 ` USB devices fail unnecessarily on unpowered hubs Andrew Morton
2006-06-01 11:42 ` Daniel Drake
2006-06-01 14:58 ` Alan Stern
2006-06-01 15:09 ` linux-os (Dick Johnson)
2006-06-01 15:23 ` Lennart Sorensen
2006-06-01 21:39 ` Dagfinn Ilmari Mannsåker
2006-06-01 15:53 ` Oliver Neukum
2006-06-01 17:24 ` linux-os (Dick Johnson)
2006-06-01 16:57 ` Alan Stern
2006-06-01 16:43 ` [linux-usb-devel] " Greg KH
2006-06-02 0:03 ` David Liontooth
2006-06-02 1:53 ` David Brownell [this message]
2006-06-02 7:12 ` [linux-usb-devel] " Oliver Neukum
2006-06-02 15:11 ` Alan Stern
2006-06-02 19:49 ` David Liontooth
2006-06-01 16:59 ` Andrew Morton
2006-06-01 17:08 ` Alan Stern
2006-06-01 17:34 ` Mark Lord
2006-06-01 17:47 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200606011853.31277.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=liontooth@cogweb.net \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox