> On Mon, 24 Jan 2011, Martin Mueller wrote: > > > Hi, > > > > we have a USB device with multiple configurations and need the second > > configuration to be set without the first to be set before. As the > > first configuration describes a class driver "generic.c" will switch > > to it very early. Switching it to the second configuration through > > unusual_devs.h or udev is too late and will take the device extra > > time to switch from configuration 1->2. Is there a way to make USB > > switch to configuration 2 other than changing usb/core/generic.c? > > To answer the original question: There is a way to do this. It's not > easy and you probably won't want to use it. > > You have to know in advance which hub and which port the device will be > plugged into. Then you have to have a userspace program which opens > the hub device's usbfs file and issues a USBDEVFS_CLAIM_PORT ioctl for > that port. When the device is plugged in, generic.c won't set any > configuration; the user program can select a config by writing to > /sys/bus/usb/devices/.../bConfigurationValue. This puts some hardware dependency that will make it less convenient as we will have to set the configuration "by userland" for other devices also. > Apart from this, there is no way to prevent generic.c from installing > whichever config it chooses. However, if you're serious enough about > this, you could add a new flag to include/linux/usb/quirks.h (something > like USB_QUIRK_DONT_CONFIGURE) and put an entry for this device in > drivers/usb/core/quirks.c. We tested that apporach and will use it. Thanks! Martin -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html