linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: khalasa@piap.pl (Krzysztof Hałasa)
To: linux-kernel@vger.kernel.org
Subject: 3.4.10 N_GSM tty_io WARNING and lockup
Date: Wed, 05 Sep 2012 12:56:03 +0200	[thread overview]
Message-ID: <m3k3w8g2m4.fsf@t19.piap.pl> (raw)

Hi,

I'm trying to use GSM tty line discipline. Basically

echo AT+CMUX=0 > /dev/ttyS0

set termios (speed etc.)
int ldisc = N_GSM0710;
ioctl(fd, TIOCSETD, &ldisc);

...

The ioctl first fails with EIO (probably due to inactive DCD line) in
tty_set_ldisc():

	if (test_bit(TTY_HUPPED, &tty->flags)) {
		/* We were raced by the hangup method. It will have stomped
		   the ldisc data and closed the ldisc down */
		clear_bit(TTY_LDISC_CHANGING, &tty->flags);
		mutex_unlock(&tty->ldisc_mutex);
		tty_ldisc_put(new_ldisc);
		tty_unlock();
		return -EIO;                         <<<<<< HERE
	}


Now trying to run the program again:

------------[ cut here ]------------
WARNING: at /home/khalasa/src/linux-3.4/drivers/tty/tty_io.c:1368 tty_open+0x2e8/0x55c()
Modules linked in: m25p80 ag71xx
Call Trace:
 [<8030a02c>] dump_stack+0x8/0x34
 [<8007a35c>] warn_slowpath_common+0x78/0xa4
 [<8007a3a0>] warn_slowpath_null+0x18/0x24
 [<80193cac>] tty_open+0x2e8/0x55c
 [<800f1500>] chrdev_open+0x120/0x164
 [<800eb320>] __dentry_open.isra.12+0x1bc/0x318
 [<800fae54>] do_last.isra.32+0x774/0x78c
 [<800fb094>] path_openat+0xcc/0x3b4
 [<800fb498>] do_filp_open+0x3c/0xa4
 [<800ec3dc>] do_sys_open+0x13c/0x1ec
 [<80068dc4>] stack_done+0x20/0x40

---[ end trace 5958cc366bfb54c4 ]---

then it locks up (task "D" state, though interruptible).

A known problem probably?
Any ideas? (I know about CLOCAL).
-- 
Krzysztof Halasa

Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland

             reply	other threads:[~2012-09-05 11:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 10:56 Krzysztof Hałasa [this message]
2012-09-06 13:01 ` 3.4.10 N_GSM tty_io WARNING and lockup Alan Cox
2012-09-07 11:07   ` Krzysztof Hałasa
2012-09-07 12:59     ` Krzysztof Halasa
2012-09-07 13:29       ` Alan Cox
2012-09-07 16:14         ` Krzysztof Halasa

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=m3k3w8g2m4.fsf@t19.piap.pl \
    --to=khalasa@piap.pl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).