On Mon, Aug 18, 2003 at 05:55:58PM -0500, David Anders wrote:
> Greg KH wrote:
> 
> >What kernel version?
> 
> i've tested with 2.4.18, 2.4.20, and 2.4.21 with the last posted patches
> primarily tested with the pl2303 module, however i did get the same 
> response on the mct_u232 and keyspan modules. this same program on a 
> standard rs-232 port works fine. uncommenting various lines and you can 
> make a comparison between "normal" rs-232 behavior and the usb-rs232 
> version. i used a null modem cable between two pc's, and also tested 
> with two wire (tx/rx/gnd) between a wyse terminal and a pc.
> 
> >Care to post your .c program?
> >

Hm, I can't seem to crash anything in the pl2303 driver right now (it
was the io_ti driver that I tested yesterday, but forgot to bring that
device with me...)

Anyway, I'm guessing that this program is getting hung waiting for an
ioctl or a line change to happen that hasn't happened yet.

Can you load the pl2303 driver with:
        modprobe pl2303 debug=1
and then run the program for me?

You should see a lot of information in the kernel debug log, any info on
ioctls that your program is using that is not supported by the driver
would be nice to see.

> 
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> #include <termios.h>
> #include <stdio.h>
> 
> #define MYDEVICE "/dev/ttyUSB0"
> main()
> {
>   int fd,c, res;
>   struct termios oldtio,newtio;
>   char buf[255];
> 
>  fd = open(MYDEVICE, O_RDWR | O_NOCTTY );
>  if (fd <0) {perror(MYDEVICE); exit(-1); }
> 
>  tcgetattr(fd,&oldtio); /* save current serial port settings */
>  bzero(&newtio, sizeof(newtio)); /* clear struct for new port settings */

Why not copy the old one to the new one, and then modify just the values
that you want to be different?

> 
>  newtio.c_cflag = B9600 | CS8 | CLOCAL | CREAD;
> 
>  newtio.c_oflag = 0;
> 
> /* uncomment this line to test the ONLCR lockup */
> 
> // newtio.c_oflag = OPOST | ONLCR;

For 2.6.0-test3 I just get the program sitting and spinning if I
uncomment this line.  glibc is waiting for some line change to happen
that isn't going to happen I'm guessing...

Have you tried 2.6 yet?

Remember all of the cr vs nl logic happens in the tty core and glibc,
not in the individual tty drivers (from what I can tell.)

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by Dice.com.
Did you know that Dice has over 25,000 tech jobs available today? From
careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
best hiring companies. http://www.dice.com/index.epl?rel_code=104
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to