On Wed, May 03, 2006 at 12:53:21PM -0700, Pete Zaitcev wrote:
> On Wed, 3 May 2006 12:55:49 -0400, Glenn Maynard <[EMAIL PROTECTED]> wrote:
> 
> > int get_us_type(const struct us_data *us)
> > {
> >     // flags that don't indicate that a device won't work with UB:
> >     int permitted_flags = US_FL_FIX_CAPACITY;
> >     if((us->flags & ~permitted_flags) != 0)
> >         return USB_US_TYPE_STOR;
> > 
> >     if(us->unusual_dev->initFunction != NULL)
> >         return USB_US_TYPE_STOR;
> >     return 0;
> > }
> 
> I don't think this is correct, because it makes all devices with
> unusual transports biasable.

I wasn't sure about that part; for example, the "Vivicam 35Xx" entry
forces US_SC_SCSI, US_PR_BULK (which seems to imply the entry on the
device is wrong), but that entry was set to 0, not USB_US_TYPE_STOR.

> I actually attempted to write a functions like the above, but boggled
> in the details. But by all means, have a go at exploring it. We aren't
> applying the patch I posted just yet, it's only an RFC.

If it boggled you, then I should stay away.  I was just interested in
the rationale; in my experience, adding a flag to a big table like that
is adding a lot of opportunity for error compared to doing things
programmatically.

-- 
Glenn Maynard


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to