Blame SOURCES/0015-cmis-Use-memory-map-during-parsing.patch

2a1b01
From 6e6aed12948d2d191660252a4be9bb33dc283bed Mon Sep 17 00:00:00 2001
2a1b01
From: Ido Schimmel <idosch@nvidia.com>
2a1b01
Date: Tue, 12 Oct 2021 16:25:14 +0300
2a1b01
Subject: [PATCH 15/35] cmis: Use memory map during parsing
2a1b01
2a1b01
Instead of passing one large buffer to the individual parsing functions,
2a1b01
use the memory map structure from the previous patch.
2a1b01
2a1b01
This has the added benefit of checking which optional pages are actually
2a1b01
available and it will also allow us to consolidate the IOCTL and netlink
2a1b01
parsing code paths.
2a1b01
2a1b01
Tested by making sure that the only differences in output in both the
2a1b01
IOCTL and netlink paths before and after the patch are in a few
2a1b01
registers in Page 01h that were previously parsed from Page 00h.
2a1b01
2a1b01
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
2a1b01
---
2a1b01
 cmis.c | 175 +++++++++++++++++++++++++++++----------------------------
2a1b01
 cmis.h |   1 -
2a1b01
 2 files changed, 88 insertions(+), 88 deletions(-)
2a1b01
2a1b01
diff --git a/cmis.c b/cmis.c
2a1b01
index 8a6788416a00..2e01446b2315 100644
2a1b01
--- a/cmis.c
2a1b01
+++ b/cmis.c
2a1b01
@@ -22,19 +22,19 @@ struct cmis_memory_map {
2a1b01
 
2a1b01
 #define CMIS_PAGE_SIZE		0x80
2a1b01
 
2a1b01
-static void cmis_show_identifier(const __u8 *id)
2a1b01
+static void cmis_show_identifier(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
-	sff8024_show_identifier(id, CMIS_ID_OFFSET);
2a1b01
+	sff8024_show_identifier(map->lower_memory, CMIS_ID_OFFSET);
2a1b01
 }
2a1b01
 
2a1b01
-static void cmis_show_connector(const __u8 *id)
2a1b01
+static void cmis_show_connector(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
-	sff8024_show_connector(id, CMIS_CTOR_OFFSET);
2a1b01
+	sff8024_show_connector(map->page_00h, CMIS_CTOR_OFFSET);
2a1b01
 }
2a1b01
 
2a1b01
-static void cmis_show_oui(const __u8 *id)
2a1b01
+static void cmis_show_oui(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
-	sff8024_show_oui(id, CMIS_VENDOR_OUI_OFFSET);
2a1b01
+	sff8024_show_oui(map->page_00h, CMIS_VENDOR_OUI_OFFSET);
2a1b01
 }
2a1b01
 
2a1b01
 /**
2a1b01
@@ -42,9 +42,9 @@ static void cmis_show_oui(const __u8 *id)
2a1b01
  * [1] CMIS Rev. 3, pag. 45, section 1.7.2.1, Table 18
2a1b01
  * [2] CMIS Rev. 4, pag. 81, section 8.2.1, Table 8-2
2a1b01
  */
2a1b01
-static void cmis_show_rev_compliance(const __u8 *id)
2a1b01
+static void cmis_show_rev_compliance(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
-	__u8 rev = id[CMIS_REV_COMPLIANCE_OFFSET];
2a1b01
+	__u8 rev = map->lower_memory[CMIS_REV_COMPLIANCE_OFFSET];
2a1b01
 	int major = (rev >> 4) & 0x0F;
2a1b01
 	int minor = rev & 0x0F;
2a1b01
 
2a1b01
@@ -58,17 +58,17 @@ static void cmis_show_rev_compliance(const __u8 *id)
2a1b01
  * [2] CMIS Rev. 4, pag. 94, section 8.3.9, Table 8-18
2a1b01
  * [3] QSFP-DD Hardware Rev 5.0, pag. 22, section 4.2.1
2a1b01
  */
2a1b01
-static void cmis_show_power_info(const __u8 *id)
2a1b01
+static void cmis_show_power_info(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
 	float max_power = 0.0f;
2a1b01
 	__u8 base_power = 0;
2a1b01
 	__u8 power_class;
2a1b01
 
2a1b01
 	/* Get the power class (first 3 most significat bytes) */
2a1b01
-	power_class = (id[CMIS_PWR_CLASS_OFFSET] >> 5) & 0x07;
2a1b01
+	power_class = (map->page_00h[CMIS_PWR_CLASS_OFFSET] >> 5) & 0x07;
2a1b01
 
2a1b01
 	/* Get the base power in multiples of 0.25W */
2a1b01
-	base_power = id[CMIS_PWR_MAX_POWER_OFFSET];
2a1b01
+	base_power = map->page_00h[CMIS_PWR_MAX_POWER_OFFSET];
2a1b01
 	max_power = base_power * 0.25f;
2a1b01
 
2a1b01
 	printf("\t%-41s : %d\n", "Power class", power_class + 1);
2a1b01
@@ -83,20 +83,20 @@ static void cmis_show_power_info(const __u8 *id)
2a1b01
  * [1] CMIS Rev. 3, pag. 59, section 1.7.3.10, Table 31
2a1b01
  * [2] CMIS Rev. 4, pag. 94, section 8.3.10, Table 8-19
2a1b01
  */
2a1b01
-static void cmis_show_cbl_asm_len(const __u8 *id)
2a1b01
+static void cmis_show_cbl_asm_len(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
 	static const char *fn = "Cable assembly length";
2a1b01
 	float mul = 1.0f;
2a1b01
 	float val = 0.0f;
2a1b01
 
2a1b01
 	/* Check if max length */
2a1b01
-	if (id[CMIS_CBL_ASM_LEN_OFFSET] == CMIS_6300M_MAX_LEN) {
2a1b01
+	if (map->page_00h[CMIS_CBL_ASM_LEN_OFFSET] == CMIS_6300M_MAX_LEN) {
2a1b01
 		printf("\t%-41s : > 6.3km\n", fn);
2a1b01
 		return;
2a1b01
 	}
2a1b01
 
2a1b01
 	/* Get the multiplier from the first two bits */
2a1b01
-	switch (id[CMIS_CBL_ASM_LEN_OFFSET] & CMIS_LEN_MUL_MASK) {
2a1b01
+	switch (map->page_00h[CMIS_CBL_ASM_LEN_OFFSET] & CMIS_LEN_MUL_MASK) {
2a1b01
 	case CMIS_MULTIPLIER_00:
2a1b01
 		mul = 0.1f;
2a1b01
 		break;
2a1b01
@@ -114,7 +114,7 @@ static void cmis_show_cbl_asm_len(const __u8 *id)
2a1b01
 	}
2a1b01
 
2a1b01
 	/* Get base value from first 6 bits and multiply by mul */
2a1b01
-	val = (id[CMIS_CBL_ASM_LEN_OFFSET] & CMIS_LEN_VAL_MASK);
2a1b01
+	val = (map->page_00h[CMIS_CBL_ASM_LEN_OFFSET] & CMIS_LEN_VAL_MASK);
2a1b01
 	val = (float)val * mul;
2a1b01
 	printf("\t%-41s : %0.2fm\n", fn, val);
2a1b01
 }
2a1b01
@@ -126,14 +126,17 @@ static void cmis_show_cbl_asm_len(const __u8 *id)
2a1b01
  * [1] CMIS Rev. 3, pag. 63, section 1.7.4.2, Table 39
2a1b01
  * [2] CMIS Rev. 4, pag. 99, section 8.4.2, Table 8-27
2a1b01
  */
2a1b01
-static void cmis_print_smf_cbl_len(const __u8 *id)
2a1b01
+static void cmis_print_smf_cbl_len(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
 	static const char *fn = "Length (SMF)";
2a1b01
 	float mul = 1.0f;
2a1b01
 	float val = 0.0f;
2a1b01
 
2a1b01
+	if (!map->page_01h)
2a1b01
+		return;
2a1b01
+
2a1b01
 	/* Get the multiplier from the first two bits */
2a1b01
-	switch (id[CMIS_SMF_LEN_OFFSET] & CMIS_LEN_MUL_MASK) {
2a1b01
+	switch (map->page_01h[CMIS_SMF_LEN_OFFSET] & CMIS_LEN_MUL_MASK) {
2a1b01
 	case CMIS_MULTIPLIER_00:
2a1b01
 		mul = 0.1f;
2a1b01
 		break;
2a1b01
@@ -145,7 +148,7 @@ static void cmis_print_smf_cbl_len(const __u8 *id)
2a1b01
 	}
2a1b01
 
2a1b01
 	/* Get base value from first 6 bits and multiply by mul */
2a1b01
-	val = (id[CMIS_SMF_LEN_OFFSET] & CMIS_LEN_VAL_MASK);
2a1b01
+	val = (map->page_01h[CMIS_SMF_LEN_OFFSET] & CMIS_LEN_VAL_MASK);
2a1b01
 	val = (float)val * mul;
2a1b01
 	printf("\t%-41s : %0.2fkm\n", fn, val);
2a1b01
 }
2a1b01
@@ -155,21 +158,24 @@ static void cmis_print_smf_cbl_len(const __u8 *id)
2a1b01
  * [1] CMIS Rev. 3, pag. 71, section 1.7.4.10, Table 46
2a1b01
  * [2] CMIS Rev. 4, pag. 105, section 8.4.10, Table 8-34
2a1b01
  */
2a1b01
-static void cmis_show_sig_integrity(const __u8 *id)
2a1b01
+static void cmis_show_sig_integrity(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
+	if (!map->page_01h)
2a1b01
+		return;
2a1b01
+
2a1b01
 	/* CDR Bypass control: 2nd bit from each byte */
2a1b01
 	printf("\t%-41s : ", "Tx CDR bypass control");
2a1b01
-	printf("%s\n", YESNO(id[CMIS_SIG_INTEG_TX_OFFSET] & 0x02));
2a1b01
+	printf("%s\n", YESNO(map->page_01h[CMIS_SIG_INTEG_TX_OFFSET] & 0x02));
2a1b01
 
2a1b01
 	printf("\t%-41s : ", "Rx CDR bypass control");
2a1b01
-	printf("%s\n", YESNO(id[CMIS_SIG_INTEG_RX_OFFSET] & 0x02));
2a1b01
+	printf("%s\n", YESNO(map->page_01h[CMIS_SIG_INTEG_RX_OFFSET] & 0x02));
2a1b01
 
2a1b01
 	/* CDR Implementation: 1st bit from each byte */
2a1b01
 	printf("\t%-41s : ", "Tx CDR");
2a1b01
-	printf("%s\n", YESNO(id[CMIS_SIG_INTEG_TX_OFFSET] & 0x01));
2a1b01
+	printf("%s\n", YESNO(map->page_01h[CMIS_SIG_INTEG_TX_OFFSET] & 0x01));
2a1b01
 
2a1b01
 	printf("\t%-41s : ", "Rx CDR");
2a1b01
-	printf("%s\n", YESNO(id[CMIS_SIG_INTEG_RX_OFFSET] & 0x01));
2a1b01
+	printf("%s\n", YESNO(map->page_01h[CMIS_SIG_INTEG_RX_OFFSET] & 0x01));
2a1b01
 }
2a1b01
 
2a1b01
 /**
2a1b01
@@ -182,14 +188,14 @@ static void cmis_show_sig_integrity(const __u8 *id)
2a1b01
  * --> pag. 98, section 8.4, Table 8-25
2a1b01
  * --> page 100, section 8.4.3, 8.4.4
2a1b01
  */
2a1b01
-static void cmis_show_mit_compliance(const __u8 *id)
2a1b01
+static void cmis_show_mit_compliance(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
 	static const char *cc = " (Copper cable,";
2a1b01
 
2a1b01
 	printf("\t%-41s : 0x%02x", "Transmitter technology",
2a1b01
-	       id[CMIS_MEDIA_INTF_TECH_OFFSET]);
2a1b01
+	       map->page_00h[CMIS_MEDIA_INTF_TECH_OFFSET]);
2a1b01
 
2a1b01
-	switch (id[CMIS_MEDIA_INTF_TECH_OFFSET]) {
2a1b01
+	switch (map->page_00h[CMIS_MEDIA_INTF_TECH_OFFSET]) {
2a1b01
 	case CMIS_850_VCSEL:
2a1b01
 		printf(" (850 nm VCSEL)\n");
2a1b01
 		break;
2a1b01
@@ -240,22 +246,22 @@ static void cmis_show_mit_compliance(const __u8 *id)
2a1b01
 		break;
2a1b01
 	}
2a1b01
 
2a1b01
-	if (id[CMIS_MEDIA_INTF_TECH_OFFSET] >= CMIS_COPPER_UNEQUAL) {
2a1b01
+	if (map->page_00h[CMIS_MEDIA_INTF_TECH_OFFSET] >= CMIS_COPPER_UNEQUAL) {
2a1b01
 		printf("\t%-41s : %udb\n", "Attenuation at 5GHz",
2a1b01
-		       id[CMIS_COPPER_ATT_5GHZ]);
2a1b01
+		       map->page_00h[CMIS_COPPER_ATT_5GHZ]);
2a1b01
 		printf("\t%-41s : %udb\n", "Attenuation at 7GHz",
2a1b01
-		       id[CMIS_COPPER_ATT_7GHZ]);
2a1b01
+		       map->page_00h[CMIS_COPPER_ATT_7GHZ]);
2a1b01
 		printf("\t%-41s : %udb\n", "Attenuation at 12.9GHz",
2a1b01
-		       id[CMIS_COPPER_ATT_12P9GHZ]);
2a1b01
+		       map->page_00h[CMIS_COPPER_ATT_12P9GHZ]);
2a1b01
 		printf("\t%-41s : %udb\n", "Attenuation at 25.8GHz",
2a1b01
-		       id[CMIS_COPPER_ATT_25P8GHZ]);
2a1b01
-	} else {
2a1b01
+		       map->page_00h[CMIS_COPPER_ATT_25P8GHZ]);
2a1b01
+	} else if (map->page_01h) {
2a1b01
 		printf("\t%-41s : %.3lfnm\n", "Laser wavelength",
2a1b01
-		       (((id[CMIS_NOM_WAVELENGTH_MSB] << 8) |
2a1b01
-				id[CMIS_NOM_WAVELENGTH_LSB]) * 0.05));
2a1b01
+		       (((map->page_01h[CMIS_NOM_WAVELENGTH_MSB] << 8) |
2a1b01
+			  map->page_01h[CMIS_NOM_WAVELENGTH_LSB]) * 0.05));
2a1b01
 		printf("\t%-41s : %.3lfnm\n", "Laser wavelength tolerance",
2a1b01
-		       (((id[CMIS_WAVELENGTH_TOL_MSB] << 8) |
2a1b01
-		       id[CMIS_WAVELENGTH_TOL_LSB]) * 0.005));
2a1b01
+		       (((map->page_01h[CMIS_WAVELENGTH_TOL_MSB] << 8) |
2a1b01
+			  map->page_01h[CMIS_WAVELENGTH_TOL_LSB]) * 0.005));
2a1b01
 	}
2a1b01
 }
2a1b01
 
2a1b01
@@ -275,28 +281,16 @@ static void cmis_show_mit_compliance(const __u8 *id)
2a1b01
  * [2] CMIS Rev. 4:
2a1b01
  * --> pag. 84, section 8.2.4, Table 8-6
2a1b01
  */
2a1b01
-static void cmis_show_mod_lvl_monitors(const __u8 *id)
2a1b01
+static void cmis_show_mod_lvl_monitors(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
+	const __u8 *id = map->lower_memory;
2a1b01
+
2a1b01
 	PRINT_TEMP("Module temperature",
2a1b01
 		   OFFSET_TO_TEMP(CMIS_CURR_TEMP_OFFSET));
2a1b01
 	PRINT_VCC("Module voltage",
2a1b01
 		  OFFSET_TO_U16(CMIS_CURR_VCC_OFFSET));
2a1b01
 }
2a1b01
 
2a1b01
-static void cmis_show_link_len_from_page(const __u8 *page_one_data)
2a1b01
-{
2a1b01
-	cmis_print_smf_cbl_len(page_one_data);
2a1b01
-	sff_show_value_with_unit(page_one_data, CMIS_OM5_LEN_OFFSET,
2a1b01
-				 "Length (OM5)", 2, "m");
2a1b01
-	sff_show_value_with_unit(page_one_data, CMIS_OM4_LEN_OFFSET,
2a1b01
-				 "Length (OM4)", 2, "m");
2a1b01
-	sff_show_value_with_unit(page_one_data, CMIS_OM3_LEN_OFFSET,
2a1b01
-				 "Length (OM3 50/125um)", 2, "m");
2a1b01
-	sff_show_value_with_unit(page_one_data, CMIS_OM2_LEN_OFFSET,
2a1b01
-				 "Length (OM2 50/125um)", 1, "m");
2a1b01
-}
2a1b01
-
2a1b01
-
2a1b01
 /**
2a1b01
  * Print relevant info about the maximum supported fiber media length
2a1b01
  * for each type of fiber media at the maximum module-supported bit rate.
2a1b01
@@ -304,9 +298,19 @@ static void cmis_show_link_len_from_page(const __u8 *page_one_data)
2a1b01
  * [1] CMIS Rev. 3, page 64, section 1.7.4.2, Table 39
2a1b01
  * [2] CMIS Rev. 4, page 99, section 8.4.2, Table 8-27
2a1b01
  */
2a1b01
-static void cmis_show_link_len(const __u8 *id)
2a1b01
+static void cmis_show_link_len(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
-	cmis_show_link_len_from_page(id);
2a1b01
+	cmis_print_smf_cbl_len(map);
2a1b01
+	if (!map->page_01h)
2a1b01
+		return;
2a1b01
+	sff_show_value_with_unit(map->page_01h, CMIS_OM5_LEN_OFFSET,
2a1b01
+				 "Length (OM5)", 2, "m");
2a1b01
+	sff_show_value_with_unit(map->page_01h, CMIS_OM4_LEN_OFFSET,
2a1b01
+				 "Length (OM4)", 2, "m");
2a1b01
+	sff_show_value_with_unit(map->page_01h, CMIS_OM3_LEN_OFFSET,
2a1b01
+				 "Length (OM3 50/125um)", 2, "m");
2a1b01
+	sff_show_value_with_unit(map->page_01h, CMIS_OM2_LEN_OFFSET,
2a1b01
+				 "Length (OM2 50/125um)", 1, "m");
2a1b01
 }
2a1b01
 
2a1b01
 /**
2a1b01
@@ -314,25 +318,26 @@ static void cmis_show_link_len(const __u8 *id)
2a1b01
  * [1] CMIS Rev. 3, page 56, section 1.7.3, Table 27
2a1b01
  * [2] CMIS Rev. 4, page 91, section 8.2, Table 8-15
2a1b01
  */
2a1b01
-static void cmis_show_vendor_info(const __u8 *id)
2a1b01
+static void cmis_show_vendor_info(const struct cmis_memory_map *map)
2a1b01
 {
2a1b01
-	const char *clei = (const char *)(id + CMIS_CLEI_START_OFFSET);
2a1b01
+	const char *clei;
2a1b01
 
2a1b01
-	sff_show_ascii(id, CMIS_VENDOR_NAME_START_OFFSET,
2a1b01
+	sff_show_ascii(map->page_00h, CMIS_VENDOR_NAME_START_OFFSET,
2a1b01
 		       CMIS_VENDOR_NAME_END_OFFSET, "Vendor name");
2a1b01
-	cmis_show_oui(id);
2a1b01
-	sff_show_ascii(id, CMIS_VENDOR_PN_START_OFFSET,
2a1b01
+	cmis_show_oui(map);
2a1b01
+	sff_show_ascii(map->page_00h, CMIS_VENDOR_PN_START_OFFSET,
2a1b01
 		       CMIS_VENDOR_PN_END_OFFSET, "Vendor PN");
2a1b01
-	sff_show_ascii(id, CMIS_VENDOR_REV_START_OFFSET,
2a1b01
+	sff_show_ascii(map->page_00h, CMIS_VENDOR_REV_START_OFFSET,
2a1b01
 		       CMIS_VENDOR_REV_END_OFFSET, "Vendor rev");
2a1b01
-	sff_show_ascii(id, CMIS_VENDOR_SN_START_OFFSET,
2a1b01
+	sff_show_ascii(map->page_00h, CMIS_VENDOR_SN_START_OFFSET,
2a1b01
 		       CMIS_VENDOR_SN_END_OFFSET, "Vendor SN");
2a1b01
-	sff_show_ascii(id, CMIS_DATE_YEAR_OFFSET,
2a1b01
+	sff_show_ascii(map->page_00h, CMIS_DATE_YEAR_OFFSET,
2a1b01
 		       CMIS_DATE_VENDOR_LOT_OFFSET + 1, "Date code");
2a1b01
 
2a1b01
+	clei = (const char *)(map->page_00h + CMIS_CLEI_START_OFFSET);
2a1b01
 	if (*clei && strncmp(clei, CMIS_CLEI_BLANK, CMIS_CLEI_LEN))
2a1b01
-		sff_show_ascii(id, CMIS_CLEI_START_OFFSET, CMIS_CLEI_END_OFFSET,
2a1b01
-			       "CLEI code");
2a1b01
+		sff_show_ascii(map->page_00h, CMIS_CLEI_START_OFFSET,
2a1b01
+			       CMIS_CLEI_END_OFFSET, "CLEI code");
2a1b01
 }
2a1b01
 
2a1b01
 static void cmis_memory_map_init_buf(struct cmis_memory_map *map,
2a1b01
@@ -363,16 +368,16 @@ void cmis_show_all_ioctl(const __u8 *id)
2a1b01
 
2a1b01
 	cmis_memory_map_init_buf(&map, id);
2a1b01
 
2a1b01
-	cmis_show_identifier(id);
2a1b01
-	cmis_show_power_info(id);
2a1b01
-	cmis_show_connector(id);
2a1b01
-	cmis_show_cbl_asm_len(id);
2a1b01
-	cmis_show_sig_integrity(id);
2a1b01
-	cmis_show_mit_compliance(id);
2a1b01
-	cmis_show_mod_lvl_monitors(id);
2a1b01
-	cmis_show_link_len(id);
2a1b01
-	cmis_show_vendor_info(id);
2a1b01
-	cmis_show_rev_compliance(id);
2a1b01
+	cmis_show_identifier(&map);
2a1b01
+	cmis_show_power_info(&map);
2a1b01
+	cmis_show_connector(&map);
2a1b01
+	cmis_show_cbl_asm_len(&map);
2a1b01
+	cmis_show_sig_integrity(&map);
2a1b01
+	cmis_show_mit_compliance(&map);
2a1b01
+	cmis_show_mod_lvl_monitors(&map);
2a1b01
+	cmis_show_link_len(&map);
2a1b01
+	cmis_show_vendor_info(&map);
2a1b01
+	cmis_show_rev_compliance(&map);
2a1b01
 }
2a1b01
 
2a1b01
 static void
2a1b01
@@ -403,22 +408,18 @@ cmis_memory_map_init_pages(struct cmis_memory_map *map,
2a1b01
 void cmis_show_all_nl(const struct ethtool_module_eeprom *page_zero,
2a1b01
 		      const struct ethtool_module_eeprom *page_one)
2a1b01
 {
2a1b01
-	const __u8 *page_zero_data = page_zero->data;
2a1b01
 	struct cmis_memory_map map = {};
2a1b01
 
2a1b01
 	cmis_memory_map_init_pages(&map, page_zero, page_one);
2a1b01
 
2a1b01
-	cmis_show_identifier(page_zero_data);
2a1b01
-	cmis_show_power_info(page_zero_data);
2a1b01
-	cmis_show_connector(page_zero_data);
2a1b01
-	cmis_show_cbl_asm_len(page_zero_data);
2a1b01
-	cmis_show_sig_integrity(page_zero_data);
2a1b01
-	cmis_show_mit_compliance(page_zero_data);
2a1b01
-	cmis_show_mod_lvl_monitors(page_zero_data);
2a1b01
-
2a1b01
-	if (page_one)
2a1b01
-		cmis_show_link_len_from_page(page_one->data - 0x80);
2a1b01
-
2a1b01
-	cmis_show_vendor_info(page_zero_data);
2a1b01
-	cmis_show_rev_compliance(page_zero_data);
2a1b01
+	cmis_show_identifier(&map);
2a1b01
+	cmis_show_power_info(&map);
2a1b01
+	cmis_show_connector(&map);
2a1b01
+	cmis_show_cbl_asm_len(&map);
2a1b01
+	cmis_show_sig_integrity(&map);
2a1b01
+	cmis_show_mit_compliance(&map);
2a1b01
+	cmis_show_mod_lvl_monitors(&map);
2a1b01
+	cmis_show_link_len(&map);
2a1b01
+	cmis_show_vendor_info(&map);
2a1b01
+	cmis_show_rev_compliance(&map);
2a1b01
 }
2a1b01
diff --git a/cmis.h b/cmis.h
2a1b01
index 53cbb5f57127..c878e3bc5afd 100644
2a1b01
--- a/cmis.h
2a1b01
+++ b/cmis.h
2a1b01
@@ -100,7 +100,6 @@
2a1b01
  * that are unique to active modules and cable assemblies.
2a1b01
  * GlobalOffset = 2 * 0x80 + LocalOffset
2a1b01
  */
2a1b01
-#define PAG01H_UPPER_OFFSET			(0x02 * 0x80)
2a1b01
 
2a1b01
 /* Supported Link Length (Page 1) */
2a1b01
 #define CMIS_SMF_LEN_OFFSET			0x84
2a1b01
-- 
2a1b01
2.35.1
2a1b01