hujun260 commented on code in PR #15323:
URL: https://github.com/apache/nuttx/pull/15323#discussion_r1896726863


##########
drivers/serial/uart_pl011.c:
##########
@@ -748,6 +748,7 @@ static void pl011_txint(FAR struct uart_dev_s *dev, bool 
enable)
   if (enable)
     {
       pl011_irq_tx_enable(sport);
+      spin_unlock_irqrestore(&sport->lock, flags);
 
       /* Fake a TX interrupt here by just calling uart_xmitchars() with
        * interrupts disabled (note this may recurse).

Review Comment:
   I believe that spin_lock_irqsave is only needed here to protect 
pl011_irq_tx_enable and pl011_irq_tx_disable. The uart_xmitchars function will 
use critical sections to protect its own logic.



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to