Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1174145/?format=api
{ "id": 1174145, "url": "http://patchwork.ozlabs.org/api/patches/1174145/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20191009140953.14087-2-anthony.l.nguyen@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20191009140953.14087-2-anthony.l.nguyen@intel.com>", "list_archive_url": null, "date": "2019-10-09T14:09:40", "name": "[S31,02/15] ice: add ethtool -m support for reading i2c eeprom modules", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "182075754208fb4d2b7a317b5f87469f3bdd5b64", "submitter": { "id": 68875, "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api", "name": "Tony Nguyen", "email": "anthony.l.nguyen@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20191009140953.14087-2-anthony.l.nguyen@intel.com/mbox/", "series": [ { "id": 135203, "url": "http://patchwork.ozlabs.org/api/series/135203/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=135203", "date": "2019-10-09T14:09:45", "name": "[S31,01/15] ice: implement set_eeprom functionality", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/135203/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1174145/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1174145/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 46pTgd1b99z9sDQ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 10 Oct 2019 09:40:13 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 872C9884D0;\n\tWed, 9 Oct 2019 22:40:11 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id hbXwadrwcjXb; Wed, 9 Oct 2019 22:40:09 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id EB681884B3;\n\tWed, 9 Oct 2019 22:40:09 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 57F881BF3CC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 9 Oct 2019 22:40:04 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4CB0E883D6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 9 Oct 2019 22:40:04 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id IX8L0cC0RWDh for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 9 Oct 2019 22:40:01 +0000 (UTC)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 492308835E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 9 Oct 2019 22:40:01 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 Oct 2019 15:40:00 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby orsmga003.jf.intel.com with ESMTP; 09 Oct 2019 15:40:00 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.67,277,1566889200\"; d=\"scan'208\";a=\"197052251\"", "From": "Tony Nguyen <anthony.l.nguyen@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 9 Oct 2019 07:09:40 -0700", "Message-Id": "<20191009140953.14087-2-anthony.l.nguyen@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20191009140953.14087-1-anthony.l.nguyen@intel.com>", "References": "<20191009140953.14087-1-anthony.l.nguyen@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH S31 02/15] ice: add ethtool -m support for\n\treading i2c eeprom modules", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Scott W Taylor <scott.w.taylor@intel.com>\n\nImplement ethtool -m support to read eeprom data from SFP/QSFP modules.\n\nSigned-off-by: Scott W Taylor <scott.w.taylor@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n .../net/ethernet/intel/ice/ice_adminq_cmd.h | 29 ++++\n drivers/net/ethernet/intel/ice/ice_common.c | 46 ++++++\n drivers/net/ethernet/intel/ice/ice_common.h | 4 +\n drivers/net/ethernet/intel/ice/ice_ethtool.c | 147 ++++++++++++++++++\n 4 files changed, 226 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\nindex 73c189a794bb..cfdd72fbd0da 100644\n--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n@@ -1148,6 +1148,33 @@ struct ice_aqc_set_port_id_led {\n \tu8 rsvd[13];\n };\n \n+/* Read/Write SFF EEPROM command (indirect 0x06EE) */\n+struct ice_aqc_sff_eeprom {\n+\tu8 lport_num;\n+\tu8 lport_num_valid;\n+#define ICE_AQC_SFF_PORT_NUM_VALID\tBIT(0)\n+\t__le16 i2c_bus_addr;\n+#define ICE_AQC_SFF_I2CBUS_7BIT_M\t0x7F\n+#define ICE_AQC_SFF_I2CBUS_10BIT_M\t0x3FF\n+#define ICE_AQC_SFF_I2CBUS_TYPE_M\tBIT(10)\n+#define ICE_AQC_SFF_I2CBUS_TYPE_7BIT\t0\n+#define ICE_AQC_SFF_I2CBUS_TYPE_10BIT\tICE_AQC_SFF_I2CBUS_TYPE_M\n+#define ICE_AQC_SFF_SET_EEPROM_PAGE_S\t11\n+#define ICE_AQC_SFF_SET_EEPROM_PAGE_M\t(0x3 << ICE_AQC_SFF_SET_EEPROM_PAGE_S)\n+#define ICE_AQC_SFF_NO_PAGE_CHANGE\t0\n+#define ICE_AQC_SFF_SET_23_ON_MISMATCH\t1\n+#define ICE_AQC_SFF_SET_22_ON_MISMATCH\t2\n+#define ICE_AQC_SFF_IS_WRITE\t\tBIT(15)\n+\t__le16 i2c_mem_addr;\n+\t__le16 eeprom_page;\n+#define ICE_AQC_SFF_EEPROM_BANK_S 0\n+#define ICE_AQC_SFF_EEPROM_BANK_M (0xFF << ICE_AQC_SFF_EEPROM_BANK_S)\n+#define ICE_AQC_SFF_EEPROM_PAGE_S 8\n+#define ICE_AQC_SFF_EEPROM_PAGE_M (0xFF << ICE_AQC_SFF_EEPROM_PAGE_S)\n+\t__le32 addr_high;\n+\t__le32 addr_low;\n+};\n+\n /* NVM Read command (indirect 0x0701)\n * NVM Erase commands (direct 0x0702)\n * NVM Update commands (indirect 0x0703)\n@@ -1651,6 +1678,7 @@ struct ice_aq_desc {\n \t\tstruct ice_aqc_get_phy_caps get_phy;\n \t\tstruct ice_aqc_set_phy_cfg set_phy;\n \t\tstruct ice_aqc_restart_an restart_an;\n+\t\tstruct ice_aqc_sff_eeprom read_write_sff_param;\n \t\tstruct ice_aqc_set_port_id_led set_port_id_led;\n \t\tstruct ice_aqc_get_sw_cfg get_sw_conf;\n \t\tstruct ice_aqc_sw_rules sw_rules;\n@@ -1776,6 +1804,7 @@ enum ice_adminq_opc {\n \tice_aqc_opc_set_event_mask\t\t\t= 0x0613,\n \tice_aqc_opc_set_mac_lb\t\t\t\t= 0x0620,\n \tice_aqc_opc_set_port_id_led\t\t\t= 0x06E9,\n+\tice_aqc_opc_sff_eeprom\t\t\t\t= 0x06EE,\n \n \t/* NVM commands */\n \tice_aqc_opc_nvm_read\t\t\t\t= 0x0701,\ndiff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex b96118c43765..eb99ca4099ca 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -2560,6 +2560,52 @@ ice_aq_set_port_id_led(struct ice_port_info *pi, bool is_orig_mode,\n \treturn ice_aq_send_cmd(hw, &desc, NULL, 0, cd);\n }\n \n+/**\n+ * ice_aq_sff_eeprom\n+ * @hw: pointer to the HW struct\n+ * @lport: bits [7:0] = logical port, bit [8] = logical port valid\n+ * @bus_addr: I2C bus address of the eeprom (typically 0xA0, 0=topo default)\n+ * @mem_addr: I2C offset. lower 8 bits for address, 8 upper bits zero padding.\n+ * @page: QSFP page\n+ * @set_page: set or ignore the page\n+ * @data: pointer to data buffer to be read/written to the I2C device.\n+ * @length: 1-16 for read, 1 for write.\n+ * @write: 0 read, 1 for write.\n+ * @cd: pointer to command details structure or NULL\n+ *\n+ * Read/Write SFF EEPROM (0x06EE)\n+ */\n+enum ice_status\n+ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr,\n+\t\t u16 mem_addr, u8 page, u8 set_page, u8 *data, u8 length,\n+\t\t bool write, struct ice_sq_cd *cd)\n+{\n+\tstruct ice_aqc_sff_eeprom *cmd;\n+\tstruct ice_aq_desc desc;\n+\tenum ice_status status;\n+\n+\tif (!data || (mem_addr & 0xff00))\n+\t\treturn ICE_ERR_PARAM;\n+\n+\tice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_sff_eeprom);\n+\tcmd = &desc.params.read_write_sff_param;\n+\tdesc.flags = cpu_to_le16(ICE_AQ_FLAG_RD | ICE_AQ_FLAG_BUF);\n+\tcmd->lport_num = (u8)(lport & 0xff);\n+\tcmd->lport_num_valid = (u8)((lport >> 8) & 0x01);\n+\tcmd->i2c_bus_addr = cpu_to_le16(((bus_addr >> 1) &\n+\t\t\t\t\t ICE_AQC_SFF_I2CBUS_7BIT_M) |\n+\t\t\t\t\t((set_page <<\n+\t\t\t\t\t ICE_AQC_SFF_SET_EEPROM_PAGE_S) &\n+\t\t\t\t\t ICE_AQC_SFF_SET_EEPROM_PAGE_M));\n+\tcmd->i2c_mem_addr = cpu_to_le16(mem_addr & 0xff);\n+\tcmd->eeprom_page = cpu_to_le16((u16)page << ICE_AQC_SFF_EEPROM_PAGE_S);\n+\tif (write)\n+\t\tcmd->i2c_bus_addr |= cpu_to_le16(ICE_AQC_SFF_IS_WRITE);\n+\n+\tstatus = ice_aq_send_cmd(hw, &desc, data, length, cd);\n+\treturn status;\n+}\n+\n /**\n * __ice_aq_get_set_rss_lut\n * @hw: pointer to the hardware structure\ndiff --git a/drivers/net/ethernet/intel/ice/ice_common.h b/drivers/net/ethernet/intel/ice/ice_common.h\nindex c066f4000582..c469d0db5ddc 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.h\n+++ b/drivers/net/ethernet/intel/ice/ice_common.h\n@@ -115,6 +115,10 @@ ice_aq_set_mac_loopback(struct ice_hw *hw, bool ena_lpbk, struct ice_sq_cd *cd);\n enum ice_status\n ice_aq_set_port_id_led(struct ice_port_info *pi, bool is_orig_mode,\n \t\t struct ice_sq_cd *cd);\n+enum ice_status\n+ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr,\n+\t\t u16 mem_addr, u8 page, u8 set_page, u8 *data, u8 length,\n+\t\t bool write, struct ice_sq_cd *cd);\n \n enum ice_status\n ice_cfg_vsi_rdma(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap,\ndiff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c\nindex c270fbbc25bb..48d13e305d9e 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c\n+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c\n@@ -3540,6 +3540,151 @@ ice_set_per_q_coalesce(struct net_device *netdev, u32 q_num,\n \treturn __ice_set_coalesce(netdev, ec, q_num);\n }\n \n+#define ICE_I2C_EEPROM_DEV_ADDR\t\t0xA0\n+#define ICE_I2C_EEPROM_DEV_ADDR2\t0xA2\n+#define ICE_MODULE_TYPE_SFP\t\t0x03\n+#define ICE_MODULE_TYPE_QSFP_PLUS\t0x0D\n+#define ICE_MODULE_TYPE_QSFP28\t\t0x11\n+#define ICE_MODULE_SFF_ADDR_MODE\t0x04\n+#define ICE_MODULE_SFF_DIAG_CAPAB\t0x40\n+#define ICE_MODULE_REVISION_ADDR\t0x01\n+#define ICE_MODULE_SFF_8472_COMP\t0x5E\n+#define ICE_MODULE_SFF_8472_SWAP\t0x5C\n+#define ICE_MODULE_QSFP_MAX_LEN\t\t640\n+\n+/**\n+ * ice_get_module_info - get SFF module type and revision information\n+ * @netdev: network interface device structure\n+ * @modinfo: module EEPROM size and layout information structure\n+ */\n+static int\n+ice_get_module_info(struct net_device *netdev,\n+\t\t struct ethtool_modinfo *modinfo)\n+{\n+\tstruct ice_netdev_priv *np = netdev_priv(netdev);\n+\tstruct ice_vsi *vsi = np->vsi;\n+\tstruct ice_pf *pf = vsi->back;\n+\tstruct ice_hw *hw = &pf->hw;\n+\tenum ice_status status;\n+\tu8 sff8472_comp = 0;\n+\tu8 sff8472_swap = 0;\n+\tu8 sff8636_rev = 0;\n+\tu8 value = 0;\n+\n+\tstatus = ice_aq_sff_eeprom(hw, 0, ICE_I2C_EEPROM_DEV_ADDR, 0x00, 0x00,\n+\t\t\t\t 0, &value, 1, 0, NULL);\n+\tif (status)\n+\t\treturn -EIO;\n+\n+\tswitch (value) {\n+\tcase ICE_MODULE_TYPE_SFP:\n+\t\tstatus = ice_aq_sff_eeprom(hw, 0, ICE_I2C_EEPROM_DEV_ADDR,\n+\t\t\t\t\t ICE_MODULE_SFF_8472_COMP, 0x00, 0,\n+\t\t\t\t\t &sff8472_comp, 1, 0, NULL);\n+\t\tif (status)\n+\t\t\treturn -EIO;\n+\t\tstatus = ice_aq_sff_eeprom(hw, 0, ICE_I2C_EEPROM_DEV_ADDR,\n+\t\t\t\t\t ICE_MODULE_SFF_8472_SWAP, 0x00, 0,\n+\t\t\t\t\t &sff8472_swap, 1, 0, NULL);\n+\t\tif (status)\n+\t\t\treturn -EIO;\n+\n+\t\tif (sff8472_swap & ICE_MODULE_SFF_ADDR_MODE) {\n+\t\t\tmodinfo->type = ETH_MODULE_SFF_8079;\n+\t\t\tmodinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;\n+\t\t} else if (sff8472_comp &&\n+\t\t\t (sff8472_swap & ICE_MODULE_SFF_DIAG_CAPAB)) {\n+\t\t\tmodinfo->type = ETH_MODULE_SFF_8472;\n+\t\t\tmodinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;\n+\t\t} else {\n+\t\t\tmodinfo->type = ETH_MODULE_SFF_8079;\n+\t\t\tmodinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;\n+\t\t}\n+\t\tbreak;\n+\tcase ICE_MODULE_TYPE_QSFP_PLUS:\n+\tcase ICE_MODULE_TYPE_QSFP28:\n+\t\tstatus = ice_aq_sff_eeprom(hw, 0, ICE_I2C_EEPROM_DEV_ADDR,\n+\t\t\t\t\t ICE_MODULE_REVISION_ADDR, 0x00, 0,\n+\t\t\t\t\t &sff8636_rev, 1, 0, NULL);\n+\t\tif (status)\n+\t\t\treturn -EIO;\n+\t\t/* Check revision compliance */\n+\t\tif (sff8636_rev > 0x02) {\n+\t\t\t/* Module is SFF-8636 compliant */\n+\t\t\tmodinfo->type = ETH_MODULE_SFF_8636;\n+\t\t\tmodinfo->eeprom_len = ICE_MODULE_QSFP_MAX_LEN;\n+\t\t} else {\n+\t\t\tmodinfo->type = ETH_MODULE_SFF_8436;\n+\t\t\tmodinfo->eeprom_len = ICE_MODULE_QSFP_MAX_LEN;\n+\t\t}\n+\t\tbreak;\n+\tdefault:\n+\t\tnetdev_warn(netdev,\n+\t\t\t \"SFF Module Type not recognized.\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\treturn 0;\n+}\n+\n+/**\n+ * ice_get_module_eeprom - fill buffer with SFF EEPROM contents\n+ * @netdev: network interface device structure\n+ * @ee: EEPROM dump request structure\n+ * @data: buffer to be filled with EEPROM contents\n+ */\n+static int\n+ice_get_module_eeprom(struct net_device *netdev,\n+\t\t struct ethtool_eeprom *ee, u8 *data)\n+{\n+\tstruct ice_netdev_priv *np = netdev_priv(netdev);\n+\tu8 addr = ICE_I2C_EEPROM_DEV_ADDR;\n+\tstruct ice_vsi *vsi = np->vsi;\n+\tstruct ice_pf *pf = vsi->back;\n+\tstruct ice_hw *hw = &pf->hw;\n+\tenum ice_status status;\n+\tbool is_sfp = false;\n+\tu16 offset = 0;\n+\tu8 value = 0;\n+\tu8 page = 0;\n+\tint i;\n+\n+\tstatus = ice_aq_sff_eeprom(hw, 0, addr, offset, page, 0,\n+\t\t\t\t &value, 1, 0, NULL);\n+\tif (status)\n+\t\treturn -EIO;\n+\n+\tif (!ee || !ee->len || !data)\n+\t\treturn -EINVAL;\n+\n+\tif (value == ICE_MODULE_TYPE_SFP)\n+\t\tis_sfp = true;\n+\n+\tfor (i = 0; i < ee->len; i++) {\n+\t\toffset = i + ee->offset;\n+\n+\t\t/* Check if we need to access the other memory page */\n+\t\tif (is_sfp) {\n+\t\t\tif (offset >= ETH_MODULE_SFF_8079_LEN) {\n+\t\t\t\toffset -= ETH_MODULE_SFF_8079_LEN;\n+\t\t\t\taddr = ICE_I2C_EEPROM_DEV_ADDR2;\n+\t\t\t}\n+\t\t} else {\n+\t\t\twhile (offset >= ETH_MODULE_SFF_8436_LEN) {\n+\t\t\t\t/* Compute memory page number and offset. */\n+\t\t\t\toffset -= ETH_MODULE_SFF_8436_LEN / 2;\n+\t\t\t\tpage++;\n+\t\t\t}\n+\t\t}\n+\n+\t\tstatus = ice_aq_sff_eeprom(hw, 0, addr, offset, page, !is_sfp,\n+\t\t\t\t\t &value, 1, 0, NULL);\n+\t\tif (status)\n+\t\t\tvalue = 0;\n+\t\tdata[i] = value;\n+\t}\n+\treturn 0;\n+}\n+\n static const struct ethtool_ops ice_ethtool_ops = {\n \t.get_link_ksettings\t= ice_get_link_ksettings,\n \t.set_link_ksettings\t= ice_set_link_ksettings,\n@@ -3576,6 +3721,8 @@ static const struct ethtool_ops ice_ethtool_ops = {\n \t.set_per_queue_coalesce = ice_set_per_q_coalesce,\n \t.get_fecparam\t\t= ice_get_fecparam,\n \t.set_fecparam\t\t= ice_set_fecparam,\n+\t.get_module_info\t= ice_get_module_info,\n+\t.get_module_eeprom\t= ice_get_module_eeprom,\n };\n \n static const struct ethtool_ops ice_ethtool_safe_mode_ops = {\n", "prefixes": [ "S31", "02/15" ] }