From: Ladislav Michl <ladis@linux-mips.org>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: linux-usb@vger.kernel.org, linux-serial@vger.kernel.org,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2 0/5] usb: gadget: u_serial: Fix and cleanup
Date: Mon, 15 Jul 2019 12:40:32 +0200 [thread overview]
Message-ID: <20190715104032.GA5084@lenoch> (raw)
In-Reply-To: <20190714100426.GA24183@qmqm.qmqm.pl>
Hi Michał,
On Sun, Jul 14, 2019 at 12:04:26PM +0200, Michał Mirosław wrote:
> On Sat, Jul 13, 2019 at 11:08:53PM +0200, Ladislav Michl wrote:
> > Following patchset makes console work (patch 1 and 4) for an AT91SAM9G20
> > board connected to xhci_hcd and does some cleanup.
> > Tested with "console=ttyS0,115200n8 console=ttyGS0" on kernel command line
> > and following inittab:
> > console::respawn:/sbin/getty -L 115200 ttyS0 vt100
> > console::respawn:/sbin/getty -L 115200 ttyGS0 vt100
> >
> > However there is an issue remaining:
> > Disconnect triggers WARN_ON in gs_close:
> [...]
>
> Hi,
>
> Can you try a patchset I sent some time ago [1] if it fixes your case?
your "usb: gadget: u_serial: add missing port entry locking" and
"usb: gadget: u_serial: reimplement console support" fixes every single
problem I had with the driver (including that WARN_ON on gs_close),
except starving console write.
Fortunately my patch "usb: gadget: u_serial: Fix starving write"
applies on top of your first two patches.
So here's my
Tested-by: Ladislav Michl <ladis@linux-mips.org>
and also one nit for your second patch (there are people running cocci scripts,
so save them some time ;-)):
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -931,8 +931,8 @@ static void gs_console_complete_out(struct usb_ep *ep, struct usb_request *req)
static void __gs_console_push(struct gs_console *cons)
{
struct usb_request *req = cons->req;
- struct usb_ep *ep = cons->console.data;
- size_t size = 0;
+ struct usb_ep *ep;
+ size_t size;
if (!req)
return; /* disconnected */
@@ -940,6 +940,7 @@ static void __gs_console_push(struct gs_console *cons)
if (req->length)
return; /* busy */
+ ep = cons->console.data;
size = kfifo_out(&cons->buf, req->buf, ep->maxpacket);
if (!size)
return;
I'm dropping all my patches except the fourth one in favour of your solution
as it is clearly superior. Care to resend it possibly with above fix and
said fourth patch as a single serie?
Thank you,
ladis
prev parent reply other threads:[~2019-07-15 10:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-13 21:08 [PATCH v2 0/5] usb: gadget: u_serial: Fix and cleanup Ladislav Michl
2019-07-13 21:10 ` [PATCH v2 1/5] usb: gadget: u_serial: Fix console_req complete event race Ladislav Michl
2019-07-13 21:10 ` [PATCH v2 2/5] usb: gadget: u_serial: Remove console specific alloc/free req functions Ladislav Michl
2019-07-13 21:11 ` [PATCH v2 3/5] usb: gadget: u_serial: Fix console_req access race Ladislav Michl
2019-07-13 21:11 ` [PATCH v2 4/5] usb: gadget: u_serial: Fix starving write Ladislav Michl
2019-07-13 21:12 ` [PATCH v2 5/5] usb: gadget: u_serial: Use bool for req_busy Ladislav Michl
2019-07-14 10:04 ` [PATCH v2 0/5] usb: gadget: u_serial: Fix and cleanup Michał Mirosław
2019-07-14 11:37 ` Michał Mirosław
2019-07-14 13:22 ` Ladislav Michl
2019-07-15 10:40 ` Ladislav Michl [this message]
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=20190715104032.GA5084@lenoch \
--to=ladis@linux-mips.org \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
/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).