xen/arm: vpl011: Fix misleading comments

In both vpl011_read_data() and vpl011_read_data_xen(), there is a comment
stating that the guest is expected to read the DR register only if the
TXFE bit of FR register is not set. This is obviously logically wrong and
it should be RXFE (i.e. RX FIFO empty bit set -> nothing to read).

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Henry Wang <Henry.Wang@arm.com>
This commit is contained in:
Michal Orzel authored and Stefano Stabellini committed 2023-04-17 13:00:45 -07:00
1 parent 65c4e7472c
commit 005e84e695
1 file changed
+4 -4
+4 -4
View File
@@ -143,8 +143,8 @@ static uint8_t vpl011_read_data_xen(struct domain *d)
/*
* It is expected that there will be data in the ring buffer when this
* function is called since the guest is expected to read the data register
* only if the TXFE flag is not set.
* If the guest still does read when TXFE bit is set then 0 will be returned.
* only if the RXFE flag is not set.
* If the guest still does read when RXFE bit is set then 0 will be returned.
*/
if ( xencons_queued(in_prod, in_cons, sizeof(intf->in)) > 0 )
{
@@ -202,8 +202,8 @@ static uint8_t vpl011_read_data(struct domain *d)
/*
* It is expected that there will be data in the ring buffer when this
* function is called since the guest is expected to read the data register
* only if the TXFE flag is not set.
* If the guest still does read when TXFE bit is set then 0 will be returned.
* only if the RXFE flag is not set.
* If the guest still does read when RXFE bit is set then 0 will be returned.
*/
if ( xencons_queued(in_prod, in_cons, sizeof(intf->in)) > 0 )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.