USB device just moves



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 |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • [PATCH 16/21] 2.6.19 perfmon2 : new i386 files
    ... architecture specific perfmon support. ... PMU description table for all P6-based processors, ... * You should have received a copy of the GNU General Public License ... * called from NMI interrupt handler ...
    (Linux-Kernel)
  • Re: Direct Linux syscalls
    ... > future in it at the design stage because it suffers from a number of quite ... behind the 80x86 family architecture. ... memory management to give the ultimate hardware protection ... > such)...the interrupt system already had to deal with "run-time relocation" ...
    (comp.os.linux.development.apps)
  • Re: Jiffies Reliability
    ... PIT is not the only source of interrupt ticks, ... possible to determine a reliable timestamp and adjust the jiffies value. ... will be HRT timers and, substantially, all timing architecure of linux ... through a new architecture that continuously reprograms timers to fire ...
    (comp.os.linux.development.system)
  • Re: How to manipulate a receiving buffer
    ... more new bytes might come in and code above will lost them. ... interrupt handler only changes head, and the main code only changes ... an 8-bit architecture, where the CPU doesn't have a 16-bit read, ... 'volatile' tells the compiler not to optimize away memory references. ...
    (comp.arch.embedded)
  • =?UTF-8?B?2YHYsdmI2LQg2YXYrNmF2YjYudmHINqp2KfZhdmEINqp2KrYp9io2YfYp9uMINmF2YfZhg==?= =?UTF-8
    ... PTData for Windows Post-Tensioning Design and Analysis Programs ... Construction Business Management A Guide to Contracting for Business ... The Classical Orders of Architecture, Second Edition,[By Robert ... Brownie],Copyright © en US DEPT OF THE INTERIOR ISBN b000q5zftk.pdf ...
    (sci.math.num-analysis)