Re: Fwd: Re: PXA27x UDC driver GIT repository
Alexander Yurtsev <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, Rodolfo, I have a note on PXA27x_UDC driver: I see that you have marked file-backed storage gadget as working on your wiki page after getting acknowledge from Yuri Tikhonov. It seems that Yuri forgot to mention that the gadget requires some patching to be able to work with the pxa27x_udc driver. Required patch is attached. The patch manually configures gadget endpoints by analogy with the ethernet gadget. It would be good if you add this patch to your pxa27x_udc driver patch for people could get the gadget working without troubles. Regards, Alexander. > On Wed, Sep 05, 2007 at 11:40:10AM +0400, Yuri Tikhonov wrote: > > Hi Rodolfo, > > > > This solution works for me too but I do not see much sense in such a > > modification: my approach clears SST before breaking the for-loop, > your > > approach does this after breaking the for-loop. If something goes > wrong and > > the for-loop comes to its logical end without breaking then SST is > clear, > > so resetting it in your approach does change nothing. Am I missed > something > > ? > > > No, I just clear SST anyway... :) > > However you studied the problem a lot so I apply your patch, thanks > for contributing! > > Ciao, > > Rodolfo ------------------------------------------------------------------------- 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
file_storage_pxa27x_udc.diff
(text/x-patch, 1.4 KB)
The patch manually configures gadget's endpoints for the gadget be able to work with pxa27x_udc driver Signed-off-by: Alexander Yurtsev <[email protected]> diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index ea5a081..9151edb 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3918,20 +3918,29 @@ static int __init fsg_bind(struct usb_gadget *gadget) /* Find all the endpoints we will use */ usb_ep_autoconfig_reset(gadget); - ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc, 0, 0, 0); + ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc, + CONFIG_VALUE, + (int)intf_desc.bInterfaceNumber, + (int)intf_desc.bAlternateSetting); if (!ep) goto autoconf_fail; ep->driver_data = fsg; // claim the endpoint fsg->bulk_in = ep; - ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc, 0, 0, 0); + ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc, + CONFIG_VALUE, + (int)intf_desc.bInterfaceNumber, + (int)intf_desc.bAlternateSetting); if (!ep) goto autoconf_fail; ep->driver_data = fsg; // claim the endpoint fsg->bulk_out = ep; if (transport_is_cbi()) { - ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc, 0, 0, 0); + ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc, + CONFIG_VALUE, + (int)intf_desc.bInterfaceNumber, + (int)intf_desc.bAlternateSetting); if (!ep) goto autoconf_fail; ep->driver_data = fsg; // claim the endpoint