USB device just moves
- From: phil-news-nospam@xxxxxxxx
- Date: 10 Feb 2008 13:59:06 GMT
I had a case today where an external disk drive connected via USB just up
and moved to a new device location. The dmesg log looks like it came loose
on its own and reconnected immediately. But it seems the device name it
had before was not re-usabled and it got a new one. It was a mounted disk
so you can imagine the mess that caused.
This is a good example of how that legacy unix principle of assigning device
names in probe order is still a bad idea. I've complained about it before
Linux even existed. The whole unix principle does so many things right.
But this is one that is not.
Today it is so much more complicated because now things run on the most
chaotic computer architecture ever devised: the PC. So I don't think a
clean solution is likely. I sure don't want to propose a dirty one. So
all I can suggest is to replace the PC itself. And you can just imagine
how hard even that chore would be.
A new clean architecture would have finite and small (but plenty large
enough for the biggest possible machine we cannot yet even imagine) scope
of device addressing. It also needs to be static and consistent. If a
device is plugged in at some given physical location, it will have some
absolute physical hardware address that stays the same as long as it is
in that location. That would be in addition to a permanent fixed logical
address the device itself keeps (like a serial number or like ethernet
has in the form of MAC addresses).
Perhaps the most painful aspect, and illustation of greatest stupidity in
the PC architecture, and one that seems to have been copied in a few other
architectures since then, is the chaos of interrupts that do not have any
association with exactly where they came from. A sane architecture will
always track (in an interrupt controller perhaps) exactly which device(s)
have presented interrupts using the very same absolute device address that
is used to initiate I/O operations. There must not be ambiguity as to
where an interrupt comes from.
It is perhaps better to just eliminate, for the majority of devices, any
sort of device register control and interrupt operation as a design of a
new architecture. Instead, I suggest a message bus based system that is
designed with the new architecture. Anything attached to the architecture
must use that message bus format (all the way from device to OS driver),
even if that means it is translating everything to some external type of
interface. It needs to be a new, clean, and of course open, design.
Maybe our great grandchildren might start actually doing such a design.
Maybe their great grandchildren might enjoy the benefits of it. Clearly
such changes would be a daunting task, especially considering so many of
the special interests devoted to maintaining chaos in the PC architecture
and some others modeled after it.
This whole post should have been on a blog. But I don't have one which
would be where people would expect to see it. Maybe I should create one.
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2008-02-10-0735@xxxxxxxx |
|------------------------------------/-------------------------------------|
.
- Follow-Ups:
- Re: USB device just moves
- From: Tim Roberts
- Re: USB device just moves
- From: Mike
- Re: USB device just moves
- Prev by Date: Re: UUIDs
- Next by Date: Re: USB device problems
- Previous by thread: UUIDs
- Next by thread: Re: USB device just moves
- Index(es):
Relevant Pages
|