set_ether_config (struct eth_dev *dev, int gfp_flags) 
set_ether_config (struct eth_dev *dev, unsigned gfp_flags) 
set_ether_config (struct eth_dev *dev, int gfp_flags){	int					result = 0;	struct usb_gadget			*gadget = dev->gadget;	/* 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;		}	}	dev->in = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc);	dev->in_ep->driver_data = dev;	dev->out = ep_desc (dev->gadget, &hs_sink_desc, &fs_sink_desc);	dev->out_ep->driver_data = dev;	/* With CDC,  the host isn't allowed to use these two data	 * endpoints in the default altsetting for the interface.	 * so we don't activate them yet.  Reset from SET_INTERFACE.	 *	 * Strictly speaking RNDIS should work the same: activation is	 * a side effect of setting a packet filter.  Deactivation is	 * from REMOTE_NDIS_HALT_MSG, reset from REMOTE_NDIS_RESET_MSG.	 */	if (!cdc_active(dev)) {		result = usb_ep_enable (dev->in_ep, dev->in);		if (result != 0) {			DEBUG(dev, "enable %s --> %d\n", 				dev->in_ep->name, result);			goto done;		}		result = usb_ep_enable (dev->out_ep, dev->out);		if (result != 0) {			DEBUG (dev, "enable %s --> %d\n", 				dev->in_ep->name, result);			goto done;		}	}done:	if (result == 0)		result = alloc_requests (dev, qlen (gadget), gfp_flags);	/* on error, disable any endpoints  */	if (result < 0) {		if (!subset_active(dev))			(void) usb_ep_disable (dev->status_ep);		dev->status = NULL;		(void) usb_ep_disable (dev->in_ep);		(void) usb_ep_disable (dev->out_ep);		dev->in = NULL;		dev->out = NULL;	} else	/* activate non-CDC configs right away	 * this isn't strictly according to the RNDIS spec	 */	if (!cdc_active (dev)) {		netif_carrier_on (dev->net);		if (netif_running (dev->net)) {			spin_unlock (&dev->lock);			eth_start (dev, GFP_ATOMIC);			spin_lock (&dev->lock);		}	}	if (result == 0)		DEBUG (dev, "qlen %d\n", qlen (gadget));	/* caller is responsible for cleanup on error */	return result;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/5db539e49fc7471e23bf3c94ca304f008cb7b7f3/ether.c/clean/drivers/usb/gadget/ether.c