Re: gadget file storage with variable maxpacket

ilya <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
hello alan, thank you for replying.
see my response bellow.

On Nov 14, 2007 9:02 AM, Alan Stern <[email protected]> wrote:
> On Tue, 13 Nov 2007, ilya wrote:
>
> > hello,
> >
> > i guess this question is primarily for alan stern, but i
> > do not know his e-mail.
> >
> > 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.
>
> > this
> > will be neccessary for wireless usb, among many other
> > things.
>
> What other things?

wireless usb will be introducing a lot of new control requests, flow
control [ie: stalling endpoints should be the last resort because in wusb
you can NAK and the host will wait for a special device notification to send
a transfer token instead of constantly polling as in wired usb], association,
etc. i think a lot of these things could be handled by the controller driver,
but there are a lot of other stuff that could be standardized and handled
by the "gadget" client side.

what does david brownell think about this?

> > i am not really familiar with writing to disk from
> > kernel space, so any suggestions would be appreciated.
>
> Changing the high-speed maxpacket size wouldn't be hard.  It would
> involve editing the block of code that starts with:
>
>         if (gadget_is_dualspeed(gadget)) {
>
> in the fsg_bind() routine.  It wouldn't affect writing to disk at all.

i figured out how to change the maxpacket in the descriptors, what
i am having problem with is queuing-in of the requests and
writing to disk. the fs gadget tends to queue in requests of size 512
during writes/reads of, for example 64k, to either stay in the page
boundaries or because it rounded down to stay in the block boundaries.
i, on the other hand, will be doing transfers of maxpacket 2048 so
now i either have to concatenate transfers in my code, or tweak fs gadget
to queue in requests with sizes of maxpacket multiples. i had
success doing this for reads but not so much for writes.

i think it would be nicer if fs gadget queued in requests based on
the maxpacket specified for each endpoint by the controller driver
and took care of all the page/block boundaries business during the
actual reading/writing to disk.


thank you for your time.
-- ilya

-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.