On 02.09.2022 15:17, Marek Marczykowski-Górecki wrote: > When cable is unplugged, dbc_ensure_running() correctly detects this > situation (DBC_CTRL_DCR flag is clear), and prevent sending data > immediately to the device. It gets only queued in work ring buffers. > When cable is plugged in again, subsequent dbc_flush() will send the > buffered data. > But there is a corner case, where no subsequent data was buffered in the > work buffer, but a TRB was still pending. Ring the doorbell to let the > controller re-send them. For console output it is rare corner case (TRB > is pending for a very short time), but for console input it is very > normal case (there is always one pending TRB for input). > > Extract doorbell ringing into separate function to avoid duplication. > > Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com>
Acked-by: Jan Beulich <jbeul...@suse.com>