samv7/sam_serial.c: reset all DMA pointers on DMA setup
This small fix ensures all DMA pointers are correctly reseted during DMA setup (when the driver is opened). Without this there could be rare occurrence of driver pointer to incorrect (invalidate) DMA buffer and thus saving incorrect characters to upper layer. Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
parent
49f153abb1
commit
d470c3f268
1 changed files with 2 additions and 0 deletions
|
|
@ -1228,6 +1228,8 @@ static int sam_dma_setup(struct uart_dev_s *dev)
|
|||
*/
|
||||
|
||||
priv->rxdmanext = 0;
|
||||
priv->nextcache = 0;
|
||||
priv->buf_idx = 0;
|
||||
priv->rxenable = true;
|
||||
priv->odd = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue