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

Commit 2699a6a0 authored by Azhar Shaikh's avatar Azhar Shaikh
Browse files

usb: gadget: f_gsi: Avoid calling suspend again in case of func suspend



If the function is in USB3 function suspend state, skip suspend.
Suspend is handled by function suspend routine.

Change-Id: Ieaf58efbe9bc45043738aa1fc297a79f09ae8729
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent 9da4ddc1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2156,6 +2156,12 @@ static void gsi_suspend(struct usb_function *f)
	struct f_gsi *gsi = func_to_gsi(f);
	bool remote_wakeup_allowed;

	/* Check if function is already suspended in gsi_func_suspend() */
	if (f->func_is_suspended) {
		log_event_dbg("%s: func already suspended, return\n", __func__);
		return;
	}

	if (f->config->cdev->gadget->speed == USB_SPEED_SUPER)
		remote_wakeup_allowed = f->func_wakeup_allowed;
	else