From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
Michal Michalik <michal.michalik@intel.com>,
netdev@vger.kernel.org, richardcochran@gmail.com,
Gurucharan <gurucharanx.g@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH net 3/3] ice: Add set_termios tty operations handle to GNSS
Date: Wed, 31 Aug 2022 14:54:39 -0700 [thread overview]
Message-ID: <20220831145439.2f268c34@kernel.org> (raw)
In-Reply-To: <20220829220049.333434-4-anthony.l.nguyen@intel.com>
On Mon, 29 Aug 2022 15:00:49 -0700 Tony Nguyen wrote:
> From: Michal Michalik <michal.michalik@intel.com>
>
> Some third party tools (ex. ubxtool) try to change GNSS TTY parameters
> (ex. speed). While being optional implementation, without set_termios
> handle this operation fails and prevents those third party tools from
> working. TTY interface in ice driver is virtual and doesn't need any change
> on set_termios, so is left empty. Add this mock to support all Linux TTY
> APIs.
>
> Fixes: 43113ff73453 ("ice: add TTY for GNSS module for E810T device")
> Signed-off-by: Michal Michalik <michal.michalik@intel.com>
> Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Please CC GNSS and TTY maintainers on the patches relating to
the TTY/GNSS channel going forward.
CC: Greg, Jiri, Johan
We'll pull in a day or two if there are no objections.
> diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c
> index b5a7f246d230..c2dc5e5c8fa4 100644
> --- a/drivers/net/ethernet/intel/ice/ice_gnss.c
> +++ b/drivers/net/ethernet/intel/ice/ice_gnss.c
> @@ -404,11 +404,26 @@ static unsigned int ice_gnss_tty_write_room(struct tty_struct *tty)
> return ICE_GNSS_TTY_WRITE_BUF;
> }
>
> +/**
> + * ice_gnss_tty_set_termios - mock for set_termios tty operations
> + * @tty: pointer to the tty_struct
> + * @new_termios: pointer to the new termios parameters
> + */
> +static void
> +ice_gnss_tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
> +{
> + /* Some 3rd party tools (ex. ubxtool) want to change the TTY parameters.
> + * In our virtual interface (I2C communication over FW AQ) we don't have
> + * to change anything, but we need to implement it to unblock tools.
> + */
> +}
> +
> static const struct tty_operations tty_gps_ops = {
> .open = ice_gnss_tty_open,
> .close = ice_gnss_tty_close,
> .write = ice_gnss_tty_write,
> .write_room = ice_gnss_tty_write_room,
> + .set_termios = ice_gnss_tty_set_termios,
> };
>
> /**
next prev parent reply other threads:[~2022-08-31 21:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 22:00 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-08-29 (ice) Tony Nguyen
2022-08-29 22:00 ` [PATCH net 1/3] ice: Fix DMA mappings leak Tony Nguyen
2022-08-29 22:00 ` [PATCH net 2/3] ice: use bitmap_free instead of devm_kfree Tony Nguyen
2022-08-29 22:00 ` [PATCH net 3/3] ice: Add set_termios tty operations handle to GNSS Tony Nguyen
2022-08-31 21:54 ` Jakub Kicinski [this message]
2022-08-31 23:36 ` Tony Nguyen
2022-09-01 5:46 ` Greg Kroah-Hartman
2022-09-01 20:18 ` Jakub Kicinski
2022-09-02 16:55 ` Tony Nguyen
2022-09-05 19:32 ` Michalik, Michal
2022-09-06 6:15 ` Greg Kroah-Hartman
2022-09-06 20:55 ` Michalik, Michal
2022-09-07 5:45 ` Greg Kroah-Hartman
2022-09-08 13:44 ` Michalik, Michal
2022-09-01 6:44 ` Johan Hovold
2022-09-02 7:42 ` Jiri Slaby
2022-09-02 10:47 ` Jiri Slaby
2022-09-05 19:47 ` Michalik, Michal
2022-09-05 19:41 ` Michalik, Michal
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=20220831145439.2f268c34@kernel.org \
--to=kuba@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=gurucharanx.g@intel.com \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=michal.michalik@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
/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).