From: Jiri Slaby <jirislaby@gmail.com>
To: "Kilau, Scott" <Scott_Kilau@digi.com>
Cc: Greg KH <greg@kroah.com>,
Greg.Chandler@wellsfargo.com, linux-kernel@vger.kernel.org,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Andrew Morton <akpm@osdl.org>
Subject: Re: kernel oops with extended serial stuff turned on...
Date: Thu, 19 Oct 2006 11:02:39 +0200 [thread overview]
Message-ID: <45373F2F.90906@gmail.com> (raw)
In-Reply-To: <335DD0B75189FB428E5C32680089FB9FA473E9@mtk-sms-mail01.digi.com>
Cc: Alan Cox (who may be involved)
Cc: Andrew Morton (who forwarded me this message, thanks)
Kilau, Scott wrote:
> Hi Greg,
>
>> What other driver is using the ttyM0 name?
drivers/char/mxser.c: mxvar_sdriver->name = "ttyM";
drivers/char/isicom.c: isicom_normal->name = "ttyM";
drivers/char/amiserial.c: serial_driver->name = "ttyS";
drivers/char/serial167.c: cy_serial_driver->name = "ttyS";
drivers/char/vme_scc.c: scc_driver->name = "ttyS";
drivers/char/istallion.c:static char *stli_serialname = "ttyE";
drivers/char/stallion.c: stl_serial->name = "ttyE";
drivers/char/vt.c: console_driver->name = "tty";
drivers/char/viocons.c: viotty_driver->name = "tty";
Should we do something with these?
>> Any pointer to your driver's code so I can see if you are doing
>> something odd here? Any reason it's just not in the main kernel tree so
>> I would have fixed it up at the time I did the other fixes?
>
> Sorry,
> I probably shouldn't have brought my driver up,
> its just confusing things. =)
>
> Greg C is not running any of my out-of-tree drivers,
> or even using one of our (Digi) boards.
>
> I just saw his warning/error, and noticed it was the same as what I saw
> back when 2.6.18 was released, so I figured I would hop in and
> explain what I did to fix the problem in my driver...
>
> (BTW, the error turns up a few times in a google of...
> "don't try to register things with the same name in the same directory."
> I wonder if all the "tty" ones are all related...)
>
> In Greg C's case, he turned on *all* the serial options in "make config",
> because he wasn't sure which serial card he had...
>
> Turns out that the driver/char/isicom.c driver claimed his board, and then
> tried to register the ttyM0 name, which apparently someone else
> in the kernel did already...
>
> You have a good point tho, we probably should actually look at /dev/ttyM0
> on his system, and see who is actually claiming it already...
From the other mail:
> You need to change this line:
>
> isicom_normal->flags = TTY_DRIVER_REAL_RAW;
>
> To:
>
> isicom_normal->flags = TTY_DRIVER_REAL_RAW |
> TTY_DRIVER_DYNAMIC_DEV;
>
> In the "drivers/char/isicom.c" file.
This is not a good idea, because the driver doesn't call tty_register_device at
all. It fixes it, because it doesn't "reserve" the names and you can silently
register the other driver, that might use it. This is wrong.
We have a few options:
- rewrite them to use TTY_DRIVER_DYNAMIC_DEV (I'm going to do this in isicom anyway)
- rename tty->names (will this something break? udev should cope with this,
doesn't it?)
- any other solution?
regards,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
next prev parent reply other threads:[~2006-10-19 9:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 22:35 kernel oops with extended serial stuff turned on Kilau, Scott
2006-10-18 23:09 ` Greg KH
2006-10-19 0:20 ` Kilau, Scott
2006-10-19 9:02 ` Jiri Slaby [this message]
2006-10-19 9:42 ` Jiri Slaby
2006-10-19 10:58 ` Kilau, Scott
2006-10-19 11:01 ` Jiri Slaby
2006-10-19 13:14 ` Alan Cox
2006-10-19 12:00 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2006-10-18 21:16 Kilau, Scott
2006-10-18 21:21 ` Greg KH
2006-10-18 21:07 Greg.Chandler
2006-10-18 20:32 Kilau, Scott
2006-10-18 17:51 Greg.Chandler
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=45373F2F.90906@gmail.com \
--to=jirislaby@gmail.com \
--cc=Greg.Chandler@wellsfargo.com \
--cc=Scott_Kilau@digi.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--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