Linux_SDK_V1.5.4

Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
This commit is contained in:
thead_admin
2024-04-26 03:07:38 +00:00
committed by Han Gao
parent a9b3178041
commit 6059b374a0
105 changed files with 3636 additions and 1716 deletions

View File

@@ -1591,6 +1591,9 @@ int usb_suspend(struct device *dev, pm_message_t msg)
if (udev->quirks & USB_QUIRK_DISCONNECT_SUSPEND)
usb_port_disable(udev);
pm_runtime_disable(dev);
pm_runtime_set_suspended(dev);
return 0;
}
@@ -1611,29 +1614,12 @@ int usb_resume_complete(struct device *dev)
int usb_resume(struct device *dev, pm_message_t msg)
{
struct usb_device *udev = to_usb_device(dev);
int status;
/* For all calls, take the device back to full power and
* tell the PM core in case it was autosuspended previously.
* Unbind the interfaces that will need rebinding later,
* because they fail to support reset_resume.
* (This can't be done in usb_resume_interface()
* above because it doesn't own the right set of locks.)
*/
status = usb_resume_both(udev, msg);
if (status == 0) {
pm_runtime_disable(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
unbind_marked_interfaces(udev);
}
/* call usb_resume_both in usb_runtime_resume */
pm_runtime_enable(dev);
unbind_marked_interfaces(udev);
/* Avoid PM error messages for devices disconnected while suspended
* as we'll display regular disconnect messages just a bit later.
*/
if (status == -ENODEV || status == -ESHUTDOWN)
status = 0;
return status;
return 0;
}
/**