From 3144fbfc08fbfb90ecda4848fc9356bde8933d4a Mon Sep 17 00:00:00 2001 From: Dan Merillat Date: Sun, 30 Jun 2024 13:11:51 -0400 Subject: [PATCH] Some qsfp modules do not support page 3 Tested on an older Kaiam XQX2502 40G-LR4 module. ethtool -m aborts with netlink error due to page 3 not existing on the module. Ignore the error and leave map->page_03h NULL. --- qsfp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qsfp.c b/qsfp.c index a2921fb..0a16b42 100644 --- a/qsfp.c +++ b/qsfp.c @@ -1037,9 +1037,15 @@ sff8636_memory_map_init_pages(struct cmd_context *ctx, return 0; sff8636_request_init(&request, 0x3, SFF8636_PAGE_SIZE); + + /* Some modules are paged but do not have page 03h. This + * is a non-fatal error, and sff8636_dom_parse() handles this + * correctly. + */ ret = nl_get_eeprom_page(ctx, &request); if (ret < 0) - return ret; + return 0; + map->page_03h = request.data - SFF8636_PAGE_SIZE; return 0; -- 2.45.1