• Roger Quadros's avatar
    usb: gadget: core: fix ->udc_set_speed() logic · 97e133d5
    Roger Quadros authored
    Consider the following case: udc controller supports SuperSpeed.  If we
    first load a HighSpeed gadget followed by a SuperSpeed gadget, the
    SuperSpeed gadget will be limited to HighSpeed as UDC core driver
    doesn't call ->udc_set_speed() in the second case.
    
    Call ->udc_set_speed() unconditionally to fix this issue.
    
    This will also fix the case for dwc3 controller driver when SuperSpeed
    gadget is loaded first and works in HighSpeed only as udc_set_speed()
    was never being called.
    
    Fixes: 6099eca796ae ("usb: gadget: core: introduce ->udc_set_speed() method")
    Cc: <stable@vger.kernel.org> [v4.13+]
    Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    97e133d5
core.c 43 KB