hcd->saw_irq = 1; 
set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); 
static int hcd_unlink_urb (struct urb *urb, int status){	struct usb_host_endpoint	*ep;	struct usb_hcd			*hcd = NULL;	struct device			*sys = NULL;	unsigned long			flags;	struct list_head		*tmp;	int				retval;	if (!urb)		return -EINVAL;	if (!urb->dev || !urb->dev->bus)		return -ENODEV;	ep = (usb_pipein(urb->pipe) ? urb->dev->ep_in : urb->dev->ep_out)			[usb_pipeendpoint(urb->pipe)];	if (!ep)		return -ENODEV;	/*	 * we contend for urb->status with the hcd core,	 * which changes it while returning the urb.	 *	 * Caller guaranteed that the urb pointer hasn't been freed, and	 * that it was submitted.  But as a rule it can't know whether or	 * not it's already been unlinked ... so we respect the reversed	 * lock sequence needed for the usb_hcd_giveback_urb() code paths	 * (urb lock, then hcd_data_lock) in case some other CPU is now	 * unlinking it.	 */	spin_lock_irqsave (&urb->lock, flags);	spin_lock (&hcd_data_lock);	sys = &urb->dev->dev;	hcd = urb->dev->bus->hcpriv;	if (hcd == NULL) {		retval = -ENODEV;		goto done;	}	/* insist the urb is still queued */	list_for_each(tmp, &ep->urb_list) {		if (tmp == &urb->urb_list)			break;	}	if (tmp != &urb->urb_list) {		retval = -EIDRM;		goto done;	}	/* Any status except -EINPROGRESS means something already started to	 * unlink this URB from the hardware.  So there's no more work to do.	 */	if (urb->status != -EINPROGRESS) {		retval = -EBUSY;		goto done;	}	/* IRQ setup can easily be broken so that USB controllers	 * never get completion IRQs ... maybe even the ones we need to	 * finish unlinking the initial failed usb_set_address()	 * or device descriptor fetch.	 */	if (!hcd->saw_irq && hcd->self.root_hub != urb->dev) {		dev_warn (hcd->self.controller, "Unlink after no-IRQ?  "			"Controller is probably using the wrong IRQ."			"\n");		hcd->saw_irq = 1;	}	urb->status = status;	spin_unlock (&hcd_data_lock);	spin_unlock_irqrestore (&urb->lock, flags);	retval = unlink1 (hcd, urb);	if (retval == 0)		retval = -EINPROGRESS;	return retval;done:	spin_unlock (&hcd_data_lock);	spin_unlock_irqrestore (&urb->lock, flags);	if (retval != -EIDRM && sys && sys->driver)		dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval);	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/8de98402652c01839ae321be6cb3054cf5735d83/hcd.c/clean/drivers/usb/core/hcd.c