Re: Newbie question: setting baudrate / managing FIFO.

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

 



On 2011-02-16, Andrei Warkentin <andreiw@xxxxxxxxxxxx> 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@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