lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180221203509.9883-1-saeedm@mellanox.com>
Date:   Wed, 21 Feb 2018 12:35:09 -0800
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "John W . Linville" <linville@...driver.com>
Cc:     netdev@...r.kernel.org, Saeed Mahameed <saeedm@...lanox.com>
Subject: [PATCH ethtool] ethtool: Add SFF 8636 date code parsing support

Parse date codes according to SFF 8636 and print them to output.

ethtool -m ethX
	[...]
        Date code : 160220

Signed-off-by: Saeed Mahameed <saeedm@...lanox.com>
Reviewed-by: Gal Pressman <galp@...lanox.com>
---
 qsfp.c | 2 ++
 qsfp.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/qsfp.c b/qsfp.c
index 213802e..aecd5bb 100644
--- a/qsfp.c
+++ b/qsfp.c
@@ -782,6 +782,8 @@ void sff8636_show_all(const __u8 *id, __u32 eeprom_len)
 			       SFF8636_VENDOR_REV_END_OFFSET, "Vendor rev");
 		sff_show_ascii(id, SFF8636_VENDOR_SN_START_OFFSET,
 			       SFF8636_VENDOR_SN_END_OFFSET, "Vendor SN");
+		sff_show_ascii(id, SFF8636_DATE_YEAR_OFFSET,
+			       SFF8636_DATE_VENDOR_LOT_OFFSET + 1, "Date code");
 		sff8636_show_revision_compliance(id);
 		sff8636_show_dom(id, eeprom_len);
 	}
diff --git a/qsfp.h b/qsfp.h
index 553ca5f..b623174 100644
--- a/qsfp.h
+++ b/qsfp.h
@@ -535,6 +535,8 @@
 #define	  SFF8636_DATE_MONTH_LEN		2
 #define	 SFF8636_DATE_DAY_OFFSET	0xD8
 #define	  SFF8636_DATE_DAY_LEN			2
+#define	 SFF8636_DATE_VENDOR_LOT_OFFSET 0xDA
+#define	  SFF8636_DATE_VENDOR_LOT_LEN		2
 
 /* Diagnostic Monitoring Type - 220 */
 #define	 SFF8636_DIAG_TYPE_OFFSET	0xDC
-- 
2.14.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ