| dma_done_ie, 
| le32_to_cpu(dma_done_ie), 
static int net2280_dequeue (struct usb_ep *_ep, struct usb_request *_req){	struct net2280_ep	*ep;	struct net2280_request	*req;	unsigned long		flags;	u32			dmactl;	int			stopped;	ep = container_of (_ep, struct net2280_ep, ep);	if (!_ep || (!ep->desc && ep->num != 0) || !_req)		return -EINVAL;	spin_lock_irqsave (&ep->dev->lock, flags);	stopped = ep->stopped;	/* quiesce dma while we patch the queue */	dmactl = 0;	ep->stopped = 1;	if (ep->dma) {		dmactl = readl (&ep->dma->dmactl);		/* WARNING erratum 0127 may kick in ... */		stop_dma (ep->dma);		scan_dma_completions (ep);	}	/* make sure it's still queued on this endpoint */	list_for_each_entry (req, &ep->queue, queue) {		if (&req->req == _req)			break;	}	if (&req->req != _req) {		spin_unlock_irqrestore (&ep->dev->lock, flags);		return -EINVAL;	}	/* queue head may be partially complete. */	if (ep->queue.next == &req->queue) {		if (ep->dma) {			DEBUG (ep->dev, "unlink (%s) dma\n", _ep->name);			_req->status = -ECONNRESET;			abort_dma (ep);			if (likely (ep->queue.next == &req->queue)) {				// NOTE: misreports single-transfer mode				req->td->dmacount = 0;	/* invalidate */				dma_done (ep, req,					readl (&ep->dma->dmacount),					-ECONNRESET);			}		} else {			DEBUG (ep->dev, "unlink (%s) pio\n", _ep->name);			done (ep, req, -ECONNRESET);		}		req = NULL;	/* patch up hardware chaining data */	} else if (ep->dma && use_dma_chaining) {		if (req->queue.prev == ep->queue.next) {			writel (le32_to_cpu (req->td->dmadesc),				&ep->dma->dmadesc);			if (req->td->dmacount & dma_done_ie)				writel (readl (&ep->dma->dmacount)						| dma_done_ie,					&ep->dma->dmacount);		} else {			struct net2280_request	*prev;			prev = list_entry (req->queue.prev,				struct net2280_request, queue);			prev->td->dmadesc = req->td->dmadesc;			if (req->td->dmacount & dma_done_ie)				prev->td->dmacount |= dma_done_ie;		}	}	if (req)		done (ep, req, -ECONNRESET);	ep->stopped = stopped;	if (ep->dma) {		/* turn off dma on inactive queues */		if (list_empty (&ep->queue))			stop_dma (ep->dma);		else if (!ep->stopped) {			/* resume current request, or start new one */			if (req)				writel (dmactl, &ep->dma->dmactl);			else				start_dma (ep, list_entry (ep->queue.next,					struct net2280_request, queue));		}	}	spin_unlock_irqrestore (&ep->dev->lock, flags);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/320f34595c3cf37d180a087a935c050e4ac0e4d5/net2280.c/clean/drivers/usb/gadget/net2280.c