Re: [PATCH 1/2] serial/imx: add DMA support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 27, 2012 at 5:50 AM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Apr 27, 2012 at 05:46:22PM +0800, Huang Shijie wrote:
>>>>> 1. How do you deal with transmitting the high-priority XON/XOFF
>>>>>      characters (port->x_char) which occur with s/w flow control and
>>>>>      the tty buffers fill up?
>>>>> 2. How do you deal with flow control in general?  IOW, what happens
>>>>>      when the remote end deasserts your CTS with h/w flow control enabled.
>> If the remote end deasserts my CTS, it means the remote will not send
>> any data.
>>
>> My DMA for RX will expire in the following steps:
>> [1] the UART only waits for 32 bytes time long
>> [2] the UART triggers an IDLE Condition Detect DMA.
>> [3] the dma_rx_callback() will release the DMA for Rx.
>
> Err, hang on.  I think you're totally confused about hardware flow
> control.  Certainly you're not using the correct terms for what you're
> describing.
>
> The CTS input normally controls the transmitter.  In many hardware
> assisted hardware flow control setups, the deassertion of CTS merely
> prevents the transmitter starting a new character.
>
> This shouldn't have any effect on the receiver of the same UART at all.
>
>>>>>      How does your end deal with sending RTS according to flow control
>>>>>      conditions?
>>>>>
>> If a CTS is received after we sent out a RTS, it will follow the steps:
>>  imx_int() --> imx_rtsint() --> uart_handle_cts_change() -->start_tx()
>>
>> The start_tx() will create an TX DMA operation, and send out the data.
>
> The generation of RTS (connected to the remote ends CTS signal) is
> supposed to control whether the remote end sends you characters.  RTS
http://en.wikipedia.org/wiki/Flow_control#Hardware_flow_control

>From the wiki, the generation of RTS (assert by the  "master end") is
used to send data
from the master to slave(the remote), not control the remote end sends
me characters.



Best Regards
Huang Shijie



> gets deasserted either by software control when you're running out of
> space to store the received characters, or (in the case of hardware
> assisted hardware flow control) your receivers FIFO fills above a
> certain watermark.
>
>>>
--
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


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux