Re: [linux-usb-devel] Re: [PATCH] USB changes for 2.5.58

Linus Torvalds
2003-01-16T21:41:40Z

In article <b073ja$12i$1@penguin.transmeta.com>,
Linus Torvalds <torvalds@transmeta.com> wrote:
>
>When the USB storage device is unplugged, the device should be
>unregistered. It should be _gone_. It isn't sleeping, it's dead. It's
>an ex-device.

As a follow-up on my rant: if people want reliable static naming over
removal/reinsertion of a device, we actually already have exactly that,
in user space. Using the hotplug agents.

There's a mostly unrelated problem we have from a kernel perspective
which is a device that is actually in use when the disconnect happens -
say as a part of a sleep sequence (which will cause a forced disconnect/
reconnect event).

That's a generic hotplug issue, and still should not be a reason for
trying to (on a driver level) keep track of devices that are gone. It
should really be up to upper layers to be able to re-associate things
properly, since doing it on a driver level simply isn't even possible in
the generic case.

Linus