Re: Flames over -- Re: Which is simpler?
From: Olivier Galibert
Date: Mon Feb 20 2006 - 13:42:25 EST
On Mon, Feb 20, 2006 at 01:20:23PM -0500, Phillip Susi wrote:
> I'm not all that familiar with USB, but I'd imagine it is somewhat like
> I2C/SMBUS: each device has a descriptor block that contains information
> about itself. This is going to be unique for any given device.
That one of the problems, there are no reliable serial numbers or
things of the kind. It all becomes heuristics (model name, capacity,
partitioning, actual contents...) which kinda suck to have in kernel
space.
> The host controller begins by querying the broadcast address, and
> all unconfigured devices respond.
If I understand USB correctly, it's all point-to-point, there is no
broadcast going on. For enumeration purposes hubs are not
transparent, and ports are separated. But I wouldn't rely on the
ports numbers on hubs to stay constant w.r.t the physical ports. I
don't think it's required.
> Because of this, given the same hardware on the bus, the same
> enumeration will happen every time, and the host can assign whatever
> address it wants to each device should it choose to do so rather than
> just assign them in ascending order.
Since it's an hotplug bus, enumeration before suspend happened as the
devices were plugged in. So the order a reboot enumeration will see
them is unknown in practice.
It may be fixable by storing some kind of physical address in the
tree, but losing a filesystem because you replugged the usb drive in
the wrong physical port between suspend and resume would be annoying.
And I don't know how stable the "physical" positions are in the first
place.
OG.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/