On Thu, Jan 21, 2021 at 01:19:54PM -0600, Pete Zaitcev wrote: > On Mon, 18 Jan 2021 11:31:17 -0500 > Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > > Would it be practical simply to skip the usb_set_interface() call > > whenever alts is 0? After all, devices use altsetting 0 by default; it > > shouldn't be necessary to tell them to do so. > > Is it possible to bind and unbind the driver without enumeration, and > thus inherit a non-zero altsetting? In theory, yes. But the only way it could happen is if either the driver itself or a userspace program installed the nonzero altsetting. > I'm also concerned about regressions. This is a legacy class driver, > only used where CUPS is not applicable, mostly with truly ancient > devices. So yes, setting a zero altsetting after enumeration should > be unnecessary. But you never know with the old firmware. True, although I seriously doubt anyone would have written firmware that required a Set-Interface request for initialization. Particularly if the interface has only one altsetting. How about skipping the call whenever the interface has only one altsetting? Alan Stern