Re: Serial raw mode. Bug in serial driver in Linux kernel? Is documentation correct?

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

 



Petr Slansky <slansky@xxxxxxxxx> writes:

> Hi Linux-Serial,
>
> I was fixing "pirate-loader" for BusPirate device, firmware loader utility.
> The design followed documentation for serial communication for "row"
> serial mode but it was not working. I modified flags and utility works
> now but my modification doesn't match documentation. That is strange
> from my point of view. Have I discovered a bug in the kernel? Could
> you check??
>
> Details are here, second comment, the long one:
> https://github.com/BusPirate/Bus_Pirate/issues/140
>
> This is the core of my fix, I changed CSIZE flag:
>
>         cfmakeraw(&g_new_tio);
>
> -       g_new_tio.c_cflag |=  (CS8 | CLOCAL | CREAD);
> -       g_new_tio.c_cflag &= ~(PARENB | CSTOPB | CSIZE);

You got a bug right here. Just swap these 2 lines. You should first
clear CSIZE bits, then set CS8 size.

-- Sergey Organov



[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