WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT); 
WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT && udev->state != USB_STATE_NOTATTACHED); 
hcd_endpoint_disable (struct usb_device *udev, struct usb_host_endpoint *ep){	struct usb_hcd		*hcd;	struct urb		*urb;	hcd = udev->bus->hcpriv;	WARN_ON (!HC_IS_RUNNING (hcd->state) && hcd->state != HC_STATE_HALT);	local_irq_disable ();	/* FIXME move most of this into message.c as part of its	 * endpoint disable logic	 */	/* ep is already gone from udev->ep_{in,out}[]; no more submits */rescan:	spin_lock (&hcd_data_lock);	list_for_each_entry (urb, &ep->urb_list, urb_list) {		int	tmp;		/* another cpu may be in hcd, spinning on hcd_data_lock		 * to giveback() this urb.  the races here should be		 * small, but a full fix needs a new "can't submit"		 * urb state.		 * FIXME urb->reject should allow that...		 */		if (urb->status != -EINPROGRESS)			continue;		usb_get_urb (urb);		spin_unlock (&hcd_data_lock);		spin_lock (&urb->lock);		tmp = urb->status;		if (tmp == -EINPROGRESS)			urb->status = -ESHUTDOWN;		spin_unlock (&urb->lock);		/* kick hcd unless it's already returning this */		if (tmp == -EINPROGRESS) {			tmp = urb->pipe;			unlink1 (hcd, urb);			dev_dbg (hcd->self.controller,				"shutdown urb %p pipe %08x ep%d%s%s\n",				urb, tmp, usb_pipeendpoint (tmp),				(tmp & USB_DIR_IN) ? "in" : "out",				({ char *s; \				 switch (usb_pipetype (tmp)) { \				 case PIPE_CONTROL:	s = ""; break; \				 case PIPE_BULK:	s = "-bulk"; break; \				 case PIPE_INTERRUPT:	s = "-intr"; break; \				 default: 		s = "-iso"; break; \				}; s;}));		}		usb_put_urb (urb);		/* list contents may have changed */		goto rescan;	}	spin_unlock (&hcd_data_lock);	local_irq_enable ();	/* synchronize with the hardware, so old configuration state	 * clears out immediately (and will be freed).	 */	might_sleep ();	if (hcd->driver->endpoint_disable)		hcd->driver->endpoint_disable (hcd, ep);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d5926ae7a827bdd06b588ffbc56fd4525cd9214a/hcd.c/buggy/drivers/usb/core/hcd.c