[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230529233700.3706661-2-badhri@google.com>
Date: Mon, 29 May 2023 23:36:59 +0000
From: Badhri Jagan Sridharan <badhri@...gle.com>
To: gregkh@...uxfoundation.org, stern@...land.harvard.edu,
colin.i.king@...il.com, xuetao09@...wei.com,
quic_eserrao@...cinc.com, water.zhangjiantao@...wei.com,
peter.chen@...escale.com, balbi@...com, francesco@...cini.it,
alistair@...stair23.me, stephan@...hold.net, bagasdotme@...il.com,
luca@...tu.xyz
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Badhri Jagan Sridharan <badhri@...gle.com>
Subject: [PATCH v3 2/3] Revert "Revert "usb: gadget: udc: core: Prevent
redundant calls to pullup""
This reverts commit 5e1617210aede9f1b91bb9819c93097b6da481f9.
The regression reported in
https://lore.kernel.org/all/ZF4bMptC3Lf2Hnee@gerhold.net/ is being
fixed in
commit 7d7863db7cc0 ("usb: gadget: udc: core: Offload usb_udc_vbus_handler processing").
Hence reverting the revert.
Signed-off-by: Badhri Jagan Sridharan <badhri@...gle.com>
---
drivers/usb/gadget/udc/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index 583c339876ab..4641153e9706 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -703,6 +703,9 @@ static int usb_gadget_connect_locked(struct usb_gadget *gadget)
goto out;
}
+ if (gadget->connected)
+ goto out;
+
if (gadget->deactivated || !gadget->udc->started) {
/*
* If gadget is deactivated we only save new state.
--
2.41.0.rc0.172.g3f132b7071-goog
Powered by blists - more mailing lists