On Fri, Sep 05, 2003 at 10:06:15AM -0400, Alan Stern wrote: > Greg et al. > > I'm considering adding more error checking to the descriptor parsing > routines in core/config.c. Especially I want to sort the interface > pointers in order by bInterfaceNumber and sort the altsettings for each > interface by bAlternateSetting -- since the device isn't necessarily going > to transmit them in numerical order.
Hm, that's a nice goal, but nothing I want to see happen before 2.6.0 comes out. Is there a _real_ reason you want to sort the interfaces? > But doing that raises the possibilities that some interface descriptor > might have bInterfaceNumber not in the range 0..(bNumInterfaces-1), or > there might be two descriptors with the same bInterfaceNumber and > bAlternateSetting values, or there might not be any descriptors for a > particular bInterfaceNumber/bAlternateSetting combination. Checking for > these things is important, since the mere act of plugging in a device with > descriptor errors like this might crash the kernel. > > The question is, what should the code do when it encounters these sorts > of errors? Die a horrible death and blame the manufacturer for making a broken device :) Seriously, if a device doesn't meet the spec, we don't have to work with it. That being said, it might be nice if we do catch such problems that we at least tell the user about them and then just abort adding the device. thanks, greg k-h ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel