The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Marek Pazdan <mpazdan@arista.com>
Cc: aleksander.lobakin@intel.com, almasrymina@google.com,
	andrew+netdev@lunn.ch, anthony.l.nguyen@intel.com,
	daniel.zahka@gmail.com, davem@davemloft.net,
	ecree.xilinx@gmail.com, edumazet@google.com, gal@nvidia.com,
	horms@kernel.org, intel-wired-lan@lists.osuosl.org,
	jianbol@nvidia.com, kory.maincent@bootlin.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	pabeni@redhat.com, przemyslaw.kitszel@intel.com,
	willemb@google.com
Subject: Re: [PATCH net-next v2 1/2] ethtool: qsfp transceiver reset, interrupt and presence pin control
Date: Thu, 15 May 2025 03:10:24 +0200	[thread overview]
Message-ID: <c6c33e70-267f-4433-95ca-93efca0dfbe8@lunn.ch> (raw)
In-Reply-To: <20250513224017.202236-1-mpazdan@arista.com>

On Tue, May 13, 2025 at 10:40:00PM +0000, Marek Pazdan wrote:
> Common Management Interface Specification defines
> Management Signaling Layer (MSL) control and status signals. This change
> provides API for following signals status reading:
> - signal allowing the host to request module reset (Reset)
> - signal allowing the host to detect module presence (Presence)
> - signal allowing the host to detect module interrupt (Int)

What is missing from here is the use cases you are trying to
address. Why should user space want to reset the module? Why does user
spare care if there is a module inserted or not. What is user space
going to do with an interrupt?

> Additionally API allows for Reset signal assertion with
> following constraints:
> - reset cannot be asserted if firmware update is in progress
> - if reset is asserted, firmware update cannot be started
> - if reset is asserted, power mode cannot be get/set
> In all above constraint cases -EBUSY error is returned.

Seems like there should be one more condition. Reset cannot be
asserted if the interface is admin up. I assume a reset is disruptive
to the link, so you don't want it to happen when the link is in use.

> +static int module_mgmt_get(struct net_device *dev,
> +			   struct module_mgmt_reply_data *data,
> +			   const struct genl_info *info)
> +{
> +	const struct ethtool_ops *ops = dev->ethtool_ops;
> +	struct netlink_ext_ack *extack = info ? info->extack : NULL;
> +
> +	if (!ops->get_module_mgmt_signal)
> +		return -EOPNOTSUPP;
> +
> +	return ops->get_module_mgmt_signal(dev, &data->mgmt, extack);

Should there be a module_busy() check here? Can you get these
parameters if the module is in reset?

	Andrew

      parent reply	other threads:[~2025-05-15  1:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 12:35 [PATCH 1/2] ethtool: transceiver reset and presence pin control Marek Pazdan
2025-04-07 12:35 ` [PATCH 2/2] ice: add qsfp " Marek Pazdan
2025-04-07 13:46   ` Kory Maincent
2025-04-07 20:30   ` Andrew Lunn
2025-04-08 14:22     ` [Intel-wired-lan] " Marek Pazdan
2025-04-08 15:23       ` Andrew Lunn
2025-04-07 13:32 ` [PATCH 1/2] ethtool: " Kory Maincent
2025-04-08 15:54   ` [Intel-wired-lan] " Marek Pazdan
2025-04-07 20:39 ` Andrew Lunn
2025-04-08 15:32   ` [Intel-wired-lan] " Marek Pazdan
2025-04-08 16:10     ` Andrew Lunn
2025-05-13 22:40       ` [PATCH net-next v2 1/2] ethtool: qsfp transceiver reset, interrupt " Marek Pazdan
2025-05-13 22:40         ` [Intel-wired-lan] [PATCH net-next v2 2/2] ice: add " Marek Pazdan
2025-05-15  1:23           ` Andrew Lunn
2025-05-14  0:26         ` [PATCH net-next v2 1/2] ethtool: " Jakub Kicinski
2025-05-15  1:10         ` Andrew Lunn [this message]

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=c6c33e70-267f-4433-95ca-93efca0dfbe8@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=aleksander.lobakin@intel.com \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=daniel.zahka@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jianbol@nvidia.com \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpazdan@arista.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=willemb@google.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