ChangeSet 1.1455.1.36, 2003/07/16 10:12:14-07:00, david-b@pacbell.net [PATCH] USB: ethernet gadget, another pxa update - #ifdefs out some code that never runs on the pxa - catches "alloc_etherdev Jihad" changes I somehow missed drivers/usb/gadget/ether.c | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff -Nru a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c --- a/drivers/usb/gadget/ether.c Thu Jul 17 17:03:39 2003 +++ b/drivers/usb/gadget/ether.c Thu Jul 17 17:03:39 2003 @@ -854,8 +854,8 @@ #ifndef DEV_CONFIG_CDC if (result == 0) { - netif_carrier_on (&dev->net); - if (netif_running (&dev->net)) + netif_carrier_on (dev->net); + if (netif_running (dev->net)) eth_start (dev, GFP_ATOMIC); } #endif /* !CONFIG_CDC_ETHER */ @@ -1138,6 +1138,17 @@ value = eth_set_config (dev, ctrl->wValue, GFP_ATOMIC); spin_unlock (&dev->lock); break; +#ifdef CONFIG_USB_ETH_PXA2XX + /* PXA UDC prevents us from using SET_INTERFACE in normal ways. + * And it hides GET_CONFIGURATION and GET_INTERFACE too. + */ + case USB_REQ_SET_INTERFACE: + spin_lock (&dev->lock); + value = eth_set_config (dev, DEV_CONFIG_VALUE, GFP_ATOMIC); + spin_unlock (&dev->lock); + break; + +#else /* hardware that that stays out of our way */ case USB_REQ_GET_CONFIGURATION: if (ctrl->bRequestType != USB_DIR_IN) break; @@ -1204,6 +1215,7 @@ : 0, value = min (ctrl->wLength, (u16) 1); break; +#endif #ifdef DEV_CONFIG_CDC case CDC_SET_ETHERNET_PACKET_FILTER: @@ -1424,7 +1436,7 @@ if (skb) dev_kfree_skb_any (skb); - if (!netif_running (&dev->net)) { + if (!netif_running (dev->net)) { clean: usb_ep_free_request (dev->out_ep, req); req = 0;