Em Domingo 07 Junho 2009, às 19:41:05, Laurent Pinchart escreveu: > Hi Herton, > > On Thursday 04 June 2009 19:23:17 Herton Ronaldo Krzesinski wrote: > > Em Quinta-feira 04 Junho 2009, às 07:41:03, Laurent Pinchart escreveu: > > > Hi Herton, > > > > > > On Wednesday 03 June 2009 23:02:33 Herton Ronaldo Krzesinski wrote: > > > > Fix this by not failing entirely if we have found an invalid format, as > > > > we can still have a valid format. The initial problem and solution > > > > (patch) was debugged and done by Clevo (probably by Michael Wang), > > > > which uses the affected webcam in one of their laptops. I'm forwarding > > > > their fix plus additional code that I noticed to be needed for generic > > > > cases that decrements properly streaming->nformats and checks later if > > > > we really found at least one valid format, and if there were really no > > > > valid formats we make sure then to return with error. > > > > > > What about modifying uvc_parse_streaming() to stop parsing the interface > > > descriptors when it encounters a non CS Interface descriptor instead ? > > > Something like > > > > Yep, it works for me too and it's better since then we don't allocate extra > > memory that we don't use for streaming->format > > > > But your solution stops to count formats at the first buffer[1] != > > CS_INTERFACE, is it possible that CS_INTERFACE and ! CS_INTERFACE are > > mixed? (!= CS_INTERFACE not always the last one) In this case is better to > > continue, like patch below: > > In theory, yes, the device can be as buggy as you want :-) Don't forget that > we're dealing with UVC devices here, so I don't expect buggy devices to be > the > norm. I'd rather apply my patch, as it's less intrusive, and deal with other > buggy devices later if needed.
Yep, for me it's fine also applying the less intrusive approach, lets hope we don't get more buggy ones :) > > Best regards, > > Laurent Pinchart -- []'s Herton _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel