From patchwork Mon Nov 16 00:27:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 325176 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, T_TVD_MIME_NO_HEADERS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A1F0C63697 for ; Mon, 16 Nov 2020 00:28:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F200622314 for ; Mon, 16 Nov 2020 00:28:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="SadjDcwA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728160AbgKPA2N (ORCPT ); Sun, 15 Nov 2020 19:28:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726311AbgKPA2M (ORCPT ); Sun, 15 Nov 2020 19:28:12 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50295C0613CF for ; Sun, 15 Nov 2020 16:28:12 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id 131so1454792pfb.9 for ; Sun, 15 Nov 2020 16:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6rPe1iq7+fcLr9VBmsv3jn5BZ44p0yB9+/X5hPyBzIo=; b=SadjDcwADYRK5IZFsAVcAItSo8LlEk0K3GIyIVfmM5Uj+gFXFnmWthk6uUluTDRmce SXwmz6SgMTS03JUh4HsXFKogsI/WUK0id2aQFAbI1SiNzTqVaJD8cdTmHbE+/Jp0JgoG CT9f7hUCC+FbdJmnsUAOieWkfS0OxCE504VV8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6rPe1iq7+fcLr9VBmsv3jn5BZ44p0yB9+/X5hPyBzIo=; b=Y7PTn+bEYbqZRP1j4D6JKuByZjNqS3RfxcjtgW1URnLhekXkjPll6mrymgRuPzYtZO tN9TfLo1p8xT1D635YoEURENfYXyvwitljnGHFCZ+0uB9krjK/VPgeWch9zhE6EkWfi5 agan14lvBhyNXs42cO/Pxfp8ExOIClaufKwcEZtPcHjtR8osvFJ+tQgV21iN0JJU8fVA 9nD+DmGOhhYz1ey8EDAV6f6PBGE2g4hK4NC+FHfzW4J01TcFgFwS51w43e7P7K79q81W FGM3HnnD0yMc92yzaqn+4PaoREGbWRSP5KptpXobId6gq691TRv7hSHWp3zflS6RBAKV xl5Q== X-Gm-Message-State: AOAM533d0aYImLMZCZ+BSYAL3SRrmY56tKg4TGlRVHPeR1kGLkE4By33 +wyZC9qSeoTxmBFbJGYFMRwM/vmAeZjyCw== X-Google-Smtp-Source: ABdhPJy6axevHbK/ZUVkylS6spqU8S0yQcAXodhtWYOJh0dfmzHIWM8jKoQl5uK3EoRtfBq1fWALHQ== X-Received: by 2002:a62:db03:0:b029:196:45d6:9bb3 with SMTP id f3-20020a62db030000b029019645d69bb3mr3460203pfg.74.1605486491604; Sun, 15 Nov 2020 16:28:11 -0800 (PST) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id i19sm2942563pgk.44.2020.11.15.16.28.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Nov 2020 16:28:11 -0800 (PST) From: Michael Chan To: kuba@kernel.org Cc: netdev@vger.kernel.org, gospo@broadcom.com Subject: [PATCH net 1/4] bnxt_en: read EEPROM A2h address using page 0 Date: Sun, 15 Nov 2020 19:27:49 -0500 Message-Id: <1605486472-28156-2-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1605486472-28156-1-git-send-email-michael.chan@broadcom.com> References: <1605486472-28156-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Edwin Peer The module eeprom address range returned by bnxt_get_module_eeprom() should be 256 bytes of A0h address space, the lower half of the A2h address space, and page 0 for the upper half of the A2h address space. Fix the firmware call by passing page_number 0 for the A2h slave address space. Fixes: 42ee18fe4ca2 ("bnxt_en: Add Support for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPRO") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 53687bc7fcf5..f133ea5674cb 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -2997,7 +2997,7 @@ static int bnxt_get_module_eeprom(struct net_device *dev, /* Read A2 portion of the EEPROM */ if (length) { start -= ETH_MODULE_SFF_8436_LEN; - rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A2, 1, + rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A2, 0, start, length, data); } return rc;