[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-serial
Subject:    Re: Newbie question: setting baudrate / managing FIFO.
From:       Grant Edwards <grant.b.edwards () gmail ! com>
Date:       2011-02-18 20:24:21
Message-ID: ijmkhl$4r5$1 () dough ! gmane ! org
[Download RAW message or body]

On 2011-02-16, Andrei Warkentin <andreiw@motorola.com> wrote:

> I looked about the archives, but maybe I skipped something... When I
> am handling set_termios, what assumptions can I make regarding the
> TX/RX state? I didn't take a look at all the serial drivers, but the
> ones I did look did not bother flushing FIFOs and ensuring nothing can
> be present in the TX FIFO while updating LCR and divisors. Should I do
> the equivalent of stop_tx inside set_termios? Is that already ensured?
> The hardware I am looking at needs to have FIFO cleared after setting
> baud rate, and I was getting concerned over potential data loss
> scenarios...

Somebody who changes baud rate while transmitting is going to lose
data no matter what you choose to do.

So, I wouldn't worry about it.  Change the baud rate when the ioctl()
tells you to, and if you have to clear the FIFO as part of that
operation then do so.

-- 
Grant Edwards               grant.b.edwards        Yow! I just went below the
                                  at               poverty line!
                              gmail.com            

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic