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