On Thu, 21 Aug 2003, David Brownell wrote:
(I've seen some vendor protocols that don't use all the SETUP packet bytes the same way that standard requests do, so wLength isn't necessarily relevant here.)
Hmm. So maybe this part of my patch submitted earlier today (as85) is wrong?
+ if (urb->transfer_buffer_length != le16_to_cpu(setup->wLength)) + return -EMSGSIZE;
I was going to make that comment, yes.
What about this part:
+ if (urb->transfer_buffer_length > 0 && + (setup->bRequestType & USB_DIR_IN)) { + urb->pipe = pipe |= USB_DIR_IN; + is_out = 0; + } else { + urb->pipe = pipe &= ~USB_DIR_IN; + is_out = 1; + }
If the setup packet is being used in a nonstandard way then neither of these should be included.
I think bRequestType can't be changed; it's what says it's a vendor type request, after all. But rather than an automagic fixup, I'd just return an error. You can't know which part was wrong.
- Dave
Alan Stern
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
