Line discipline
Okash Khawaja
okash.khawaja at gmail.com
Sun Dec 18 06:24:11 EST 2016
Hi,
Looks like my previous email didn't get through due to large attachment
size.
I've combined your module with my code and created speakup-test.c module (
http://pastebin.com/pXqRgyF1). When compiled into the kernel binary, it is
able to communicate during the boot process. Relevant part of kernel log
reproduced below. I've posted full log here: http://pastebin.com/UqMAktFm
[ 3.382675] GHES: HEST is not enabled!
[ 3.383142] ACPI: Battery Slot [BAT0] (battery present)
[ 3.383161] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 3.404736] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a
16550A
[ 3.405554] Linux agpgart interface v0.103
[ 3.405616] got tty ffff97ed674b0000
[ 3.405805] speakup_test_open(): tty->name: ttyS0;
tty->ldisc->ops->name: speakup_test_ldisc
[ 3.405894] speakup_test_open(): done writing. rv=9
[ 3.407209] brd: module loaded
[ 3.407722] loop: module loaded
[ 3.407789] ata_piix 0000:00:01.1: version 2.13
[ 3.408060] scsi host0: ata_piix
Comms work fine both as a LKM and when built in.
Now I see three items to address, listed below in no particular order.
1. Supplying major and minor dev numbers, instead of hardcoding.
2. Integrating the changes into speakup_dummy and testing it.
3. Strategy for kernel patch. Do we try to have it accepted? Not sure if
there is a standard way of addressing it.
Thanks,
Okash
On Mon, Nov 21, 2016 at 10:32 PM, Okash Khawaja <okash.khawaja at gmail.com>
wrote:
> Hi,
>
> Just to be sure, this is what we want for speakup_dummy.
>
> 1. register ldisc structure in spk_tty_probe().
> 2. in spk_tty_probe(), attach line discipline - like you would for
> /dev/ttyX from user space
> 3. in open() method of ldisc structure, take the tty_struct and cache it.
> 4. in spk_serial_out_tty() call tty->ops->write() instead of outb().
>
> What have a I missed here?
>
> Thanks,
> Okash
>
More information about the Speakup
mailing list