From patchwork Thu Apr 6 13:08:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Bornyakov X-Patchwork-Id: 7815 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1018170vqo; Thu, 6 Apr 2023 06:16:32 -0700 (PDT) X-Google-Smtp-Source: AKy350ZmYzMX71nRbPwyCXMEM+vXVriYXYFY3qAiQb1CowpslY6BD2ooQgKXHVBwkGV9t+Ie0Wln X-Received: by 2002:a17:906:3c4d:b0:8af:2107:6ce5 with SMTP id i13-20020a1709063c4d00b008af21076ce5mr6733605ejg.35.1680786992169; Thu, 06 Apr 2023 06:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680786992; cv=none; d=google.com; s=arc-20160816; b=Ku/meWsTsQNLorPK62wvWr4HUNu+r6BCv5JIQJYM2dCb7WRdrgg8lROvPdnHOI1eRM /hgSBGLwgS3nk/DqvpId4iteJ7f7QFsY3bOwQ+ehFOxI9Qt8JxIlK/gC25H3AZsmKX8J jTYmZDx10kfZkDjenBzW7sOusVlVIDo/aGMfkGBuN+aWigEm9OEdFG4MLVMqoMxDs/S2 xXVR6ld9gC8P2nFozL+UsvraXhaztHHFItZj3JDhil2gRya8bvWXbrQRV7al6YOoj0hN rK1WCugfzZN3YX21/0NoqQq79eUDskg2X6J0IT8ooQtKAT1Uw9RapO5iLHbtIczF3HnK AmIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zJDFRMR6SVu9Ys8fYwenrRnJeUMQAXPcNchu9YNbf1Q=; b=neq2CRTI8V7PvuMACpyFEEQ/DqQ60p/P3+X9Ibx2ofiTug5k8HALn7bhbbmsIZvdyI ZdhzlJVim5t8mY7uQofmJmXo1OZySZQgpvokEwtsGBowMoJXjMAdq6G1nVOKk/tzZKzm Ye/i8YsgQFQs7+dg84REluv9yXm3rygaQn1apbbaDqv5KnZFVpRGdcdoqO2R9VOGQwAg 2EOU0R8rT6bdVfXz6sRd0w/neFVSMnemKkGmKIBJ1GvB2v+40D5vjpfIbcZDEKSgnDRB QI61kzhChPvHe2WrJ0O78samYWgr7VHohO3rzvFe5CWIAqCLUEwVDQm0ocZ2RmJhpVM3 riYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=gO+GHHTg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020a170906274e00b009236b7f4417si1098917ejd.527.2023.04.06.06.16.07; Thu, 06 Apr 2023 06:16:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=gO+GHHTg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237736AbjDFNJ2 (ORCPT + 99 others); Thu, 6 Apr 2023 09:09:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229721AbjDFNJY (ORCPT ); Thu, 6 Apr 2023 09:09:24 -0400 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEF85135; Thu, 6 Apr 2023 06:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=metrotek.ru; s=mail; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding; bh=G79lbWH8CPCUsL1PA3+WCtub2L63ls1iJ37POigO2Gw=; b=gO+GHHTgwJKiF7YkHbUDSAzulMZFckTiv3nlGwdwQ6uGX1R0mj+Ia4gxRcrhKd+jq16Q1zj6kHmMZ OXMQxLD/CDWrq/WmP75LitGeui0RRMAO+SCLbvAc7VhnQLT5cVkVmW5YIfn/1Os5gGSEaWYWH4XJ6J sOECUTnwDbUTyixFoISe4G2yvv4vgCz2NbmnpXZKkMN0my0MCuM0Txk9OSRV7BRAds84CSb4dk1q6l C2zB8zAHU3Zc9/zQXIygFSuwZ1poQLH6zyqEa87K5t/7D5zTH7xSnn9k0pJwWGZmMRiq8Ghx+uWdKE CIzsXwEvS2f1PqRX7UXdZ7lkptIroBQ== X-Kerio-Anti-Spam: Build: [Engines: 2.17.2.1477, Stamp: 3], Multi: [Enabled, t: (0.000009,0.005049)], BW: [Enabled, t: (0.000029,0.000001)], RTDA: [Enabled, t: (0.135792), Hit: No, Details: v2.49.0; Id: 15.g4r6p.1gtbauivb.1mh; mclb], total: 0(700) X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from localhost.localdomain ([78.37.166.219]) (authenticated user i.bornyakov@metrotek.ru) by mail.pr-group.ru with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Thu, 6 Apr 2023 16:08:57 +0300 From: Ivan Bornyakov To: netdev@vger.kernel.org Cc: Ivan Bornyakov , linux@armlinux.org.uk, andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, system@metrotek.ru Subject: [PATCH net v2 0/2] fix EEPROM read of absent SFP module Date: Thu, 6 Apr 2023 16:08:31 +0300 Message-Id: <20230406130833.32160-1-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762432901552502188?= X-GMAIL-MSGID: =?utf-8?q?1762432901552502188?= The patchset is to improve EEPROM read requests when SFP module is absent. ChangeLog: v1: https://lore.kernel.org/netdev/20230405153900.747-1-i.bornyakov@metrotek.ru/ v2: * reword commit message of "net: sfp: initialize sfp->i2c_block_size at sfp allocation" * add second patch to eliminate excessive I2C transfers in sfp_module_eeprom() and sfp_module_eeprom_by_page() Ivan Bornyakov (2): net: sfp: initialize sfp->i2c_block_size at sfp allocation net: sfp: avoid EEPROM read of absent SFP module drivers/net/phy/sfp.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)