/* might_sleep (); if (hcd->driver->endpoint_disable){ hcd->driver->endpoint_disable (hcd, ep); } }  */
int usb_hcd_link_urb_to_ep(struct hc_gen_dev *hcd, struct urb *urb)
/* might_sleep (); if (hcd->driver->endpoint_disable){ hcd->driver->endpoint_disable (hcd, ep); } }  */
int usb_hcd_link_urb_to_ep(struct hc_gen_dev *hcd, struct urb *urb)
{
    int rc = 0;
    int flags;
    flags = hal_spin_lock_irqsave(&gen_hcd_lock);
    if (HC_GEN_DEV_IS_RUNNING(hcd->state))
    {
        list_add_tail(&(urb->urb_list), &(urb->ep->urb_list));
    }
    else
    {
        rc = -1;
    }
    hal_spin_unlock_irqrestore(&gen_hcd_lock, flags);
    return rc;
}