serial port behaviour changed between 2.0 and 2.2

From: Frank Gevaerts (fg@fks.be)
Date: Wed May 03 2000 - 11:16:58 EST


We are implementing a userspace driver to communicate with a serial
device. The device uses RTS/CTS and DTR/DSR to indicate whether it is
ready to communicate. In 2.0, the following code used to work, but in 2.2
the last ioctl() causes read() and write() to be buffered in 16 byte
blocks, which causes communication to fail.
We need to be able to read and set the modem control lines without
affecting buffered/non-buffered mode. How can we do this ?

   int portset;
   if(( fd = open("/dev/ttyS1",O_RDWR|O_NONBLOCK)) > 0)
      ioctl(fd,TIOCMGET,&portset);
      portset &=! TIOCM_DSR;
      portset &=! TIOCM_CTS;
      ioctl(fd,TIOCMSET,&portset);
   }

Frank Gevaerts
Formal and Knowledge Systems
Luikersteenweg 65
B-3500 Hasselt
Belgium

tel : (32)11/214911 fax : (32)11/220419
email : frank.gevaerts@fks.be
        fg@fks.be

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:12 EST