Hi,
just found, that ircomm_tty_ioctl.c function ircomm_tty_ioctl()
always returns 0, if cmd == TIOCGICOUNT.
IMHO, if IRDA_DEBUG(0, __FUNCTION__ "(), TIOCGICOUNT not impl!\n")
it should return -ENOIOCTLCMD and NOT 0 to indicate an "error" (i.e.
telling that TIOCGICOUNT is not usable).
Otherwise application like rxtx (linux commapi support for java)
assume it is working and screw up even the irda stack, so that is
not usable anymore.
E.g. rxtx: SerialImp.c:RXTXPort()
...
if( ioctl( fd, TIOCGICOUNT, &osis ) < 0 ) {
report("Port does not support TIOCGICOUNT events\n" );
has_tiocgicount = 0;
}
...
so currently it assumes TIOCGICOUNT is working and throws always an
Framing Error, when it uses
...
if (has_tiocgicount) {
if( ioctl( fd, TIOCGICOUNT, &sis ) ) break;
while( sis.frame != osis.frame ) {
send_event( env, jobj, SPE_FE, 1);
osis.frame++;
}
...
}
...
syslog says:
Sep 20 04:51:34 kermit kernel: irlap_recv_disc_frame()
Sep 20 04:51:34 kermit kernel: irlap_state_nrm_p(), RECV_RD_RSP
Sep 20 04:51:34 kermit kernel: irlap_change_speed(), setting speed to 9600
Sep 20 04:51:37 kermit kernel: irlap_change_speed(), setting speed to 115200
again and again. So I need to kill irattach and remove all ir* modules
from and insert them via irattach into the kernel again, to get the
irda stuff working again (e.g. with minicom). Ocassionally the kernel
even panics, when removing the ir* modules with an EIP :(((
So do you agree, that ircomm_tty_ioctl(..., TIOCGICOUNT, ...)
should return -ENOIOCTLCMD instead of 0 ?
Regards,
jens.
--
+---[ Jens Elkner ]--------------------------------------------------------+
| Walther-Rathenau-Str. 58 [EMAIL PROTECTED] |
| 39104 Magdeburg GERMANY http://www.linofee.org/ |
+--------------------------------------------------------------------------+
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda