[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 09/10] drivers/char: fix handling cable re-plug in XHCI console driver


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 6 Sep 2022 11:21:26 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=o6IvH2vWjfNyw8BT5s4X14T5wXVPWT10Z9HdGeXBvR8=; b=IR7s6yQzJbJ19iDHnKnRghmUmCcXcBFIyEW8SGavQkDy9TscGsafUgoXskpGbg3RD2HMEy7lcGZEd3+/b78np5i20n9XiUtEYWj086XCREwSqsNCgdMQnsmNr2z2mZrbFXxCAt/c8MX99skRO5WWwCpgzkxoVv3/yBJc3iTQyWlFO3+ET6zfJgahXyb7zl94BTXfpxTowDA8weYmW2OjVmBzOXLK9qEBmPf4ae0vzhp02sUvdocaKf5Y2EBkmrs+KAhBVctMo2GrZmkVdA3CCJhC7ld86errwq/xpoUDbH9KuYaDu8hY+cQyrOLL0bJLEquCcHwkMm+SJ/JapZD6RQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GadAF7jcpK67JKFwn79SowcTw72/PwV7E9CyTLJhpdpEm2gaKnhHu1LTiIOtrKLLWsnp9uDd2nl/QA0NKphRvvPz5Jj1kv5JVP/iOzGfoO8hdiVqPgkZflJHIIf0U1e4pqlfQ2BRDjCKyp+K+G8fBsmI/vEzNtgeoaziOgV/KtZykVm3J/CBgwSJz6TfAmh4nTeUPxxpiRZkftDXvTdOHX0Eyu9dasQfJxEKglD4hQP05zVxwhPrFjGbZGilsppA/EI5gWFXQymxtlpiMDO2uwtbhWePsI1HdiRFWmNs4kZdqU3LrGB0QGhn4JU137AVFB6K7a1tJe3Lj+8dXYFCaA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 06 Sep 2022 09:21:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <marmarek@xxxxxxxxxxxxxxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.