Hi I am having the imx.c serial port driver hang in imx_shutdown(). I am running 4.1-rc8 on an i.MX6Q board. If the user-space application calls close() on the serial device, imx_shutdown() hangs in his line: ret = wait_event_interruptible(sport->dma_wait, !sport->dma_is_rxing && !sport->dma_is_txing); wait_event_interruptible() does not return unless I receive some more data. When entering wait_event_interruptible, sport->dma_is_rxing == 1 and sport->dma_is_txing == 0. >From that moment onwards, dma_rx_callback() is not called unless I receive more data, so sport->dma_is_rxing never gets cleared. While bisecting the problem, I could identify the following commit as the one that broke the driver for me: 068500e serial: imx: initialized DMA w/o HW flow enabled Obviously the problem is not in this commit, but probably in the DMA code. I am using this driver on an i.MX6Q and have tried sdma firmware version 1.1 and 3.1 so far. The problem appears the same with both. The application that hangs on close() does communication with a microcontroller. The last thing it does before closing is alternately sending blocks of data and receiving a 1-byte acknowledge back. The communication uses even-parity at 115200 baud. I am unable to find a reason why dma_rx_callback() is not called even though sport->dma_is_rxing == 1. The code looks fine to me, but I don't have a thorough understanding of DMA. Could it be related to the fact that the RX-FIFO contains only one byte when DMA is started? Best regards, -- David Jander Protonic Holland. -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html