From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id AD3671F0B05; Wed, 8 Feb 2017 18:06:21 -0500 (EST) Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::241]) by befuddled.reisers.ca (Postfix) with ESMTPS id 5615A1F0B11 for ; Wed, 8 Feb 2017 18:06:09 -0500 (EST) Received: by mail-qk0-x241.google.com with SMTP id e1so20018142qkh.1 for ; Wed, 08 Feb 2017 15:06:09 -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:content-transfer-encoding; bh=PVYumBNeYVA3rez1OKh1QEgi9DABJS0cmYPkfnfShlQ=; b=AVfc/hsWgU2VNaSUcb8wlaZ5bK5/wTxRNSkiVlVzXwcq1cgnjd6hSWi/4m/dhxY+vl P6tyKTQXaVRc94UUdTQO9X8rzo/wORGo5WPevmhkO4nSYZHcAHOjXq0/NXSQz9RG5C/L DM7Bd1/flr9nVpanTvUMv9njqn8Kz71mASy5H6UdKQ8rzPGpCv3cd3CX8PQd9j0OPM8t jpzM8JtFcQC1SOE9euV5kKtgifqgyP2slSYAI22iqjnZ4IMQzquGeIuw9rSn9d1uMkom MUbBUUXj/7xu65TIKF/wA8MnCwyYv+cJq2/7qJ4nmU2WLvckm7vr+mKF+71uUJPoa0cL gU/w== 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:content-transfer-encoding; bh=PVYumBNeYVA3rez1OKh1QEgi9DABJS0cmYPkfnfShlQ=; b=r+fd6MUItn2jZJxIGE64OsGTthVrKWoKRy0wVXC2dFwMYKT9kS1xTNSGyF/Qgtg2Ch N0uw0WDxhiqg7bVXaejtlChzvgBuz4rSDX2HXXFxYeoJfqb39szslUvXNzSv4BMcK2sT qx3SufM+C4Uoz77c25HqcC94vYaiHVXfP9tM68WmmDDU/+PaqrOIHgYiUNaROHKlt2NF aFwWRPPGjdcZEKyKHo4guw8XjnGniiDw9hHGHHIFso38wse9/IECF/tKIEE/17pXaI9h gokBxuC9Zg9zJJz4FbLY9FbRYuwh8c/ld23XDldqN3W+nm9PlFsMNP5VizlwgCAh1bZe Fqlg== X-Gm-Message-State: AMke39mq+L/tJU95e7Pns1gJNwocGPYLwQ4cDYF7LEushyXZGNl7HwO3yvekH9nj9QR/8/FBeGKZk/Dr4ES6Og== X-Received: by 10.55.100.130 with SMTP id y124mr40023qkb.108.1486595168843; Wed, 08 Feb 2017 15:06:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.44.8 with HTTP; Wed, 8 Feb 2017 15:06:08 -0800 (PST) In-Reply-To: <20170208225956.GU2955@var.home> References: <20170208225956.GU2955@var.home> From: Okash Khawaja Date: Wed, 8 Feb 2017 23:06:08 +0000 Message-ID: Subject: Re: [PATCH 1/5] staging: speakup: enable access to tty device To: Samuel Thibault Cc: "Speakup is a screen review system for Linux." Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 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: Wed, 08 Feb 2017 23:06:23 -0000 On Wed, Feb 8, 2017 at 10:59 PM, Samuel Thibault wrote: > Okash Khawaja, on Wed 08 Feb 2017 22:46:32 +0000, wrote: >> enable acess to tty device from kernel module > > You need much more explanations, and also this is based on a patch from > Alan Cox > (http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1215095.html= ), > so you should integrate the explanations, something like: > > =E2=80=9C > tty_port: allow a port to be opened with a tty that has no file handle > > Let us create tty objects entirely in kernel space. > > With this a kernel created non file backed tty object could be used to ha= ndle > data, and set terminal modes. Not all ldiscs can cope with this as N_TTY = in > particular has to work back to the fs/tty layer. > > The tty_port code is however otherwise clean of file handles as far as I = can > tell as is the low level tty port write path used by the ldisc, the > configuration low level interfaces and most of the ldiscs. > > Currently you don't have any exposure to see tty hangups because those ar= e > built around the file layer. However a) it's a fixed port so you probably > don't care about that b) if you do we can add a callback and c) you almos= t > certainly don't want the userspace tear down/rebuild behaviour anyway. > > This should however be sufficient if we wanted for example to enumerate a= ll > the bluetooth bound fixed ports via ACPI and make them directly available= . > > It doesn't deal with the case of a user opening a port that's also kernel > opened and that would need some locking out (so it returned EBUSY if boun= d > to a kernel device of some kind). That needs resolving along with how you > "up" or "down" your new bluetooth device, or enumerate it while providing > the existing tty API to avoid regressions (and to debug). > =E2=80=9D > > You'll need to have Alan Cox in Cc when actually submitting the patch, > so he gets to comment on it. You'll then have to add your Signed-off-By > along his own, see linux/Documentation/SubmittingPatches for the > details. > > Samuel Okay, wasn't best placed to put in details for this this one so the above really helps. Will follow this with better formatted patch set.