From: Greg KH <gregkh@linuxfoundation.org>
To: "D. Starke" <daniel.starke@siemens.com>
Cc: linux-serial@vger.kernel.org, jirislaby@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] tty: n_gsm: make n_gsm line number configurable
Date: Wed, 12 Oct 2022 08:50:19 +0200 [thread overview]
Message-ID: <Y0Zjqxl/MAivtf02@kroah.com> (raw)
In-Reply-To: <20221012061715.4823-1-daniel.starke@siemens.com>
On Wed, Oct 12, 2022 at 08:17:15AM +0200, D. Starke wrote:
> From: Daniel Starke <daniel.starke@siemens.com>
>
> Currently, the n_gsm line number and its derived virtual ttys are assigned
> in the order of allocations with no means to change this.
Which is fine, why do you need this to be changed? What relies on
specific line numbers in userspace that can not handle things correctly
with the normal userspace tools we have for this type of thing?
> Introduce additional ioctl parameters numValid and num to configure the
> line number to allow predictable virtual tty allocation and numbering.
> Especially when using multiple n_gsm instances at the same time.
Ick, please no. That should never be needed, the kernel number and name
can be anything random (and people have suggested that we do make them
random at times). Don't hard-code numbers in your userspace tools, that
is just wrong.
> --- a/include/uapi/linux/gsmmux.h
> +++ b/include/uapi/linux/gsmmux.h
> @@ -19,7 +19,9 @@ struct gsm_config
> unsigned int mtu;
> unsigned int k;
> unsigned int i;
> - unsigned int unused[8]; /* Padding for expansion without
> + unsigned short numValid;
> + unsigned short num;
This would never work anyway (hint "short" is not a valid uapi data
type...)
thanks,
greg k-h
next prev parent reply other threads:[~2022-10-12 6:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 6:17 D. Starke
2022-10-12 6:50 ` Greg KH [this message]
2022-10-13 11:09 ` Starke, Daniel
2022-10-13 12:57 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y0Zjqxl/MAivtf02@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=daniel.starke@siemens.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®