if (sl811->periodic_count == 0 && list_empty(&sl811->async)) 
if (sl811->periodic_count == 0 && list_empty(&sl811->async)) 
static irqreturn_t sl811h_irq(struct usb_hcd *hcd, struct pt_regs *regs){	struct sl811	*sl811 = hcd_to_sl811(hcd);	u8		irqstat;	irqreturn_t	ret = IRQ_NONE;	unsigned	retries = 5;	spin_lock(&sl811->lock);retry:	irqstat = sl811_read(sl811, SL11H_IRQ_STATUS) & ~SL11H_INTMASK_DP;	if (irqstat) {		sl811_write(sl811, SL11H_IRQ_STATUS, irqstat);		irqstat &= sl811->irq_enable;	}#ifdef	QUIRK2	/* this may no longer be necessary ... */	if (irqstat == 0 && ret == IRQ_NONE) {		irqstat = checkdone(sl811);		if (irqstat /* && irq != ~0 */ )			sl811->stat_lost++;	}#endif	/* USB packets, not necessarily handled in the order they're	 * issued ... that's fine if they're different endpoints.	 */	if (irqstat & SL11H_INTMASK_DONE_A) {		done(sl811, sl811->active_a, SL811_EP_A(SL811_HOST_BUF), regs);		sl811->active_a = NULL;		sl811->stat_a++;	}#ifdef USE_B	if (irqstat & SL11H_INTMASK_DONE_B) {		done(sl811, sl811->active_b, SL811_EP_B(SL811_HOST_BUF), regs);		sl811->active_b = NULL;		sl811->stat_b++;	}#endif	if (irqstat & SL11H_INTMASK_SOFINTR) {		unsigned index;		index = sl811->frame++ % (PERIODIC_SIZE - 1);		sl811->stat_sof++;		/* be graceful about almost-inevitable periodic schedule		 * overruns:  continue the previous frame's transfers iff		 * this one has nothing scheduled.		 */		if (sl811->next_periodic) {			// ERR("overrun to slot %d\n", index);			sl811->stat_overrun++;		}		if (sl811->periodic[index])			sl811->next_periodic = sl811->periodic[index];	}	/* khubd manages debouncing and wakeup */	if (irqstat & SL11H_INTMASK_INSRMV) {		sl811->stat_insrmv++;		/* most stats are reset for each VBUS session */		sl811->stat_wake = 0;		sl811->stat_sof = 0;		sl811->stat_a = 0;		sl811->stat_b = 0;		sl811->stat_lost = 0;		sl811->ctrl1 = 0;		sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);		sl811->irq_enable = SL11H_INTMASK_INSRMV;		sl811_write(sl811, SL11H_IRQ_ENABLE, sl811->irq_enable);		/* usbcore nukes other pending transactions on disconnect */		if (sl811->active_a) {			sl811_write(sl811, SL811_EP_A(SL11H_HOSTCTLREG), 0);			finish_request(sl811, sl811->active_a,				container_of(sl811->active_a->hep->urb_list.next,					struct urb, urb_list),				NULL, -ESHUTDOWN);			sl811->active_a = NULL;		}#ifdef	USE_B		if (sl811->active_b) {			sl811_write(sl811, SL811_EP_B(SL11H_HOSTCTLREG), 0);			finish_request(sl811, sl811->active_b,				container_of(sl811->active_b->hep->urb_list.next,					struct urb, urb_list),				NULL, -ESHUTDOWN);			sl811->active_b = NULL;		}#endif		/* port status seems weird until after reset, so		 * force the reset and make khubd clean up later.		 */		sl811->port1 |= (1 << USB_PORT_FEAT_C_CONNECTION)				| (1 << USB_PORT_FEAT_CONNECTION);	} else if (irqstat & SL11H_INTMASK_RD) {		if (sl811->port1 & (1 << USB_PORT_FEAT_SUSPEND)) {			DBG("wakeup\n");			sl811->port1 |= 1 << USB_PORT_FEAT_C_SUSPEND;			sl811->stat_wake++;		} else			irqstat &= ~SL11H_INTMASK_RD;	}	if (irqstat) {		if (sl811->port1 & (1 << USB_PORT_FEAT_ENABLE))			start_transfer(sl811);		ret = IRQ_HANDLED;		if (retries--)			goto retry;	}	if (sl811->periodic_count == 0 && list_empty(&sl811->async)) 		sofirq_off(sl811);	sl811_write(sl811, SL11H_IRQ_ENABLE, sl811->irq_enable);	spin_unlock(&sl811->lock);	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/1e9a47b62f7daf5a94fdd74a94dd4e076f44909a/sl811-hcd.c/buggy/drivers/usb/host/sl811-hcd.c