From: Peter Hurley <peter@hurleysoftware.com>
To: markh@compro.net
Cc: linux-serial@vger.kernel.org, Mark Hounschell <dmarkh@cfl.rr.com>
Subject: Re: Out of tree GPL serial tty driver help?
Date: Thu, 25 Apr 2013 17:41:11 -0400 [thread overview]
Message-ID: <1366926071.3452.17.camel@thor.lan> (raw)
In-Reply-To: <51781A19.5030707@compro.net>
On Wed, 2013-04-24 at 13:44 -0400, Mark Hounschell wrote:
> I've been sort of maintaining a couple of Digi International serial port
> card (XP and AP) drivers for years now because, well, they just won't do
> it anymore. In any case, I'm moving from a 3.4.x kernel, that works just
> fine, to a 3.8.8 kernel, that does not. I have code that does something
> like this:
>
> tty_set_operations(&SerialDriver, &SerialOps);
> tty_register_driver(&SerialDriver);
> maxminor = NumBoards * 64;
> for (i = 0; i < maxminor; i++)
> tty_register_device(&SerialDriver, i, NULL);
You're correct in diagnosing the problem to cdevs == NULL.
You're missing:
maxminor = min(num_boards * 64, 256);
serial_driver = alloc_tty_driver(maxminor);
then,
/* Fill in pertinent tty_driver fields, esp. */
serial_driver->flags = TTY_DRIVER_DYNAMIC_DEV;
tty_set_operations(serial_driver, &serial_ops);
tty_register_driver(serial_driver);
for (i = 0; i < maxminor; i++)
tty_register_device(serial_driver, i, NULL);
Regards,
Peter Hurley
PS - Each board supports 64 individual serial ports??
next prev parent reply other threads:[~2013-04-25 21:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 17:44 Out of tree GPL serial tty driver help? Mark Hounschell
2013-04-25 21:41 ` Peter Hurley [this message]
2013-04-26 12:58 ` Mark Hounschell
2013-04-26 13:45 ` Peter Hurley
2013-04-26 14:28 ` Mark Hounschell
2013-04-26 14:35 ` Greg KH
2013-04-26 15:10 ` Mark Hounschell
2013-04-26 15:19 ` Greg KH
2013-04-26 15:39 ` Peter Hurley
2013-04-26 16:03 ` Greg KH
2013-04-26 17:58 ` Mark Hounschell
2013-04-26 23:21 ` Greg KH
2013-04-26 16:37 ` Peter Hurley
2013-04-26 18:17 ` Mark Hounschell
2013-04-26 19:51 ` Peter Hurley
2013-04-26 20:26 ` Mark Hounschell
2013-04-26 21:49 ` Peter Hurley
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=1366926071.3452.17.camel@thor.lan \
--to=peter@hurleysoftware.com \
--cc=dmarkh@cfl.rr.com \
--cc=linux-serial@vger.kernel.org \
--cc=markh@compro.net \
/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).