mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Danielle Ratson <danieller@nvidia.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, yuehaibing@huawei.com,
	linux-kernel@vger.kernel.org, petrm@nvidia.com
Subject: Re: [PATCH net-next 1/2] net: ethtool: Add new parameters and a function to support EPL
Date: Fri, 6 Sep 2024 17:36:06 +0200	[thread overview]
Message-ID: <970ef9b1-609b-4137-a76f-315c99fbf112@lunn.ch> (raw)
In-Reply-To: <20240906055700.2645281-2-danieller@nvidia.com>

> +/* For accessing the EPL field on page 9Fh, the allowable length extension is
> + * min(i, 255) byte octets where i specifies the allowable additional number of
> + * byte octets in a READ or a WRITE.
> + */
> +u32 ethtool_cmis_get_max_epl_size(u8 num_of_byte_octs)
> +{
> +	return 8 * (1 + min_t(u8, num_of_byte_octs, 255));
> +}

Does this get mapped to a 255 byte I2C bus transfer?

https://elixir.bootlin.com/linux/v6.11-rc6/source/drivers/net/phy/sfp.c#L218

/* SFP_EEPROM_BLOCK_SIZE is the size of data chunk to read the EEPROM
 * at a time. Some SFP modules and also some Linux I2C drivers do not like
 * reads longer than 16 bytes.
 */
#define SFP_EEPROM_BLOCK_SIZE	16

If an SMBUS is being used, rather than I2C, there is a hard limit of
32 bytes in a message transfer.

I've not looked in details at these patches, but maybe you need a
mechanism to ask the hardware or I2C driver what it can actually do?
Is it possible to say LPL is the only choice?

	Andrew

  reply	other threads:[~2024-09-06 15:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06  5:56 [PATCH net-next 0/2] ethtool: Add support for writing firmware Danielle Ratson
2024-09-06  5:56 ` [PATCH net-next 1/2] net: ethtool: Add new parameters and a function to support EPL Danielle Ratson
2024-09-06 15:36   ` Andrew Lunn [this message]
2024-09-08 12:33     ` Danielle Ratson
2024-09-06  5:57 ` [PATCH net-next 2/2] net: ethtool: Add support for writing firmware blocks using EPL payload Danielle Ratson
2024-09-07 14:10   ` Simon Horman
2024-09-10  8:53     ` Danielle Ratson

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=970ef9b1-609b-4137-a76f-315c99fbf112@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=yuehaibing@huawei.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

all inboxes | Powered by JetHome®