Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97c27795 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: Fix remote wakeup failure in Superspeed Plus"

parents c0b5e522 723c9140
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1933,7 +1933,7 @@ static int dwc3_gadget_wakeup_int(struct dwc3 *dwc)
	case DWC3_LINK_STATE_U3:	/* in HS, means SUSPEND */
		break;
	case DWC3_LINK_STATE_U1:
		if (dwc->gadget.speed != USB_SPEED_SUPER) {
		if (dwc->gadget.speed < USB_SPEED_SUPER) {
			link_recover_only = true;
			break;
		}
@@ -2042,7 +2042,7 @@ static int dwc_gadget_func_wakeup(struct usb_gadget *g, int interface_id)
	int ret = 0;
	struct dwc3 *dwc = gadget_to_dwc(g);

	if (!g || (g->speed != USB_SPEED_SUPER))
	if (!g || (g->speed < USB_SPEED_SUPER))
		return -ENOTSUPP;

	if (dwc3_gadget_is_suspended(dwc)) {
+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ static int usb_func_wakeup_int(struct usb_function *func)
		return -EINVAL;

	gadget = func->config->cdev->gadget;
	if ((gadget->speed != USB_SPEED_SUPER) || !func->func_wakeup_allowed) {
	if ((gadget->speed < USB_SPEED_SUPER) || !func->func_wakeup_allowed) {
		DBG(func->config->cdev,
			"Function Wakeup is not possible. speed=%u, func_wakeup_allowed=%u\n",
			gadget->speed,
+1 −1
Original line number Diff line number Diff line
@@ -1649,7 +1649,7 @@ static ssize_t cser_rw_write(struct file *file, const char __user *ubuf,
	port->debugfs_rw_enable = !!input;
	if (port->debugfs_rw_enable) {
		gadget = cser->func.config->cdev->gadget;
		if (gadget->speed == USB_SPEED_SUPER &&
		if (gadget->speed >= USB_SPEED_SUPER &&
			func->func_is_suspended) {
			pr_debug("Calling usb_func_wakeup\n");
			ret = usb_func_wakeup(func);
+1 −1
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ EXPORT_SYMBOL(usb_gsi_ep_op);
int usb_gadget_func_wakeup(struct usb_gadget *gadget,
	int interface_id)
{
	if (gadget->speed != USB_SPEED_SUPER)
	if (gadget->speed < USB_SPEED_SUPER)
		return -EOPNOTSUPP;

	if (!gadget->ops->func_wakeup)