From: Paul Fulghum <paulkf@microgate.com>
To: ian <spyro@f2s.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: Line disciplines.
Date: Tue, 15 Jul 2008 15:37:45 -0600 [thread overview]
Message-ID: <487D18A9.20304@microgate.com> (raw)
In-Reply-To: <1216152625.11481.38.camel@wirenth>
ian wrote:
> Im trying to use a line discipline as a way to hook my kernel module up
> to a serial port.
>
> I've implemented methods for open, close, and receive_buf, and
> registered the line discipline (Im using N_MOUSE as my number for now)
>
> I've tried using stty line 2 < /dev/ttyS1 to attach my line discipline
> to a serial port (and tried this on an already open port too (using cat
> to open the port) and my methods never get called.
>
> I've even written a little userspace program that opens ttyS1 and uses
> tcsetattr() to select c_line=N_MOUSE.
>
> It looks like the ldisc is being set because after this stty reports
> ttyS1 to be using '2' which is correct, however my methods are still
> never called.
>
> What am I missing?
I suspect that since you are using an existing ldisc number
that the existing ldisc module is being loaded instead of
your module.
Do you see the init routine of your module called?
If so, what is the return value from tty_register_ldisc()?
--
Paul Fulghum
MicroGate Systems, Ltd.
next prev parent reply other threads:[~2008-07-15 20:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 20:10 Line disciplines ian
2008-07-15 21:37 ` Paul Fulghum [this message]
2008-07-15 22:57 ` ian
2008-07-16 2:10 ` Paul Fulghum
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=487D18A9.20304@microgate.com \
--to=paulkf@microgate.com \
--cc=linux-serial@vger.kernel.org \
--cc=spyro@f2s.com \
/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