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: [email protected] Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: How to access correctly serial port inside module?
- From: "Lars K.W. Gohlke" <[email protected]>
- Re: How to access correctly serial port inside module?
- References:
- How to access correctly serial port inside module?
- From: "Lars K.W. Gohlke" <[email protected]>
- Re: How to access correctly serial port inside module?
- From: "Lars K.W. Gohlke" <[email protected]>
- Re: How to access correctly serial port inside module?
- From: Jan Engelhardt <[email protected]>
- Re: How to access correctly serial port inside module?
- From: Tilman Schmidt <[email protected]>
- Re: How to access correctly serial port inside module?
- From: Jan Engelhardt <[email protected]>
- How to access correctly serial port inside module?
- Prev by Date: Re: [PATCH 2/2] make fbcon unregister when unloaded
- Next by Date: Re: [PATCH] Chaining sg lists for big IO commands v5
- Previous by thread: Re: How to access correctly serial port inside module?
- Next by thread: Re: How to access correctly serial port inside module?
- Index(es):