From: Greg KH <gregkh@linuxfoundation.org>
To: "Starke, Daniel" <daniel.starke@siemens.com>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"jirislaby@kernel.org" <jirislaby@kernel.org>,
"ilpo.jarvinen@linux.intel.com" <ilpo.jarvinen@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/4] tty: n_gsm: add keep alive support
Date: Thu, 9 Feb 2023 13:26:35 +0100 [thread overview]
Message-ID: <Y+Tme2bRXCebRGcS@kroah.com> (raw)
In-Reply-To: <DB9PR10MB58818B4443F5EA3CB8766DF3E0D99@DB9PR10MB5881.EURPRD10.PROD.OUTLOOK.COM>
On Thu, Feb 09, 2023 at 12:09:04PM +0000, Starke, Daniel wrote:
> > > + if (gsm->ka_num && gsm->ka_retries == 0) {
> > > + /* Keep-alive expired -> close the link */
> > > + if (debug & DBG_ERRORS)
> > > + pr_info("%s keep-alive timed out\n", __func__);
> >
> > info for a debugging error? no, please don't do that. Please fix up
> > the debugging mess in this driver, don't add to it.
>
> I am aware that the current debugging concept of the driver does not align
> with the kernel philosophy. However, this is the established way it is
> handled in n_gsm right now. Cleaning this up should be done before adding
> new concepts here. But not printing out any information in case of errors
> does not help during use and development of/for this driver. Also note that
> all these outputs are only enabled if explicitly set via kernel module
> parameter. That means syslog does not get polluted if not intentionally
> set so. Unfortunately, I do not have a better proposal for now as neither
> ftrace nor dynamic debug are available to the normal Linux user.
dynamic debug _is_ availble to the normal Linux user, and it's _the_
kernel debug facility and interface. To not use it is to somehow state
that this one tiny .c file is unique and special over the whole of the
rest of the kernel :)
I recommend just moving to the dynamic debug interface now and then
going forward, it's not going to be an issue at all.
> > > +struct gsm_config_ext {
> > > + __u32 keep_alive; /* Control channel keep-alive in 1/100th of a
> > > + * second (0 to disable)
> > > + */
> > > + __u32 reserved[7]; /* For future use */
> >
> > say "must be set to 0"?
>
> Right, I will add ", needs to be initialized to zero".
Use "must", that means more.
> > Where are you documenting this ioctl so userspace knows how to use it?
> > Where is the userspace tool that uses it?
>
> I will extend the description and code example in
> Documentation/driver-api/tty/n_gsm.rst. Should this go CC to
> linux-man@vger.kernel.org?
I don't know, if there is a man page for it, yes, if not, no need.
thanks,
greg k-h
next prev parent reply other threads:[~2023-02-09 12:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 11:46 [PATCH v4 1/4] tty: n_gsm: mark unusable ioctl structure fields accordingly D. Starke
2023-02-06 11:46 ` [PATCH v4 2/4] tty: n_gsm: add keep alive support D. Starke
2023-02-08 12:19 ` Greg KH
2023-02-09 12:09 ` Starke, Daniel
2023-02-09 12:26 ` Greg KH [this message]
2023-02-06 11:46 ` [PATCH v4 3/4] tty: n_gsm: add RING/CD control support D. Starke
2023-02-06 11:46 ` [PATCH v4 4/4] tty: n_gsm: add TIOCMIWAIT support D. Starke
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=Y+Tme2bRXCebRGcS@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=daniel.starke@siemens.com \
--cc=ilpo.jarvinen@linux.intel.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;
as well as URLs for NNTP newsgroup(s).