I origionally posted this on the -users forum, but Alan Stern mentioned 
I should post this here:

Hello everyone,
Hi everyone not sure if others have already addressed this, or what you 
all think...

Anyways, for a while now, I've been trying to get the ethernet gadget 
driver working on a Cirrus EP9315A development board contains the 
Phillips ISP1581 usb device controller.

The linux distribution Cirrus provides for users to compile and load 
contains linux kernel version 2.6.17 and essentially patches the 
gadget_chips.h file to implement device functionality. The file_storage 
gadget driver works just fine, but the ether gadget driver doesn't.

After modprobing I receive an error:
"bad ep or descriptor."

The error comes from Cirrus' driver for the ISP1581 and i was able to 
track down where the error occurs. In set_ether_config, around line 977 
or so:

static int
set_ether_config (struct eth_dev *dev, gfp_t gfp_flags)
{
   int                    result = 0;
   struct usb_gadget            *gadget = dev->gadget;

#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
   /* status endpoint used for RNDIS and (optionally) CDC */
   if (!subset_active(dev) && dev->status_ep) {
       dev->status = ep_desc (gadget, &hs_status_desc,
                       &fs_status_desc);
       dev->status_ep->driver_data = dev;

       result = usb_ep_enable (dev->status_ep, dev->status);
       if (result != 0) {
           DEBUG (dev, "enable %s --> %d\n",
               dev->status_ep->name, result);
           goto done;
       }
   }
#endif

I think I uncommented the DEBUG code...essentially this call to 
usb_ep_enable is returning an error. I've added some printk's in the ISP 
driver and the ether.c file to figure out where this error occurs. 
Here's essentially the info I'm printing out:

Debugging printk macro. Printk operational.

ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using ep93xx_udc, OUT ep1out-bulk IN ep2in-bulk STATUS ep0in-control
usb0: MAC 7e:8e:b7:3e:3f:3d
usb0: HOST MAC 32:87:cb:1a:a4:14
usb0: RNDIS ready
registered gadget driver 'ether'
/ #
The USB dev is connected to USB host
The USB bus is high speed

The USB dev is connected to USB host
The USB bus is high speed

Values for ep93xx_ep_enable:
,c02d12f8
,0
,1
,80
,0
,10
ep93xx_ep_enable, bad ep or descriptor
Ln: 988, enable ep0in-control --> -22

Does anyone have any advice for running the ether driver with the 
Phillips ISP1581 USB chip. I poked around a little in the archives but 
didn't see anything.

Thanks for any feedback!

-Lorenzo

-------------------------------------------------------------------------
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/
_______________________________________________
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