linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfio-mdev/samples: change RDI interrupt condition
@ 2018-03-08  7:08 Shunyong Yang
  2018-03-09  6:06 ` Kirti Wankhede
  0 siblings, 1 reply; 4+ messages in thread
From: Shunyong Yang @ 2018-03-08  7:08 UTC (permalink / raw)
  To: kwankhede; +Cc: kvm, linux-kernel, Shunyong Yang, Joey Zheng

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 <yu.zheng@hxt-semitech.com>
Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com>
---
 samples/vfio-mdev/mtty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
index 09f255bdf3ac..7abb79d8313d 100644
--- a/samples/vfio-mdev/mtty.c
+++ b/samples/vfio-mdev/mtty.c
@@ -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;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] vfio-mdev/samples: change RDI interrupt condition
  2018-03-08  7:08 [PATCH] vfio-mdev/samples: change RDI interrupt condition Shunyong Yang
@ 2018-03-09  6:06 ` Kirti Wankhede
  2018-03-20  7:53   ` Yang, Shunyong
  2018-03-22 21:48   ` Alex Williamson
  0 siblings, 2 replies; 4+ messages in thread
From: Kirti Wankhede @ 2018-03-09  6:06 UTC (permalink / raw)
  To: Shunyong Yang, Alex Williamson; +Cc: kvm, linux-kernel, Joey Zheng


Thanks for fixing it.
Patch looks good to me.
+Alex to pull this patch.

Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>

Thanks,
Kirti

On 3/8/2018 12:38 PM, Shunyong Yang wrote:
> 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 <yu.zheng@hxt-semitech.com>
> Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com>
> ---
>  samples/vfio-mdev/mtty.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
> index 09f255bdf3ac..7abb79d8313d 100644
> --- a/samples/vfio-mdev/mtty.c
> +++ b/samples/vfio-mdev/mtty.c
> @@ -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;
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] vfio-mdev/samples: change RDI interrupt condition
  2018-03-09  6:06 ` Kirti Wankhede
@ 2018-03-20  7:53   ` Yang, Shunyong
  2018-03-22 21:48   ` Alex Williamson
  1 sibling, 0 replies; 4+ messages in thread
From: Yang, Shunyong @ 2018-03-20  7:53 UTC (permalink / raw)
  To: alex.williamson, kwankhede; +Cc: linux-kernel, kvm, Zheng, Joey

Hi, Alex,

Gentle ping. Could you please help to pull this patch?
It's a small fix and Kirti has reviewed.

Thanks.
Shunyong.


On Fri, 2018-03-09 at 11:36 +0530, Kirti Wankhede wrote:
> Thanks for fixing it.
> Patch looks good to me.
> +Alex to pull this patch.
> 
> Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>
> 
> Thanks,
> Kirti
> 
> On 3/8/2018 12:38 PM, Shunyong Yang wrote:
> > 
> > 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 <yu.zheng@hxt-semitech.com>
> > Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com>
> > ---
> >  samples/vfio-mdev/mtty.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
> > index 09f255bdf3ac..7abb79d8313d 100644
> > --- a/samples/vfio-mdev/mtty.c
> > +++ b/samples/vfio-mdev/mtty.c
> > @@ -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;
> >  
> > 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] vfio-mdev/samples: change RDI interrupt condition
  2018-03-09  6:06 ` Kirti Wankhede
  2018-03-20  7:53   ` Yang, Shunyong
@ 2018-03-22 21:48   ` Alex Williamson
  1 sibling, 0 replies; 4+ messages in thread
From: Alex Williamson @ 2018-03-22 21:48 UTC (permalink / raw)
  To: Kirti Wankhede; +Cc: Shunyong Yang, kvm, linux-kernel, Joey Zheng

On Fri, 9 Mar 2018 11:36:05 +0530
Kirti Wankhede <kwankhede@nvidia.com> wrote:

> Thanks for fixing it.
> Patch looks good to me.
> +Alex to pull this patch.
> 
> Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>

Applied to vfio next branch for v4.17 with Kirti's Rb.  Thanks,

Alex

> On 3/8/2018 12:38 PM, Shunyong Yang wrote:
> > 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 <yu.zheng@hxt-semitech.com>
> > Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com>
> > ---
> >  samples/vfio-mdev/mtty.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
> > index 09f255bdf3ac..7abb79d8313d 100644
> > --- a/samples/vfio-mdev/mtty.c
> > +++ b/samples/vfio-mdev/mtty.c
> > @@ -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;
> >  
> >   

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-22 21:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08  7:08 [PATCH] vfio-mdev/samples: change RDI interrupt condition Shunyong Yang
2018-03-09  6:06 ` Kirti Wankhede
2018-03-20  7:53   ` Yang, Shunyong
2018-03-22 21:48   ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).