On Tue, 12 Feb 2002, Greg KH wrote: > > The driver has all the knowledge to do so - I don't see how the device > > probe loop should know, which AS some driver would like to see on probing. > > Drivers bind on the level of USB device or interface abstraction, not AS. > > Driver bind at the interface abstraction.
Technically yes, of course. However, what about a driver which supports all interfaces of a given device making use of usb_driver_claim_interface in its probe-method? Or a driver that needs to deal with different configurations - calling usb_set_configuration affects all interfaces, they might even (dis-)appear when changing config's. That's what I'd call driver bound to device since it takes over responsibility for the whole device. Anyway, my point was, there is no way a driver could bind to a specific altsetting of an interface hence the usbcore should IMHO never interfere with the drivers handling of interface-altsetting - not during probing and not at any time later. > > I personally don't see any good reason, why usbcore should _ever_ call > > usb_set_interface(). Again, managing AS and/or resetting interfaces is > > IMHO not something that should be done by the usbcore. > > With the exception of usb_reset_device() (which you explain below), I do > not see the usb core calling usb_set_interface() from anywhere. Am I > missing something? Nope, AFAICS. The other one is the SetInterface request wrapper for usbdevfs which just executes the userland request. > > [Removing usb_set_interface() from usb_reset_device()] > > > > Anybody knows good reason why we should not do so? > > No I do not. Work with the mass-storage and other scsi like driver > people to change this if you wish. Well, calling usb_set_interface is not what I would expect to find in usb_reset_device - but it shouldn't hurt for well-behaving devices. What hurts is the recently added special casing for num_altsetting==1 in usb_set_interface which completely disables SetInterface request for all such interfaces. This is in contrast to the USB spec. and might break sane devices. It was introduced as workaround for the broken card readers which apparently die on any SetInterface request. Sancho Dauskardt suggested to drop the usb_set_interface-call from usb_reset_interface as this would solve the issue without breaking other stuff. That's why I like that idea and apparently it should be a NOP anyway. I'll do some more research and thinking before (hopefully) coming up with a suggestion. Martin _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
