From: Badhri Jagan Sridharan <badhri@google.com>
To: gregkh@linuxfoundation.org, stern@rowland.harvard.edu,
colin.i.king@gmail.com, xuetao09@huawei.com,
quic_eserrao@quicinc.com, water.zhangjiantao@huawei.com,
peter.chen@freescale.com, balbi@ti.com, francesco@dolcini.it,
alistair@alistair23.me, stephan@gerhold.net,
bagasdotme@gmail.com, luca@z3ntu.xyz
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
Badhri Jagan Sridharan <badhri@google.com>
Subject: [PATCH v4 2/3] Revert "Revert "usb: gadget: udc: core: Prevent redundant calls to pullup""
Date: Mon, 29 May 2023 23:48:15 +0000 [thread overview]
Message-ID: <20230529234816.3720623-2-badhri@google.com> (raw)
In-Reply-To: <20230529234816.3720623-1-badhri@google.com>
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@google.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
next prev parent reply other threads:[~2023-05-29 23:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 23:48 [PATCH v4 1/3] Revert "Revert "usb: gadget: udc: core: Invoke usb_gadget_connect only when started"" Badhri Jagan Sridharan
2023-05-29 23:48 ` Badhri Jagan Sridharan [this message]
2023-05-30 0:44 ` [PATCH v4 2/3] Revert "Revert "usb: gadget: udc: core: Prevent redundant calls to pullup"" Alan Stern
2023-05-29 23:48 ` [PATCH v4 3/3] usb: gadget: udc: core: Offload usb_udc_vbus_handler processing Badhri Jagan Sridharan
2023-05-30 1:08 ` Alan Stern
2023-05-31 4:00 ` Badhri Jagan Sridharan
2023-05-30 0:42 ` [PATCH v4 1/3] Revert "Revert "usb: gadget: udc: core: Invoke usb_gadget_connect only when started"" Alan Stern
2023-05-30 0:46 ` Alan Stern
2023-05-30 7:24 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230529234816.3720623-2-badhri@google.com \
--to=badhri@google.com \
--cc=alistair@alistair23.me \
--cc=bagasdotme@gmail.com \
--cc=balbi@ti.com \
--cc=colin.i.king@gmail.com \
--cc=francesco@dolcini.it \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=luca@z3ntu.xyz \
--cc=peter.chen@freescale.com \
--cc=quic_eserrao@quicinc.com \
--cc=stable@vger.kernel.org \
--cc=stephan@gerhold.net \
--cc=stern@rowland.harvard.edu \
--cc=water.zhangjiantao@huawei.com \
--cc=xuetao09@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox