Re: [PATCH 6/9] dev-serial: add always-plugged property to ensure USB device is always attached

2020-10-27 Thread Mark Cave-Ayland
On 27/10/2020 08:09, Gerd Hoffmann wrote: case CHR_EVENT_OPENED: -if (!s->dev.attached) { +if (!s->always_plugged && !s->dev.attached) { usb_device_attach(>dev, _abort); } Not needed (but doesn't hurt either). Okay I'll leave this as-is for now.

Re: [PATCH 6/9] dev-serial: add always-plugged property to ensure USB device is always attached

2020-10-27 Thread Gerd Hoffmann
> case CHR_EVENT_OPENED: > -if (!s->dev.attached) { > +if (!s->always_plugged && !s->dev.attached) { > usb_device_attach(>dev, _abort); > } Not needed (but doesn't hurt either). > break; > case CHR_EVENT_CLOSED: > -if

Re: [PATCH 6/9] dev-serial: add always-plugged property to ensure USB device is always attached

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:58 +, a ecrit: > 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

[PATCH 6/9] dev-serial: add always-plugged property to ensure USB device is always attached

2020-10-26 Thread Mark Cave-Ayland
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