From: Jason Andryuk <jandryuk@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: qemu-devel@nongnu.org, Jason Andryuk <jandryuk@gmail.com>
Subject: [PATCH 0/4] usb-serial: xHCI and timeout fixes
Date: Thu, 12 Mar 2020 08:55:19 -0400 [thread overview]
Message-ID: <20200312125524.7812-1-jandryuk@gmail.com> (raw)
This patch series includes two fixes for usb-serial.
The first is a data corruption issue with xHCI controllers. The FTDI
data packets need to have a 2 byte header start every 64 bytes of packet
data. For EHCI this is not a problem since USBPacket size is 64, so
only 1 such chunk fits in a packet. xHCI controllers supply 512 byte
USBPackets, and usb-serial would only write a single header. This
confuses drivers since they interpret some data bytes as header bytes.
Chunk the data with headers at every 64 byte offset.
To allow full use of the 512 USBPackets, increase the buffer size to 512
- 2 * 8 = 496 bytes.
A second fix is to set the FTDI_THRE (Transmitter Holding Register) and
FTDI_TEMT (Transmitter Empty) status bits in a GetModemStat response.
This makes the linux driver happy when closing the device and avoids a
30 second timeout.
Jason Andryuk (4):
usb-serial: Move USB_TOKEN_IN into a helper function
usb-serial: chunk data to wMaxPacketSize
usb-serial: Increase receive buffer to 496
usb-serial: Fix timeout closing the device
hw/usb/dev-serial.c | 92 +++++++++++++++++++++++++++------------------
1 file changed, 56 insertions(+), 36 deletions(-)
--
2.24.1
next reply other threads:[~2020-03-12 12:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 12:55 Jason Andryuk [this message]
2020-03-12 12:55 ` [PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function Jason Andryuk
2020-03-13 23:56 ` Samuel Thibault
2020-03-16 11:40 ` Gerd Hoffmann
2020-03-16 12:05 ` Jason Andryuk
2020-03-12 12:55 ` [PATCH 2/4] usb-serial: chunk data to wMaxPacketSize Jason Andryuk
2020-03-14 0:07 ` Samuel Thibault
2020-03-12 12:55 ` [PATCH 3/4] usb-serial: Increase receive buffer to 496 Jason Andryuk
2020-03-14 21:40 ` Samuel Thibault
2020-03-12 12:55 ` [PATCH 4/4] usb-serial: Fix timeout closing the device Jason Andryuk
2020-03-14 21:41 ` Samuel Thibault
2020-03-12 13:14 ` [PATCH 0/4] usb-serial: xHCI and timeout fixes no-reply
2020-03-12 13:31 ` no-reply
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=20200312125524.7812-1-jandryuk@gmail.com \
--to=jandryuk@gmail.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@ens-lyon.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).