Re: USB device just moves
- From: phil-news-nospam@xxxxxxxx
- Date: 12 Feb 2008 14:53:43 GMT
On Tue, 12 Feb 2008 07:19:31 GMT Tim Roberts <timr@xxxxxxxxx> wrote:
| phil-news-nospam@xxxxxxxx wrote:
|>
|>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.
|
| The "udev" subsystem seems to go a very long way towards solving this
| problem. I believe it would have prevented the issue you describe. Is
| your kernel new enough to support it?
The kernel is new enough ... 2.6.24 (no worry over vmsplice here).
So tell me how it is that "udev" can do better than the kernel itself to
make sure that when the USB device is re-attached that it will always get
exactly the same major/minor device number? I thought that what "udev"
did was automatically make a device node in the name space to refer to
the new major/minor. Remember, this involves an already mounted filesystem
with files still open.
The real culprit in this is the poor design of USB, which follows the poor
design of PC. There should be a hardware layer consistency of addresses
based on where something is plugged in (bus number, controller number, port
number, hub port number, hubbed hub port number, etc). Then on top of that
there should be consistent device ID numbers much like ethernet MAC (but at
least 64 bits). If the same device is plugged back into the same port, no
address should change. Nothing should need to be run to "change it back"
as it should just _be_ the same. If I move a drive from one port to another
that should be handled inside the kernel simply by having an association from
devices as the kernel sees them (major/minor number) to the consistent device
address (the one built into the device, not the port itself).
But since we have a poor hardware design, we have to bend over backwards in
the software to make things work at least reasonably most of the time.
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2008-02-12-0843@xxxxxxxx |
|------------------------------------/-------------------------------------|
.
- Follow-Ups:
- Re: USB device just moves
- From: Tim Roberts
- Re: USB device just moves
- References:
- USB device just moves
- From: phil-news-nospam
- Re: USB device just moves
- From: Tim Roberts
- USB device just moves
- Prev by Date: Mind Control "mailteam" works-- victims work trends
- Next by Date: frame buffer state of the art?
- Previous by thread: Re: USB device just moves
- Next by thread: Re: USB device just moves
- Index(es):
Relevant Pages
|