Home
last modified time | relevance | path

Searched hist:"647 ee987" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/usb/
H A Ddev-serial.c647ee987 Mon Mar 16 12:46:10 CDT 2020 Jason Andryuk <jandryuk@gmail.com> usb-serial: Fix timeout closing the device

Linux guests wait ~30 seconds when closing the emulated /dev/ttyUSB0.
During that time, the kernel driver is sending many control URBs
requesting GetModemStat (5). Real hardware returns a status with
FTDI_THRE (Transmitter Holding Register) and FTDI_TEMT (Transmitter
Empty) set. QEMU leaves them clear, and it seems Linux is waiting for
FTDI_TEMT to be set to indicate the tx queue is empty before closing.

Set the bits when responding to a GetModemStat query and avoid the
shutdown delay.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id: 20200316174610.115820-5-jandryuk@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>