dev-serial: add always-plugged property to ensure USB device is always attached
commit66007a95674d4b8e616245541faad6cdf5e9f70d
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tue, 27 Oct 2020 15:04:54 +0000 (27 15:04 +0000)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 4 Nov 2020 06:22:37 +0000 (4 07:22 +0100)
treec0d874f07dff9a062283fda01a203358d88d358d
parent687dfe63e3d9dd8a1a682a7da76bec75a5f656ba
dev-serial: add always-plugged property to ensure USB device is always attached

Some operating systems will generate a new device ID when a USB device is unplugged
and then replugged into the USB. If this is done whilst switching between multiple
applications over a virtual serial port, the change of device ID requires going
back into the OS/application to locate the new device accordingly.

Add a new always-plugged property that if specified will ensure that the device
always remains attached to the USB regardless of the state of the backend
chardev.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id: 20201027150456.24606-7-mark.cave-ayland@ilande.co.uk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-serial.c