Loading arch/arm64/boot/dts/qcom/sm8150-usb.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -398,6 +398,7 @@ snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; snps,usb3_lpm_capable; snps,bus-suspend-enable; usb-core-id = <0>; maximum-speed = "super-speed"; dr_mode = "otg"; Loading drivers/usb/gadget/function/f_fs.c +9 −2 Original line number Diff line number Diff line Loading @@ -3461,9 +3461,11 @@ static int ffs_func_set_alt(struct usb_function *f, ffs->func = func; ret = ffs_func_eps_enable(func); if (likely(ret >= 0)) if (likely(ret >= 0)) { ffs_event_add(ffs, FUNCTIONFS_ENABLE); /* Disable USB LPM later on bus_suspend */ usb_gadget_autopm_get_async(ffs->gadget); } ffs_log("exit: ret %d", ret); return ret; Loading @@ -3471,8 +3473,13 @@ static int ffs_func_set_alt(struct usb_function *f, static void ffs_func_disable(struct usb_function *f) { struct ffs_function *func = ffs_func_from_usb(f); struct ffs_data *ffs = func->ffs; ffs_log("enter"); ffs_func_set_alt(f, 0, (unsigned)-1); /* matching put to allow LPM on disconnect */ usb_gadget_autopm_put_async(ffs->gadget); ffs_log("exit"); } Loading Loading
arch/arm64/boot/dts/qcom/sm8150-usb.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -398,6 +398,7 @@ snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; snps,usb3_lpm_capable; snps,bus-suspend-enable; usb-core-id = <0>; maximum-speed = "super-speed"; dr_mode = "otg"; Loading
drivers/usb/gadget/function/f_fs.c +9 −2 Original line number Diff line number Diff line Loading @@ -3461,9 +3461,11 @@ static int ffs_func_set_alt(struct usb_function *f, ffs->func = func; ret = ffs_func_eps_enable(func); if (likely(ret >= 0)) if (likely(ret >= 0)) { ffs_event_add(ffs, FUNCTIONFS_ENABLE); /* Disable USB LPM later on bus_suspend */ usb_gadget_autopm_get_async(ffs->gadget); } ffs_log("exit: ret %d", ret); return ret; Loading @@ -3471,8 +3473,13 @@ static int ffs_func_set_alt(struct usb_function *f, static void ffs_func_disable(struct usb_function *f) { struct ffs_function *func = ffs_func_from_usb(f); struct ffs_data *ffs = func->ffs; ffs_log("enter"); ffs_func_set_alt(f, 0, (unsigned)-1); /* matching put to allow LPM on disconnect */ usb_gadget_autopm_put_async(ffs->gadget); ffs_log("exit"); } Loading