On Wed, Mar 09, 2011 at 07:44:01AM -0800, Greg KH wrote: > On Wed, Mar 09, 2011 at 10:33:01AM -0500, Elly Jones wrote: > > On Tue, Mar 08, 2011 at 03:10:46PM -0800, Greg KH wrote: > > > On Tue, Mar 08, 2011 at 05:53:08PM -0500, Elly Jones wrote: > > > > As I understand it, gregkh rewrote Qualcomm's GPLed QCSerial2k driver to produce > > > > qcserial.c. Since Qualcomm just released Gobi 3000 drivers under the GPL, I've > > > > been working on hacking qcserial.c to support Gobi 3000 as well as 2000. > > > > However, I don't understand the reasoning for one of the changes in the > > > > rewrite. > > > > > > <snip> > > > > > > > I don't understand why we need the extra test against bNumEndpoints and > > > > usb_endpoint_is_bulk_{in,out} here. Can anyone shed any light? > > > > > > Did you look at the git history for this driver? It will show you > > > exactly why this change was made, and who made it. > > > > I looked, but was not enlightened. The driver was added by you on Feb 17 2009, > > as part of commit a78b42824dd7c2b40d72fb01f1b1842f7e845f3a; the message for that > > commit says "Cleaned up the probe logic to make a bit more sense". Since then, > > that code has been refactored (by Anssi Hannula). The code I'm asking about was > > present in the very first commit made to this driver. > > Ah, sorry, I thought it was added by Anssi's commit, you are correct. > > > > After looking at that, if you have further questions, please let us > > > know. > > > > I still do not understand why the test for usb_endpoint_is_bulk_{in,out} is > > necessary, when it wasn't in the original qualcomm driver (and isn't in their > > new gobi3k serial driver). I feel like I must have missed something obvious, but > > I cannot see what it is. > > I think I had some devices where this check was required to be made, > otherwise it was picking up the wrong interface. It was needed to get > something to work properly, sorry if I can't recall the exact model it > was done for, that was a long time ago that I rewrote it. S'ok. > Does this code somehow cause you problems with your device? The check > should be safe for you, right? Yeah, it's perfectly safe; I was just wondering if it was important, since I'm about to send up a patch to add Gobi 3000 support to qcserial.c and the qualcomm gobi 3000 driver doesn't have that check either. > thanks, > > greg k-h -- Elly -- 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