Commit cea8c6ef authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: usb ethernet gadget build fixes on PXA

Build fixes for ethernet gadget on PXA.

From:          Frank Neuber <fn@kernelport.de>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent b8b58a59
...@@ -234,7 +234,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); ...@@ -234,7 +234,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
/* For CDC-incapable hardware, choose the simple cdc subset. /* For CDC-incapable hardware, choose the simple cdc subset.
* Anything that talks bulk (without notable bugs) can do this. * Anything that talks bulk (without notable bugs) can do this.
*/ */
#ifdef CONFIG_USB_GADGET_PXA #ifdef CONFIG_USB_GADGET_PXA2XX
#define DEV_CONFIG_SUBSET #define DEV_CONFIG_SUBSET
#endif #endif
...@@ -2373,6 +2373,7 @@ eth_bind (struct usb_gadget *gadget) ...@@ -2373,6 +2373,7 @@ eth_bind (struct usb_gadget *gadget)
EP_OUT_NAME = ep->name; EP_OUT_NAME = ep->name;
ep->driver_data = ep; /* claim */ ep->driver_data = ep; /* claim */
#if defined(DEV_CONFIG_CDC) || defined(CONFIG_USB_ETH_RNDIS)
/* CDC Ethernet control interface doesn't require a status endpoint. /* CDC Ethernet control interface doesn't require a status endpoint.
* Since some hosts expect one, try to allocate one anyway. * Since some hosts expect one, try to allocate one anyway.
*/ */
...@@ -2386,13 +2387,12 @@ eth_bind (struct usb_gadget *gadget) ...@@ -2386,13 +2387,12 @@ eth_bind (struct usb_gadget *gadget)
"can't run RNDIS on %s\n", "can't run RNDIS on %s\n",
gadget->name); gadget->name);
return -ENODEV; return -ENODEV;
#ifdef DEV_CONFIG_CDC
} else if (cdc) { } else if (cdc) {
control_intf.bNumEndpoints = 0; control_intf.bNumEndpoints = 0;
/* FIXME remove endpoint from descriptor list */ /* FIXME remove endpoint from descriptor list */
#endif
} }
} }
#endif
/* one config: cdc, else minimal subset */ /* one config: cdc, else minimal subset */
if (!cdc) { if (!cdc) {
...@@ -2446,7 +2446,7 @@ eth_bind (struct usb_gadget *gadget) ...@@ -2446,7 +2446,7 @@ eth_bind (struct usb_gadget *gadget)
/* Module params for these addresses should come from ID proms. /* Module params for these addresses should come from ID proms.
* The host side address is used with CDC and RNDIS, and commonly * The host side address is used with CDC and RNDIS, and commonly
* end ups in a persistent config database. * ends up in a persistent config database.
*/ */
get_ether_addr(dev_addr, net->dev_addr); get_ether_addr(dev_addr, net->dev_addr);
if (cdc || rndis) { if (cdc || rndis) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment