On 5/20/07, Alan Stern <[EMAIL PROTECTED]> wrote:
> On Sat, 19 May 2007, Ragner Magalhaes wrote:
>
> > The following series implements USB Composite Gadget Support.
> >
> > [PATCH 1/6] USB gadget driver.
> > [PATCH 2/6] Composite gadget driver.
> > [PATCH 3/6] Composite gadget driver upgrade.
> > [PATCH 4/6] Kconfig modifications for USB Composite gadget support.
> > [PATCH 5/6] Composite File Storage gadget support.
> > [PATCH 6/6] Composite Ether gadget support.
> >
> > The Composite Gadget can handle one or two configurations.
> > When the first usb_function modprobe'ed has two configurations
> > the Composite Gadget will have two configurations, for the
> > other functions modprobe'ed after will be used the selected or
> > standard configuration only, their interfaces will be part
> > of the Composite's Configurations.
> > Then exchanging configs in the Composite will only affect the
> > first function.
> > In case the first modprobe'ed function has only one configure,
> > the Composite Gadget WILL have only one configuration.
> > This behavior is useful when modprobe'ing g_ether as the first
> > usb_function due to the RNDIS and CDC Configurations.
>
> How does this patchset differ from your earlier versions?
>

You has sent for me comments about ep0 complete function, see below:

---

From: Alan Stern

This looks a lot cleaner than your earlier attempts. However in
several places you took out code without adding any sort of
replacement. For example, here:

-static void ep0_complete(struct usb_ep *ep, struct usb_request *req)
-{
-     struct fsg_dev          *fsg = ep->driver_data;
-
-     if (req->actual > 0)
-             dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual);


-     if (req->status || req->actual != req->length)
-             DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
-                             req->status, req->actual, req->length);


-     if (req->status == -ECONNRESET)         // Request was cancelled
-             usb_ep_fifo_flush(ep);
-
-     if (req->status == 0 && req->context)
-             ((fsg_routine_t) (req->context))(fsg);


-}

Your modified driver doesn't call dump_msg(), DBG(), or the function
pointer stored in req->context.
---

Now for specific function request, use own ep0 complete function, e.g.
when it is TYPE_CLASS request.
When it is general request, e.g. DT_DEVICE request, use the
composite's ep0 complete.

I implemented dump_msg() function in the composite layer too.


> Alan Stern
>
>

Best regards,

-- 
Ragner N Magalhães

Instituto Nokia de Tecnologia - INdT
Open Source Mobile Research Center - OSMRC
Linux Kernel Team

E-mail: [EMAIL PROTECTED]
            [EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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