From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 16E8B1EFDCD; Sun, 18 Dec 2016 06:24:19 -0500 (EST) Received: from mail-qk0-x22d.google.com (mail-qk0-x22d.google.com [IPv6:2607:f8b0:400d:c09::22d]) by befuddled.reisers.ca (Postfix) with ESMTPS id B7CED1EFDC1 for ; Sun, 18 Dec 2016 06:24:16 -0500 (EST) Received: by mail-qk0-x22d.google.com with SMTP id n21so1373890qka.3 for ; Sun, 18 Dec 2016 03:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=lz36FGvmdtGYgNz/xTL02mFs9aydWudS0BUAlYCwk4E=; b=oA8WyOXRwQvCAK7wMW1+81J6mSQyixd4iz8QwbkUe9/jt4SA5e3Yb3ZBAlEcVJxnQb q7oJvmW8y69eZ5RJXv/dsbUq+ceYleOwqXELj4vlJ4psaQEc8ZeFuAeZ5Gz+zS9sAJYM qjNfX4n+gSG0fCFSim7k0a/afC/2KF07Zx0OPtIHk17whysFzzIOHQcHDvJtL7WOVYUf XwM8v6cdps9m1DOKhCf/8LKgU2+kBKB+rFgp6ZjbEvltG2ztF/JuES+EVFBtdAf8yOsZ jz+DXDMcJ5wS8H1SLcnllKtkEe/2HJxv8Ud23+yiGyhNgGQkI4OEoOdxtJEsWnBiZmtQ CLnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lz36FGvmdtGYgNz/xTL02mFs9aydWudS0BUAlYCwk4E=; b=sIV/YYwjNA4qnBrZAAOE/R8PuHYpDUbC2ang6eTtUSU+puGFU7JgcJr/86jcbHS6kC HgkIrl8lO87ec+p4hcShr1bfXEcr4k85F84gq7yhMpXaCKdhqYTNCT1QyIWB671ym5Qz C+SB1d5E8yr+YcJB67JYySx53Zg1vHzgxUMFDlvxmDaG731txKvKLGiDRw2oQpVXRCQY lt9BhFDfSDdSfRH8I7nEE4yi+ShmVuH2Gck7OPr7LTtq0FBWMjcxxuZew0OdAKtSCiPy dERmZeJbjcZi2WElfb8+5XjGM48sm68DdBgUP1OwxaGKHXs2bJlGov/k8fIYG8TEz7lG JoYA== X-Gm-Message-State: AIkVDXKdbhl7pgokflDIA0RBsJgSzXGuIUgPW6X8MfttCsKoIcuW+qHL2UsphSfEZgKYJvIl/pBu9R7WK63uEg== X-Received: by 10.55.100.204 with SMTP id y195mr460230qkb.23.1482060252366; Sun, 18 Dec 2016 03:24:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.48.33 with HTTP; Sun, 18 Dec 2016 03:24:11 -0800 (PST) In-Reply-To: References: From: Okash Khawaja Date: Sun, 18 Dec 2016 11:24:11 +0000 Message-ID: Subject: Re: Line discipline To: Samuel Thibault Cc: "Speakup is a screen review system for Linux." X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2016 11:24:19 -0000 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 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 >