> 1) After having success with the SetInterface request we do > > dev->toggle[0] = 0; /* 9.1.1.5 says to do this */ > dev->toggle[1] = 0; > > Well, as the comment suggests, according to 9.1.1.5 we have to reset the > toggles - but only "with endpoints in the affected interfaces". The above > code however resets the toggles for _all_ endpoints, regardless whether > they belong to the interface which we have just set or not.
Good point. Got patch? :) Likely that bug wasn't noticed before since because many non-iso devices only have one interface, and many drivers only use that call during probe(), where the toggles have already been reset. (And ISO doesn't care about toggle, as I recall, since it's there to force retries and ISO doesn't retry.) > 2) Recently in one of the 2.4.18-pre series the following modification > went into usb_set_interface(): > ... > Since the SetInterface request basically implies a reset of the affected > endpoints it might be required nevertheless. IMHO the request should (at > least) be sent to the device to give it a chance to act as intended. > > * Another point is the toggle reset. If the device comes with full support > for SetInterface we need to reset the toggles, no doubt. If it doesn't, ... Good point. Right now that code acts as if the caller should expect toggles to have been reset whenever it succeeds ... which is a NOP when it's called during initial probe, and might matter otherwise. > Hence I tend to suggest not to add any special handling for this 9.4.10 > optional behavior in usbcore and let the individual drivers handle this. > A simple improved error test in the driver [... deleted ...] > would do the job and having this duplicated in several drivers shouldn't > be worth the trouble, IMHO. Plausible, but we'd need updates for some drivers to go with such a change. And it won't affect (most) calls during probe(). In fact as it stands, I think this area needs some work because the device probe loop during enumeration isn't actually telling devices what altsetting to use, if it's anything other than the default after setting the configuration... - Dave _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
