xiaoxiang781216 commented on code in PR #20181:
URL: https://github.com/apache/nuttx/pull/20181#discussion_r4045715096


##########
drivers/serial/serial.c:
##########
@@ -1572,6 +1648,29 @@ static ssize_t uart_writev(FAR struct file *filep, FAR 
struct uio *uio)
           nseg   = 0;
         }
 
+      /* With no output processing, copy whole runs into the TX buffer at
+       * once.  The bulk copy caches the head index, so it is only used
+       * when this thread is provably the sole producer: ECHO makes
+       * uart_readv() echo into the same buffer, and on a console
+       * uart_irqwrite() produces into it from interrupt context.  A full
+       * TX buffer falls through to uart_putxmitchar() below, which keeps
+       * the canonical blocking, disconnect and O_NONBLOCK handling.
+       */
+
+#ifdef CONFIG_SERIAL_TXBULK
+      if ((dev->tc_oflag & OPOST) == 0 && (dev->tc_lflag & ECHO) == 0 &&
+          !dev->isconsole)
+        {
+          ncopy = uart_putxmitbuf(dev, segbuf + nseg, seglen - nseg);

Review Comment:
   could you cherry-pick the change from xiaomi gerrit? which has more complete 
fix.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to