From f65b5b627d95b06b317799e39932cc7013f59e76 Mon Sep 17 00:00:00 2001 From: Wesley Cheng Date: Sat, 12 Nov 2022 03:00:19 -0800 Subject: [PATCH] usb: gadget: f_gsi: Do not re-initialize wait_for_ipa_ready The IPA modules can likely be probed much before the USB GSI function is initialized by userspace. If the IPA ready callback is received before configFS is initialized, then the wait_for_ipa_ready completion will be reset, leading to subsequent GSI bind timeouts, since IPAM only notifies at the IPA probe time. Change-Id: I6e31a368a68635d5eed0f0d9b99526ae998f2bbb Signed-off-by: Wesley Cheng --- drivers/usb/gadget/function/f_gsi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c index 0b87bebc0e6b..39e4feee2d89 100644 --- a/drivers/usb/gadget/function/f_gsi.c +++ b/drivers/usb/gadget/function/f_gsi.c @@ -3299,8 +3299,6 @@ static struct f_gsi *gsi_function_init(enum ipa_usb_teth_prot prot_id) spin_lock_init(&gsi->d_port.lock); - init_completion(&wait_for_ipa_ready); - INIT_DELAYED_WORK(&gsi->d_port.usb_ipa_w, ipa_work_handler); gsi->d_port.in_channel_handle = -EINVAL;