hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/tty/serial/8250/8250.h
....@@ -342,6 +342,13 @@
342342 extern void serial8250_rx_dma_flush(struct uart_8250_port *);
343343 extern int serial8250_request_dma(struct uart_8250_port *);
344344 extern void serial8250_release_dma(struct uart_8250_port *);
345
+
346
+static inline bool serial8250_tx_dma_running(struct uart_8250_port *p)
347
+{
348
+ struct uart_8250_dma *dma = p->dma;
349
+
350
+ return dma && dma->tx_running;
351
+}
345352 #else
346353 static inline int serial8250_tx_dma(struct uart_8250_port *p)
347354 {
....@@ -363,6 +370,11 @@
363370 return -1;
364371 }
365372 static inline void serial8250_release_dma(struct uart_8250_port *p) { }
373
+
374
+static inline bool serial8250_tx_dma_running(struct uart_8250_port *p)
375
+{
376
+ return false;
377
+}
366378 #endif
367379
368380 static inline int ns16550a_goto_highspeed(struct uart_8250_port *up)