lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 30 Oct 2010 01:55:13 +0200 From: Arnd Bergmann <arnd@...db.de> To: Alan Cox <alan@...rguk.ukuu.org.uk> Cc: Timur Tabi <timur@...escale.com>, gregkh <gregkh@...e.de>, lkml <linux-kernel@...r.kernel.org> Subject: Re: Writing a console/tty driver -- how to use tty_port? On Friday 29 October 2010, Alan Cox wrote: > On Thu, 28 Oct 2010 22:57:33 +0200 > Arnd Bergmann <arnd@...db.de> wrote: > > > On Wednesday 27 October 2010 23:04:13 Timur Tabi wrote: > > > Do you have an updated version of Tiny TTY that uses tty_port structures? I'm > > > trying to write a new TTY driver for a device that is not a UART, and I'm having > > > a hard time finding a good example. I suspect I need to understand the tty_port > > > structure, but I can't find any documentation for it. > > > > If the device is not a UART, the best option may be to make the driver > > a backend to the hvc driver, like e.g. drivers/char/hvc_tile.c. > > > > This works for all devices with or without interrupts that don't need > > to set up the communication parameters but simply provide a read/write > > character interface. > > I really don't understand the love of hvc when the hvc drivers seem to be > bigger than native tty_port code and haul a whole blob of extra midlayer > glue into the system. > Two reasons for me: * It does all the timers for the tty device to poll reads and retry writes. If someone writes similar code from scratch, they most likely get it wrong. * It's about the simplest interface you can imagine for a new backend driver, only register a data structure with two function pointers! Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists