qh = uhci_alloc_qh(uhci, urb->dev); 
qh = uhci_alloc_qh(uhci); 
static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, struct urb *eurb){	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;	struct uhci_td *td;	struct uhci_qh *qh, *skelqh;	unsigned long destination, status;	int maxsze = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));	int len = urb->transfer_buffer_length;	dma_addr_t data = urb->transfer_dma;	/* The "pipe" thing contains the destination in bits 8--18 */	destination = (urb->pipe & PIPE_DEVEP_MASK) | USB_PID_SETUP;	/* 3 errors */	status = TD_CTRL_ACTIVE | uhci_maxerr(3);	if (urb->dev->speed == USB_SPEED_LOW)		status |= TD_CTRL_LS;	/*	 * Build the TD for the control request setup packet	 */	td = uhci_alloc_td(uhci, urb->dev);	if (!td)		return -ENOMEM;	uhci_add_td_to_urb(urb, td);	uhci_fill_td(td, status, destination | uhci_explen(7),		urb->setup_dma);	/*	 * If direction is "send", change the packet ID from SETUP (0x2D)	 * to OUT (0xE1).  Else change it from SETUP to IN (0x69) and	 * set Short Packet Detect (SPD) for all data packets.	 */	if (usb_pipeout(urb->pipe))		destination ^= (USB_PID_SETUP ^ USB_PID_OUT);	else {		destination ^= (USB_PID_SETUP ^ USB_PID_IN);		status |= TD_CTRL_SPD;	}	/*	 * Build the DATA TD's	 */	while (len > 0) {		int pktsze = len;		if (pktsze > maxsze)			pktsze = maxsze;		td = uhci_alloc_td(uhci, urb->dev);		if (!td)			return -ENOMEM;		/* Alternate Data0/1 (start with Data1) */		destination ^= TD_TOKEN_TOGGLE;			uhci_add_td_to_urb(urb, td);		uhci_fill_td(td, status, destination | uhci_explen(pktsze - 1),			data);		data += pktsze;		len -= pktsze;	}	/*	 * Build the final TD for control status 	 */	td = uhci_alloc_td(uhci, urb->dev);	if (!td)		return -ENOMEM;	/*	 * It's IN if the pipe is an output pipe or we're not expecting	 * data back.	 */	destination &= ~TD_TOKEN_PID_MASK;	if (usb_pipeout(urb->pipe) || !urb->transfer_buffer_length)		destination |= USB_PID_IN;	else		destination |= USB_PID_OUT;	destination |= TD_TOKEN_TOGGLE;		/* End in Data1 */	status &= ~TD_CTRL_SPD;	uhci_add_td_to_urb(urb, td);	uhci_fill_td(td, status | TD_CTRL_IOC,		destination | uhci_explen(UHCI_NULL_DATA_SIZE), 0);	qh = uhci_alloc_qh(uhci, urb->dev);	if (!qh)		return -ENOMEM;	urbp->qh = qh;	qh->urbp = urbp;	uhci_insert_tds_in_qh(qh, urb, UHCI_PTR_BREADTH);	/* Low-speed transfers get a different queue, and won't hog the bus.	 * Also, some devices enumerate better without FSBR; the easiest way	 * to do that is to put URBs on the low-speed queue while the device	 * is in the DEFAULT state. */	if (urb->dev->speed == USB_SPEED_LOW ||			urb->dev->state == USB_STATE_DEFAULT)		skelqh = uhci->skel_ls_control_qh;	else {		skelqh = uhci->skel_fs_control_qh;		uhci_inc_fsbr(uhci, urb);	}	if (eurb)		uhci_append_queued_urb(uhci, eurb, urb);	else		uhci_insert_qh(uhci, skelqh, urb);	return -EINPROGRESS;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2532178a68b5ce4e421d50ea1b1dcc0a1359f19d/uhci-q.c/buggy/drivers/usb/host/uhci-q.c