[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190709162221.623f99ce@alans-desktop>
Date: Tue, 9 Jul 2019 16:22:21 +0100
From: Alan Cox <gnomes@...rguk.ukuu.org.uk>
To: Martin Hundebøll <martin@...nix.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, linux-kernel@...r.kernel.org,
Sean Nyekjær <sean@...nix.com>,
Esben Haabendal <esben@...nix.com>
Subject: Re: [PATCH 4/4] tty: n_gsm: add ioctl to map serial device to
mux'ed tty
On Mon, 8 Jul 2019 21:02:52 +0200
Martin Hundebøll <martin@...nix.com> wrote:
> Guessing the base tty for a gsm0710 multiplexed serial device is not
> currently possible, which makes it racy to use with multiple modems.
>
> Add a way to map the physical serial tty to its related mux devices
> using a ioctl.
That looks very sensible
> + int base;
>
> /* open the serial port connected to the modem */
> fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY);
> @@ -58,6 +61,11 @@ Major parts of the initialization program :
> c.mtu = 127;
> /* set the new configuration */
> ioctl(fd, GSMIOC_SETCONF, &c);
> + /* get and print base gsmtty device node */
> + ioctl(fd, GSMIOC_GETBASE, &base);
Can we at least use a specific sized type ? uint32_t or whatever is fine.
Alan
Powered by blists - more mailing lists