PXA27x UDC - serial gadet

Thomi Aurel RUAG A <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <2329AC20AD02EC4E9298F525ED96FC965228D03F0E@RTHUS5524.rintra.ruag.com>
Hello, Rodolfo

I tried your pxa27x_udc driver (found on your PXA27x UDC Homepage) and managed to get
the serial gadget at least compiling and "insmod"-ing without error.

My little tests with "echo" and "cat" on the resulting tty (only linux) were successfull but i know
it is necessary to do further testing (which i don't know actually).

The necessary adaptions are limited to the drivers/usb/gadget/serial.c
and are listed below (i hope the diff is usefull for your needs):

-- DIFF START --
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -1377,20 +1377,29 @@

        usb_ep_autoconfig_reset(gadget);

-       ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc, 0, 0, 0);
+       ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc,
+        (int)gs_acm_config_desc.bConfigurationValue,
+        (int)gs_data_interface_desc.bInterfaceNumber,
+        (int)gs_data_interface_desc.bAlternateSetting);
        if (!ep)
                goto autoconf_fail;
        EP_IN_NAME = ep->name;
        ep->driver_data = ep;   /* claim the endpoint */

-       ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc, 0, 0, 0);
+       ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc,
+        (int)gs_acm_config_desc.bConfigurationValue,
+        (int)gs_data_interface_desc.bInterfaceNumber,
+        (int)gs_data_interface_desc.bAlternateSetting);
        if (!ep)
                goto autoconf_fail;
        EP_OUT_NAME = ep->name;
        ep->driver_data = ep;   /* claim the endpoint */

        if (use_acm) {
-               ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc, 0, 0, 0);
+               ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc,
+          (int)gs_acm_config_desc.bConfigurationValue,
+          (int)gs_control_interface_desc.bInterfaceNumber,
+          (int)gs_control_interface_desc.bAlternateSetting);
                if (!ep) {
                        printk(KERN_ERR "gs_bind: cannot run ACM on %s\n", gadget->name);
                        goto autoconf_fail;
-- DIFF END --
I've done similar steps as Alexander Yurtsev did in his file_storage_pxa27x_udc.diff.

Dring my studies on the usb gadget sources i've wondering why this similar adaptions
of the usb_ep_autoconfig in the usb gadget drivers are necessary. Because i can't see any
impact that a pxa27x_udc driver work or rework would have on the usb gadget drivers (I thought
the udc driver is independent of the usb gadget driver).

Are the usb gadget drivers working on other platforms? If so, i probably fixed a pxa27x specific
problem on the wrong side (conceptually)?

Regards,
Aurel

-------------------------------------------------------------------------
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.