@@ -514,6 +514,42 @@ sff8636_show_wavelength_or_copper_compliance(const struct sff8636_memory_map *ma
}
}
+static void sff8636_show_revision_compliance(const __u8 *id, int rev_offset)
+{
+ static const char *pfx =
+ "\tRevision Compliance :";
+
+ switch (id[rev_offset]) {
+ case SFF8636_REV_UNSPECIFIED:
+ printf("%s Revision not specified\n", pfx);
+ break;
+ case SFF8636_REV_8436_48:
+ printf("%s SFF-8436 Rev 4.8 or earlier\n", pfx);
+ break;
+ case SFF8636_REV_8436_8636:
+ printf("%s SFF-8436 Rev 4.8 or earlier\n", pfx);
+ break;
+ case SFF8636_REV_8636_13:
+ printf("%s SFF-8636 Rev 1.3 or earlier\n", pfx);
+ break;
+ case SFF8636_REV_8636_14:
+ printf("%s SFF-8636 Rev 1.4\n", pfx);
+ break;
+ case SFF8636_REV_8636_15:
+ printf("%s SFF-8636 Rev 1.5\n", pfx);
+ break;
+ case SFF8636_REV_8636_20:
+ printf("%s SFF-8636 Rev 2.0\n", pfx);
+ break;
+ case SFF8636_REV_8636_27:
+ printf("%s SFF-8636 Rev 2.5/2.6/2.7\n", pfx);
+ break;
+ default:
+ printf("%s Unallocated\n", pfx);
+ break;
+ }
+}
+
/*
* 2-byte internal temperature conversions:
* First byte is a signed 8-bit integer, which is the temp decimal part
@@ -757,8 +793,8 @@ static void sff8636_show_page_zero(const struct sff8636_memory_map *map)
SFF8636_VENDOR_SN_END_OFFSET, "Vendor SN");
module_show_ascii(map->page_00h, SFF8636_DATE_YEAR_OFFSET,
SFF8636_DATE_VENDOR_LOT_OFFSET + 1, "Date code");
- sff_show_revision_compliance(map->lower_memory,
- SFF8636_REV_COMPLIANCE_OFFSET);
+ sff8636_show_revision_compliance(map->lower_memory,
+ SFF8636_REV_COMPLIANCE_OFFSET);
sff8636_show_signals(map);
}
@@ -122,39 +122,3 @@ void sff_show_thresholds(struct sff_diags sd)
PRINT_xX_PWR("Laser rx power low warning threshold",
sd.rx_power[LWARN]);
}
-
-void sff_show_revision_compliance(const __u8 *id, int rev_offset)
-{
- static const char *pfx =
- "\tRevision Compliance :";
-
- switch (id[rev_offset]) {
- case SFF8636_REV_UNSPECIFIED:
- printf("%s Revision not specified\n", pfx);
- break;
- case SFF8636_REV_8436_48:
- printf("%s SFF-8436 Rev 4.8 or earlier\n", pfx);
- break;
- case SFF8636_REV_8436_8636:
- printf("%s SFF-8436 Rev 4.8 or earlier\n", pfx);
- break;
- case SFF8636_REV_8636_13:
- printf("%s SFF-8636 Rev 1.3 or earlier\n", pfx);
- break;
- case SFF8636_REV_8636_14:
- printf("%s SFF-8636 Rev 1.4\n", pfx);
- break;
- case SFF8636_REV_8636_15:
- printf("%s SFF-8636 Rev 1.5\n", pfx);
- break;
- case SFF8636_REV_8636_20:
- printf("%s SFF-8636 Rev 2.0\n", pfx);
- break;
- case SFF8636_REV_8636_27:
- printf("%s SFF-8636 Rev 2.5/2.6/2.7\n", pfx);
- break;
- default:
- printf("%s Unallocated\n", pfx);
- break;
- }
-}
@@ -132,6 +132,5 @@ double convert_mw_to_dbm(double mw);
void sff_show_thresholds(struct sff_diags sd);
void sff8024_show_encoding(const __u8 *id, int encoding_offset, int sff_type);
-void sff_show_revision_compliance(const __u8 *id, int rev_offset);
#endif /* SFF_COMMON_H__ */
The only use of the function sff_show_revision_compliance() is in qsfp.c file. Therefore, it doesn't belong to sff_common.c file but it can simply be a static function in qsfp.c. Move sff_show_revision_compliance() function to qsfp.c. Signed-off-by: Danielle Ratson <danieller@nvidia.com> --- qsfp.c | 40 ++++++++++++++++++++++++++++++++++++++-- sff-common.c | 36 ------------------------------------ sff-common.h | 1 - 3 files changed, 38 insertions(+), 39 deletions(-)