Hi, I have a problem and yet am not sure where to look. It's a problem in the serial driver for the internal UART's of the AU1100. It appeared ever since 2.6.15. 2.6.14 is working like a charm, but 2.6.15 gives me the trouble. When I open a tty with the open(2) system call (see attached open.c) I see that the UART sends a 0x36 byte on the line. But that's not the only trouble. I also do not receive any bytes received by the UART. All the received bytes stay in the input buffer of the UART only to be send up to userland as soon as the UART is asked to send a byte on the line itself. Then in one take all the bytes are received by the application listening. Reproducing is easy with a program like picocom. Just start it on both ends (one called 'a' and the other called 'b') and type on one (a) end. You will see nothing at the other (b) end. Then type 1 or more characters on the other (b) end and you will see that character appear at the one (a) end and all the other previously types at the one (a) end appear on the other (b) end. I am currently looking into the source to see what's changed, but any help would be greatly appreciated :-) -- $ cat ~/.signature Freddy Spierenburg <freddy@xxxxxxxxxxxxxxx> http://freddy.snarl.nl/ GnuPG: 0x7941D1E1=C948 5851 26D2 FA5C 39F1 E588 6F17 FD5D 7941 D1E1 $ # Please read http://www.ietf.org/rfc/rfc2015.txt before complain!
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> int main(int argc,char **argv) { int fd; char *tty; tty=argc>1?argv[1]:"/dev/ttyS0"; fd=open(tty,O_RDWR); if(fd==-1) { perror("Can't open tty"); } else { if(argc>2) { /* Closing or not doesn't matter, it's the open() system call. */ close(fd); } else { /* Nice sleep so you see the character is sent by the open and * not by whatever else one can think of. */ sleep(2); } } return(0); }
Attachment:
signature.asc
Description: Digital signature