Re: [PATCH] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-24 Thread Dalon L Westergreen
On Thu, 2019-01-24 at 14:05 +0900, Atsushi Nemoto wrote: > On Wed, 23 Jan 2019 14:47:06 -0800, Dalon L Westergreen < > dalon.westergr...@linux.intel.com> wrote: > > > > if (inuse) { /* Tx FIFO is not empty */ > > > > - ready = priv->tx_prod - priv->tx_cons - inuse - 1; > > > >

Re: [PATCH] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-23 Thread Atsushi Nemoto
On Wed, 23 Jan 2019 14:47:06 -0800, Dalon L Westergreen wrote: >> >if (inuse) { /* Tx FIFO is not empty */ >> > - ready = priv->tx_prod - priv->tx_cons - inuse - 1; >> > + ready = priv->tx_prod - priv->tx_cons - inuse; > dont think my last email went through.. > > I am not

Re: [PATCH] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-23 Thread Dalon L Westergreen
On Tue, 2019-01-22 at 11:20 -0600, Thor Thayer wrote: > On 1/21/19 2:29 AM, Atsushi Nemoto wrote: > > From: Tomonori Sakita > > > > If fill_level was not zero and status was not BUSY, > > result of "tx_prod - tx_cons - inuse" might be zero. > > Subtracting 1 unconditionally results invalid negati

Re: [PATCH] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-22 Thread Thor Thayer
On 1/21/19 2:29 AM, Atsushi Nemoto wrote: From: Tomonori Sakita If fill_level was not zero and status was not BUSY, result of "tx_prod - tx_cons - inuse" might be zero. Subtracting 1 unconditionally results invalid negative return value on this case. The subtraction is not needed if fill_leve

[PATCH] net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case

2019-01-21 Thread Atsushi Nemoto
From: Tomonori Sakita If fill_level was not zero and status was not BUSY, result of "tx_prod - tx_cons - inuse" might be zero. Subtracting 1 unconditionally results invalid negative return value on this case. The subtraction is not needed if fill_level was not zero. Signed-off-by: Tomonori Sakit