Hi everyone,
I'm working with ti-linux-kernel 6.1.46 on AM335x (BeagleBone Black) and I'd like to understand if the following is a bug or not:
When calling serdev_device_open, then serdev_device_close several times relatively back-to-back I see a warning from omap_8250_rx_dma_flush when pausing the DMA. Looking deeper I see that edma_dma_pause returns -EINVAL as there is no active descriptor (as far as I can tell). Digging some more I think what happens is that flag dma->rx_running in 8250_omap is being left high when omap_8250_shutdown returns:
omap_8250_shutdown() omap_8250_rx_dma_flush() __dma_rx_do_complete() ... dma->rx_running = 0; .... pm_runtime_get_sync() omap8250_runtime_resume() /* Might get called depending on driver state */ omap_8250_rx_dma() dma->rx_running = 1; ... /* more shutdown code */
When omap_8250_rx_dma will be called then next time the UART is opened, it will terminate early without actually submitting the DMA request and subsequent flush will fail as mentioned above.
Is this a real issue or am I missing something?
Thanks and regards,
Michael.