From c62300ab246298a1c82500770cc9f3333340d15b Mon Sep 17 00:00:00 2001 From: Chandana Kishori Chiluveru Date: Fri, 6 Jul 2018 12:52:17 +0530 Subject: [PATCH] usb: f_gsi: Disable function remote wake-up capability for DPL If driver allows function remote wake-up for DPL interface. windows10/8 host may suspend the DPL function in SS mode. When we receive Function Suspend for usb interface. gsi_suspend() blocks ringing of doorbell by USB controller to IPA GSI and schedule usb_ipa_w work with event EVNT_SUSPE. This will block the GSI to IPA path for other GSI interfaces in the compositions. Hence disable function remote wake-up capability for DPL interface. Change-Id: Ic2da104a48bc14aa2f2912544a9b5fa1c5de8596 Signed-off-by: Chandana Kishori Chiluveru --- drivers/usb/gadget/function/f_gsi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c index 4d05d5cb3756..2417d285fa2f 100644 --- a/drivers/usb/gadget/function/f_gsi.c +++ b/drivers/usb/gadget/function/f_gsi.c @@ -2613,6 +2613,10 @@ static int gsi_get_status(struct usb_function *f) #ifdef CONFIG_USB_FUNC_WAKEUP_SUPPORTED struct f_gsi *gsi = func_to_gsi(f); + /* Disable function remote wake-up for DPL interface */ + if (gsi->prot_id == IPA_USB_DIAG) + return 0; + return (gsi->func_wakeup_allowed ? USB_INTRF_STAT_FUNC_RW : 0) | USB_INTRF_STAT_FUNC_RW_CAP; #else