On Mon, Dec 17, 2001 at 07:30:32PM +0000, Riley Williams wrote: > Remember, one of the basic design aims of USB was that the location a > device is plugged in is irrelevant to the user. The Linux USB drivers > need to be totally transparent to where a particular device is plugged > in, otherwise they're essentially useless.
Note that the location is very important, too. It's the only way to distinguish between two devices of the same type - most USB devices don't have a serial number. Assume you have two USB serial ports, and you'll certainly want to make sure which one goes to your modem and which to your UPS. I think it should be made possible to make decisions based on the location, but that the location shouldn't be required. --- What we know of an USB device: 1) Bus location. This is which controller, which hub and which port on the hub the device is connected to. 2) Device vendor id, product id, version. Maybe the whole descriptor set can be used. 3) Device serial number. Some rules that could be used (device unplugged and re-plugged, or suspended and found after wakeup): If 2 and 3 match, we know it is the same device, regardless of 1. If one of 2 and 3 differs, we know it is a different device. If 1 and 2 match, and we don't have 3, we can assume it's the same device. If 1 and 2 match, and 3 differs, it may be a replacement device, so we treat it as if it were the same. Etc. The rules are to be applied top-down, stopping at the one that is describing the situation. Just thoughts. -- Vojtech Pavlik SuSE Labs _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel