Skip to content

Commit

Permalink
vfio-mdev/samples: change RDI interrupt condition
Browse files Browse the repository at this point in the history
When FIFO mode is enabled, the receive data available interrupt
(UART_IIR_RDI in code) should be triggered when the number of data
in FIFO is equal or larger than interrupt trigger level.

This patch changes the trigger level check to ensure multiple bytes
received from upper layer can trigger RDI interrupt correctly.

Cc: Joey Zheng <[email protected]>
Signed-off-by: Shunyong Yang <[email protected]>
Reviewed by: Kirti Wankhede <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
  • Loading branch information
Shunyong Yang authored and awilliam committed Mar 22, 2018
1 parent 6bd06f5 commit c9f89c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/vfio-mdev/mtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ static void handle_bar_read(unsigned int index, struct mdev_state *mdev_state,

/* Interrupt priority 2: Fifo trigger level reached */
if ((ier & UART_IER_RDI) &&
(mdev_state->s[index].rxtx.count ==
(mdev_state->s[index].rxtx.count >=
mdev_state->s[index].intr_trigger_level))
*buf |= UART_IIR_RDI;

Expand Down

0 comments on commit c9f89c3

Please sign in to comment.