/* This function is the callback function of hub's int endpoint, it is invoked when data comes. */
static void rt_usb_hub_irq(void *context)
/* This function is the callback function of hub's int endpoint, it is invoked when data comes. */
static void rt_usb_hub_irq(void *context)
{
    upipe_t pipe; 
    uifinst_t ifinst;
    uhubinst_t uhub;
    int timeout = 100;
    RT_ASSERT(context != RT_NULL);
    pipe = (upipe_t)context;
    ifinst = pipe->ifinst;
    uhub = (uhubinst_t)ifinst->user_data;
    if(pipe->status != UPIPE_STATUS_OK)
    {
        rt_kprintf("hub irq error\n");
        return;
    }
    rt_usb_hub_port_change(uhub);
    rt_kprintf("hub int xfer...\n");
     RT_ASSERT(pipe->ifinst->uinst->hcd != RT_NULL);
    rt_usb_hcd_int_xfer(ifinst->uinst->hcd, pipe, uhub->buffer, 
        pipe->ep.wMaxPacketSize, timeout);
}