_qh->maxp = usb_maxpacket(_urb->dev, _urb->pipe, !(usb_pipein(_urb->pipe)));
INIT_LIST_HEAD(&_qh->qtd_list);
INIT_LIST_HEAD(&_qh->qh_list_entry);
- _qh->channel = NULL;
/* FS/LS Enpoint on HS Hub
* NOT virtual root hub */
_qh->do_split = 0;
- /* yk@rk 20100625
- * _urb->dev->tt->hub may be null
- */
- if((_urb->dev->tt)&&(!_urb->dev->tt->hub))
- DWC_PRINT("%s tt->hub null!\n",__func__);
if (((_urb->dev->speed == USB_SPEED_LOW) ||
(_urb->dev->speed == USB_SPEED_FULL)) &&
(_urb->dev->tt) && (_urb->dev->tt->hub)&&
* non-periodic transactions.
*/
int status;
-#ifdef CONFIG_ARCH_RK30
+#if defined(CONFIG_ARCH_RK30) || defined(CONFIG_ARCH_RK3188)
int num_channels;
num_channels = _hcd->core_if->core_params->host_channels;
/* Always start in the inactive schedule. */
list_add_tail(&_qh->qh_list_entry, &_hcd->periodic_sched_inactive);
+ _qh->qh_state = QH_INACTIVE;
/* Reserve the periodic channel. */
_hcd->periodic_channels++;
* appropriate queue.
*/
if (_qh->sched_frame == frame_number) {
- list_move_tail(&_qh->qh_list_entry,
- &_hcd->periodic_sched_ready);
+ //list_move_tail(&_qh->qh_list_entry,
+ // &_hcd->periodic_sched_ready);
+ _qh->qh_state = QH_READY;
} else {
- list_move_tail(&_qh->qh_list_entry,
- &_hcd->periodic_sched_inactive);
+ //list_move_tail(&_qh->qh_list_entry,
+ // &_hcd->periodic_sched_inactive);
+ _qh->qh_state = QH_INACTIVE;
}
}
}
struct urb *urb = _qtd->urb;
-
/*
* Get the QH which holds the QTD-list to insert to. Create QH if it
* doesn't exist.
}
ep->hcpriv = qh;
}
-
- local_irq_save(flags);
+ spin_lock_irqsave(&_dwc_otg_hcd->global_lock, flags);
retval = dwc_otg_hcd_qh_add(_dwc_otg_hcd, qh);
if (retval == 0) {
list_add_tail(&_qtd->qtd_list_entry, &qh->qtd_list);
}
+ spin_unlock_irqrestore(&_dwc_otg_hcd->global_lock, flags);
+
done:
- local_irq_restore(flags);
return retval;
}