Dmitri wrote:
> 
> Quoting Pete Zaitcev <[EMAIL PROTECTED]>:
> 
> > Guys,
> >
> > I noticed a funny thing... When drivers ask for a pipe to be
> > made up, they often pass an endpoint address with 0x80 bit set.
> > This makes for a pipe with 0x00400000 bit set, which is in the
> > reserved area. It appears not to harm anything, but is annoying
> > in printouts. How about this:
> >
> > --- linux-2.4.13-ac2/include/linux/usb.h      Tue Oct 23 22:02:02 2001
> > +++ linux-2.4.13-ac2-e/include/linux/usb.h    Fri Nov  2 09:37:19 2001
> > @@ -758,7 +758,7 @@
> >
> >  static inline unsigned int __create_pipe(struct usb_device *dev, unsigned int 
>endpoint)
> >  {
> > -     return (dev->devnum << 8) | (endpoint << 15) |
> > +     return (dev->devnum << 8) | ((endpoint & 0xf) << 15) |
> >               ((dev->speed == USB_SPEED_LOW) << 26);
> 
> Total 16 endpoints? Did you mean 0x7f?

Why?  Endpoint is only 4 bits (numbered 0 - 15)
in each direction, so endpoint could be ANDed with
USB_ENDPOINT_NUMBER_MASK (just using a name instead of an
inline constant :).

'Course, drivers shouldn't do what Pete described, but
it's not surprising.

~Randy

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to