From: Jozef Vesely <vesely@gjh.sk>
To: irda-users@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: [PROBLEM] ircomm ioctls
Date: Tue, 13 Jan 2004 12:00:15 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.44.0401131148070.18661-100000@eloth> (raw)
Hi,
since upgrading to the 2.6.1 (from 2.4.22)
I am gettig this error (while connecting to my mobile phone):
------
# gsmctl -d /dev/ircomm0 ALL
gsmctl[ERROR]: clearing DTR failed (errno: 22/Invalid argument)
------
the code in: gsmlib-1.10/gsmlib/gsm_unix_serial.cc
------
// toggle DTR to reset modem
int mctl = TIOCM_DTR;
if (ioctl(_fd, TIOCMBIC, &mctl) < 0)
throwModemException(_("clearing DTR failed"));
// the waiting time for DTR toggling is increased with each loop
usleep(holdoff[initTries]);
if (ioctl(_fd, TIOCMBIS, &mctl) < 0)
throwModemException(_("setting DTR failed"));
------
pointed me to tke kernel:
the ioctls TIOCMBIC, TIOCMBIS, TIOCMSET and TIOCMGET are handled both in
net/irda/ircomm/ircomm_tty_ioctl.c function ircomm_tty_ioctl()
-----
switch (cmd) {
case TIOCMGET:
ret = ircomm_tty_get_modem_info(self, (unsigned int *) arg);
break;
case TIOCMBIS:
case TIOCMBIC:
case TIOCMSET:
ret = ircomm_tty_set_modem_info(self, cmd, (unsigned int *) arg);
break;
-----
and in
drivers/char/tty_io.c function tty_ioctl()
-----
switch (cmd) {
...
case TIOCMGET:
return tty_tiocmget(tty, file, arg);
case TIOCMSET:
case TIOCMBIC:
case TIOCMBIS:
return tty_tiocmset(tty, file, cmd, arg);
}
if (tty->driver->ioctl) {
int retval = (tty->driver->ioctl)(tty, file, cmd, arg);
if (retval != -ENOIOCTLCMD)
return retval;
}
-----
The tty_tiocmset() checks for driver->tiocmset and calls it. In case
of ircomm driver->tiocmset is not set since those ioctls are meant
to be handled by driver->ioctl, however tty_tiocmset returns with -EINVAL
and driver->ioctl never gets called.
I am beginner in the kernel programing, and therefore I would rather let more
experienced to create the patch (I don't want to mess up something).
I hope this descrition would be helpful, and somebody fixes the problem.
Thank you in advance
Jozef Vesely
vesely@gjh.sk
next reply other threads:[~2004-01-13 11:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-13 11:00 Jozef Vesely [this message]
2004-01-13 11:36 ` [PROBLEM] ircomm ioctls Russell King
2004-01-13 11:49 ` Outstanding fixups (was: Re: [PROBLEM] ircomm ioctls) Russell King
2004-01-13 17:15 ` Russell King
2004-01-13 17:24 ` [1/3] Serial fixups (mostly tested) Russell King
2004-01-24 6:16 ` [lkml] pseudo tty / kernel compile question Karl Tatgenhorst
2004-01-25 21:53 ` David Woodhouse
2004-01-13 17:33 ` [2/3] Russell King
2004-01-13 17:55 ` [2/3] Henrique Oliveira
2004-01-13 18:53 ` [2/3] John Stoffel
2004-01-13 22:15 ` [2/3] Paul Mackerras
2004-01-14 7:01 ` [2/3] Benjamin Herrenschmidt
2004-01-16 11:34 ` [2/3] Matthias Urlichs
2004-01-16 0:54 ` [2/3] Greg KH
2004-01-18 12:43 ` [2/3] Greg Ungerer
2004-01-18 15:42 ` [2/3] Russell King
2004-01-18 23:23 ` [2/3] Greg Ungerer
2004-01-13 17:42 ` [3/3] 2.6 broken serial drivers Russell King
2004-01-13 20:21 ` Andrew Morton
2004-01-13 21:10 ` Russell King
2004-01-18 16:16 ` Russell King
2004-01-14 12:42 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0401131148070.18661-100000@eloth \
--to=vesely@gjh.sk \
--cc=irda-users@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.