From: Fabrice Gasnier <fabrice.gasnier@st.com>
To: <hminas@synopsys.com>, <balbi@kernel.org>
Cc: <gregkh@linuxfoundation.org>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<amelie.delaunay@st.com>
Subject: [PATCH 0/4] usb: gadget: serial: add supend resume support
Date: Tue, 21 Apr 2020 14:32:17 +0200 [thread overview]
Message-ID: <1587472341-17935-1-git-send-email-fabrice.gasnier@st.com> (raw)
This series handles an issue seen when doing basic testing using ACM or SERIAL
gadget functions like in [1], and using the DWC2 gadget driver. It occurs when
the HOST has suspended the bus before testing, in this order:
- On the device:
cat /dev/ttyGS<Y>
Dmesg error log is seen on device side:
configfs-gadget gadget: acm ttyGS0 can't notify serial state, -11
- On the host:
echo test > /dev/ttyACM<X>
The bus resumes, but the serial link isn't functional.
So, implement suspend/resume callbacks in gadget serial drivers to handle this.
There is a precursor patch in DWC2 to enable submitting usb requests from the
gadget resume routine, once in L0 state.
[1] https://www.kernel.org/doc/html/latest/usb/gadget-testing.html#testing-the-acm-function
Fabrice Gasnier (4):
usb: dwc2: gadget: move gadget resume after the core is in L0 state
usb: gadget: u_serial: add suspend resume callbacks
usb: gadget: f_serial: add suspend resume callbacks
usb: gadget: f_acm: add suspend resume callbacks
drivers/usb/dwc2/core_intr.c | 10 ++++--
drivers/usb/gadget/function/f_acm.c | 16 ++++++++++
drivers/usb/gadget/function/f_serial.c | 16 ++++++++++
drivers/usb/gadget/function/u_serial.c | 57 +++++++++++++++++++++++++++++-----
drivers/usb/gadget/function/u_serial.h | 2 ++
5 files changed, 90 insertions(+), 11 deletions(-)
--
2.7.4
next reply other threads:[~2020-04-21 12:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 12:32 Fabrice Gasnier [this message]
2020-04-21 12:32 ` [PATCH 1/4] usb: dwc2: gadget: move gadget resume after the core is in L0 state Fabrice Gasnier
2020-04-22 14:48 ` Minas Harutyunyan
2020-04-22 15:57 ` Fabrice Gasnier
2020-04-22 16:16 ` Minas Harutyunyan
2020-04-23 9:27 ` Fabrice Gasnier
2020-04-23 10:35 ` Minas Harutyunyan
2020-04-21 12:32 ` [PATCH 2/4] usb: gadget: u_serial: add suspend resume callbacks Fabrice Gasnier
2020-04-21 12:32 ` [PATCH 3/4] usb: gadget: f_serial: " Fabrice Gasnier
2020-04-21 12:32 ` [PATCH 4/4] usb: gadget: f_acm: " Fabrice Gasnier
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=1587472341-17935-1-git-send-email-fabrice.gasnier@st.com \
--to=fabrice.gasnier@st.com \
--cc=amelie.delaunay@st.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hminas@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-usb@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).