All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tilman Schmidt <tilman@imap.cc>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: "Lars K.W. Gohlke" <lkwg82@gmx.de>, linux-kernel@vger.kernel.org
Subject: Re: How to access correctly serial port inside module?
Date: Wed, 23 May 2007 00:17:51 +0200	[thread overview]
Message-ID: <46536C0F.50101@imap.cc> (raw)
In-Reply-To: <Pine.LNX.4.61.0705151020310.9570@yvahk01.tjqt.qr>

[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]

Am 15.05.2007 10:43 schrieb Jan Engelhardt:
> On May 15 2007 01:00, Tilman Schmidt wrote:
>> Am 14.05.2007 22:00 schrieb Jan Engelhardt:
>>> On May 14 2007 19:40, Lars K.W. Gohlke wrote:
>>>>> after searching the mailing list and searching the web, I still don't
>>>>> know how to access correctly the serial port (in user space known as
>>>>> /dev/ttyS01)
>>> http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBad
>> That's not nice, sending a newbie on a wild goose chase like that.
>> He doesn't want to write to a file from kernel after all. Reading
>> FAQs is never bad, of course, but reading that particular one
>> won't help him at all with this questions.
> 
> The original poster is quite unclear about how he wants to access the
> serial port. [...]
> Unfortunately, my magic sphere is out of order, so I could only take
> a really really vague guess at what was wanted.

He asked about "the correct way". The document you cited will just
warn him against one of the many incorrect ones. That's less helpful
than not answering at all.

>>> inb/inw/inl, printk, outb/outw/outl.
>> This is even less nice. You're sending him down the road of
>> directly programming UART registers, knowing full well (I hope)
>> that this a Bad Thing.
> 
> This is how 8250.c works.

Exactly. Which is one reason why other parts of the kernel should not
do it themselves. (Another being of course that if you do it that way,
your code will only work with that particular type of serial port
hardware. As the last of the Ten Commandments for C Programmers has
been declaring for ages, you shouldn't assume that "All the world's a
VAX^WPC.")

HTH
T.

-- 
Tilman Schmidt                          E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]

  reply	other threads:[~2007-05-22 22:14 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14 13:00 How to access correctly serial port inside module? Lars K.W. Gohlke
2007-05-14 17:40 ` Lars K.W. Gohlke
2007-05-14 20:00   ` Jan Engelhardt
2007-05-14 20:25     ` Lars K.W. Gohlke
2007-05-14 23:00     ` Tilman Schmidt
2007-05-15  8:43       ` Jan Engelhardt
2007-05-22 22:17         ` Tilman Schmidt [this message]
2007-05-24 10:22           ` Lars K.W. Gohlke
2007-05-24 10:26             ` Jan Engelhardt
2007-05-24 10:45               ` Lars K.W. Gohlke
2007-05-24 10:50                 ` Jan Engelhardt
2007-05-24 11:20                   ` Lars K.W. Gohlke
2007-05-24 17:03             ` Tilman Schmidt
2007-05-24 17:19               ` Lars K.W. Gohlke
2007-05-24 17:29                 ` Jan Engelhardt
2007-05-24 19:15                   ` Lars K.W. Gohlke
2007-05-28 17:05                     ` Tilman Schmidt
2007-05-28 19:03                       ` Jan Engelhardt
2007-05-30  7:07                       ` Lars K.W. Gohlke
2007-05-30  7:46                         ` Lars K.W. Gohlke
2007-05-30  9:38                           ` Tilman Schmidt
     [not found]       ` <851fc09e0705162315w3380ddabh9b9f0b2198cb8457@mail.gmail.com>
2007-05-22 21:55         ` Tilman Schmidt
2007-06-03 20:28           ` Lars K.W. Gohlke
2007-06-05 21:41             ` Tilman Schmidt
2007-06-06  8:27               ` Lars K.W. Gohlke
2007-06-07 22:25                 ` Lars K.W. Gohlke
2007-06-08  0:27                   ` Tilman Schmidt
2007-05-14 22:37 ` Tilman Schmidt
2007-05-24 10:51   ` Lars K.W. Gohlke
  -- strict thread matches above, loose matches on Subject: below --
2007-06-05  7:55 Lars K.W. Gohlke
2007-06-07 22:27 Lars K.W. Gohlke

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=46536C0F.50101@imap.cc \
    --to=tilman@imap.cc \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkwg82@gmx.de \
    /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.