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

Commit 80c81b24 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Mayank Rana
Browse files

usb: composite: don't print the invalid function wakeup failure messages



The function level suspend/resume/wakeup are supported in super speed
mode only. The usb_func_wakeup() is called for every function during
resume irrespective of the operating speed. This function returns
-ENOTSUPP when the gadget is not operating in super speed. Don't print
the error message in this case. Otherwise an error message is printed
for each function during high/full speed device resume.

CRs-Fixed: 750230
Change-Id: I6f600fe7fa9a037b83909265229acdc668329d6a
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent c757700f
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ int usb_func_wakeup(struct usb_function *func)
			"Function wakeup for %s could not complete due to suspend state. Delayed until after bus resume.\n",
			func->name ? func->name : "");
		ret = 0;
	} else if (ret < 0) {
	} else if (ret < 0 && ret != -ENOTSUPP) {
		ERROR(func->config->cdev,
			"Failed to wake function %s from suspend state. ret=%d. Canceling USB request.\n",
			func->name ? func->name : "", ret);
@@ -2439,13 +2439,13 @@ void composite_resume(struct usb_gadget *gadget)
						"Function wakeup for %s could not complete due to suspend state.\n",
						f->name ? f->name : "");
					break;
				}

				} else if (ret != -ENOTSUPP) {
					ERROR(f->config->cdev,
						"Failed to wake function %s from suspend state. ret=%d. Canceling USB request.\n",
						f->name ? f->name : "",
						ret);
				}
			}

			if (f->resume)
				f->resume(f);