Re: gadget file storage with variable maxpacket
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 14 Nov 2007, Felipe Balbi wrote: > >> i was wondering how hard would it be to implement the > >> file storage gadget with variable packet size, larger than > >> 512, that could be specified as a module option or better > >> yet use the maxpacket field in the usb_ep structure. > > > > Then where would the maxpacket field in the usb_ep structure get > > initialized in the first place? A module option would be possible. > > wouldn't it shit up usb specs ? No. > maxpacket field should be static for a vendorid:productid pair. Not true at all. For one thing, there can be multiple releases with different bcdDevice values, and nobody would expect them all to have exactly the same maxpacket values. For another, nothing in the USB spec says that maxpacket values have to be static for a particular product. There's nothing wrong with disconnecting and then re-enumerating with different values. Shucks, there's not even anything wrong with having different maxpacket values in different altsettings. > Maybe declaring it the biggest possible packet and > treating/creating/sending > usb packets with different sizes internally would look better for usb-if ? No it wouldn't. Consider that the biggest possible packet for wireless USB is larger than the biggest possible packet for wired USB. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel