/* This function will do USB_REQ_SET_FEATURE request for the device instance to set feature of the hub port. */
rt_err_t rt_usb_hub_set_port_feature(uhubinst_t uhub, rt_uint16_t port, rt_uint16_t feature)
/* This function will do USB_REQ_SET_FEATURE request for the device instance to set feature of the hub port. */
rt_err_t rt_usb_hub_set_port_feature(uhubinst_t uhub, rt_uint16_t port, rt_uint16_t feature)
{
    struct ureqest setup;
    int timeout = 100;
    RT_ASSERT(uhub != RT_NULL);
    if(uhub->is_roothub)
    {
        rt_usb_hcd_hub_control(uhub->hcd, port, RH_SET_PORT_FEATURE, 
            (void*)feature);
        return RT_EOK;
    }
    setup.request_type = USB_REQ_TYPE_DIR_OUT | USB_REQ_TYPE_CLASS | 
        USB_REQ_TYPE_OTHER;
    setup.request = USB_REQ_SET_FEATURE;
    setup.index = port;
    setup.length = 0;
    setup.value = feature;
    if(rt_usb_hcd_control_xfer(uhub->hcd, uhub->self, &setup, RT_NULL, 0, 
        timeout) == 0) return RT_EOK;
    else return -RT_FALSE;        
}