From greeen@iii.org.tw Mon Apr 9 22:42:39 2001 Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id WAA12293; Mon, 9 Apr 2001 22:42:39 +0200 (MET DST) Received-Date: Mon, 9 Apr 2001 22:42:39 +0200 (MET DST) Received: from h179-210-243-135.iii.org.tw(210.243.135.179), claiming to be "mta0.iii.org.tw" via SMTP by guadalquivir.fnet.fr, id smtpd012286; Mon Apr 9 22:42:28 2001 Received: from [140.92.66.45] (helo=iiidns.iii.org.tw) by mta0.iii.org.tw with esmtp (Exim 3.16 #1) id 14mX3v-0005SS-00; Mon, 09 Apr 2001 16:30:15 +0800 Received: from Green ([140.92.12.76]) by iiidns.iii.org.tw (8.10.2/8.10.2) with SMTP id f398N0T11444; Mon, 9 Apr 2001 16:23:04 +0800 (CST) Message-ID: <004101c0c0d0$33ca4b40$4c0c5c8c@trd.iii.org.tw> From: "Green" To: "LinuxKernelMailList" , "MipsMailList" , "LinuxEmbeddedMailList" Subject: I can't read data from COM1 Date: Mon, 9 Apr 2001 16:36:30 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003E_01C0C113.3B269EA0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 This is a multi-part message in MIME format. ------=_NextPart_000_003E_01C0C113.3B269EA0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi all, I write a sample code(user mode) to test the serial driver. I can open COM1 and write string to COM1. But, when I want to read data from COM1, the program will block at read = function. I trace the driver source code. 1. When the program execute write operation, it will call tty_write( ) at = /drivers/char/tty_io.c. Then it will call gs_write( ) at /drivers/char/general.c. 2. When the program execute read operation,it will call tty_read( ) at = /drivers/char/tty_io.c. Then I don't know which function would be called. But it was blocked at operation which called = (tty->ldisc.read)(tty,file,buf,count), as the following /* Function tty_read( ) in tty_io.c */ if (tty->ldisc.read) { /* Program will be blocked here */ i =3D (tty->ldisc.read)(tty,file,buf,count); } else { /* Error happened */ i =3D -EIO; } What parameter should I reset? Thanks in advance. = Green ------=_NextPart_000_003E_01C0C113.3B269EA0 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable
Hi all,
 
I write a sample code(user = mode) to test the serial=20 driver.
I can open COM1 and write = string to COM1.
But, when I want to read data = from COM1, the program will=20 block at read function.
I trace the driver source = code.
 
1.
When the program execute write = operation, it will call=20 tty_write( ) at=20 /drivers/char/tty_io.c.
Then it will call = gs_write( ) at=20 /drivers/char/general.c.
 
2.
When the program execute read = operation,it will call=20 tty_read( ) at=20 /drivers/char/tty_io.c.
Then I don't know which = function would be=20 called.
But it was blocked at operation = which called=20 (tty->ldisc.read)(tty,file,buf,count), as the=20 following
 
/* Function tty_read( ) in=20 tty_io.c */
if=20 (tty->ldisc.read)
{
      = /* Program will be blocked=20 here */
      i = =3D=20 (tty->ldisc.read)(tty,file,buf,count);
 }
=  else
 {
      /* Error=20 happened */
      i =3D=20 -EIO;
 }
 
What parameter should I = reset?
Thanks in advance.
    =        =20             =    =20             =    =20             =    =20             =    =20             =    =20             =    =20             =    =20 Green
 
------=_NextPart_000_003E_01C0C113.3B269EA0--