drivers/serial/serial.c: Don't reset the circular buffer on close since DMA may still be transferring data in the background if the user closes the handle too quickly and the handle is opened with O_NONBLOCK.

This commit is contained in:
Xiang Xiao 2019-01-27 10:54:41 -06:00 committed by Gregory Nutt
parent c07ba1eac1
commit 4ed591355b
1 changed files with 0 additions and 7 deletions

View File

@ -691,13 +691,6 @@ static int uart_close(FAR struct file *filep)
(void)uart_tcdrain(dev, 4 * TICK_PER_SEC);
}
/* Mark the I/O buffers empty */
dev->xmit.head = 0;
dev->xmit.tail = 0;
dev->recv.head = 0;
dev->recv.tail = 0;
/* Free the IRQ and disable the UART */
flags = enter_critical_section(); /* Disable interrupts */