Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp840015pxu; Mon, 23 Nov 2020 05:37:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFMXJIqcAisWLT4fUVjYuEYjHZpTS+ZIC0Z36pqYkgNTdoqxM8YE8c9+aFid06oN+NB9Ml X-Received: by 2002:a17:906:3648:: with SMTP id r8mr16221536ejb.145.1606138626276; Mon, 23 Nov 2020 05:37:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606138626; cv=none; d=google.com; s=arc-20160816; b=YBK/9n74lju37BOugye9eZh8TLvxXmpzt/pFlyAKv7LDJ3O/qF4hoiw5KMHNO/kaom iapwDFsJvsz2aGRJBxUBHaENZO5vDDYt69lqIpI0p5Olp3u1U9PBY7qcGPe5JUePUxtj RLz4/9FEQStGT1W1IWnh+8RaQwyesVjGEpEUgPLSsKvuU5pthARlDJBmfUHAO/oFOKBu swg+aXNJI6YJ4eK9/lYp1Se1XfX1luS984AlvfK5znnbQELLLjO31zZ6uQQY8wlldEYa 57Bms9Ju+FwwmYKQO3rSkOV+Q66ZvU5AjgSAoLbDD2TrPMoXi3c5I5R/6gWQBblhECRK 4EKQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LGbiovKiVYYuAiXx35xcc+DmfmLd2Tven/FhAabvR0w=; b=dhrNSJ8vMbPSmvOhgjcoERKJpXAwdZ+M/jlnqpYYKH76ZllFjG1/4MNoQz8PbCRxrQ p7WL/ZTyJijCBtMPcxDfHm+6AInfWel/LTfeY+v/m/oxCpmNgcGAP+8U3h3DmDcuizeO uHJK6ZFnFOtZWg2U2unMGQEYP8c4MW/S15HOM/z7Mhsj5SsbzvKskaUJ1AOOBYwPFHRk aNRPVnFSA7vjYxxfcMm1AuIVhBdBu6xnt7N20RtsDyftBFL+xTXmnN0IqJVyt4a4VUja 3dRAyX5hbq/Eppk9Cu9vBuV9S4bWcxwp+8D30WHBYModgJezH9fLselCNPQhfU7SewL8 WFVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y72Q5n4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si6567400edq.55.2020.11.23.05.36.43; Mon, 23 Nov 2020 05:37:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y72Q5n4N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729931AbgKWMZI (ORCPT + 99 others); Mon, 23 Nov 2020 07:25:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:34540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729910AbgKWMY6 (ORCPT ); Mon, 23 Nov 2020 07:24:58 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C67A72076E; Mon, 23 Nov 2020 12:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606134298; bh=cwKnSKAwq2t7S5YLv/Bj52fXaDfXXxL+1jci1m3VyYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y72Q5n4NLVEmpCE1awuFU+4DxFrjP/GS/ZSAt89BoDfn1Xe1Rfc5JHElOpow1s2mM QS8CVjLz/zMjtAQWRjz6jslo70dw6//MElcJo+a6kjyaZgO6X5L50x+ZWaTXzsExtE a11jYe8ueCLHU0pCogaa20e9LEThcSpD8gCjLHOs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Edwin Peer , Michael Chan , Jakub Kicinski Subject: [PATCH 4.9 03/47] bnxt_en: read EEPROM A2h address using page 0 Date: Mon, 23 Nov 2020 13:21:49 +0100 Message-Id: <20201123121805.709397968@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121805.530891002@linuxfoundation.org> References: <20201123121805.530891002@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Edwin Peer [ Upstream commit 4260330b32b14330cfe427d568ac5f5b29b5be3d ] 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 Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -1862,7 +1862,7 @@ static int bnxt_get_module_eeprom(struct /* 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;