Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4811700yba; Tue, 30 Apr 2019 04:55:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNz2qyP1vhdzYqU8dKt2GXFKQWEdp7AIgQqiXunOZwF8zvlVJvZ2i105tzA+TzALLwSEzx X-Received: by 2002:a63:5c1b:: with SMTP id q27mr1166815pgb.127.1556625323973; Tue, 30 Apr 2019 04:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556625323; cv=none; d=google.com; s=arc-20160816; b=mgAPWcg7CwUxLlbFugXqMIEaGFv8dP4uhuzGimOgVY//Cms66hwWN6T97c0EEG4H14 fWKiXsJSLY5yvZlLJuI9JhWo5DHX0IB4pOwmi9ZIx5wmE86iCmb74/eFYUtGMTM8PvLo q4/bv4dfhRQKhc8D/ibxZydnSiyL5LnF3kW6xgQhcto6PHREXd8l+p3vjXR3w9Hjkbfn 4gCp5OkUvCJNWmGeou7jGoISbzioYTdVX2G9hFrGGlU56Wr7O4PKrln2TTH8LMpkIjDO INZ0w/j0IStlTWDE8ndji7un82FqwkrfnecsFMnOkQettbDTW89RRHPm1/ZRYhS9dTHp JdaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n2GE3BdJdWxIqHpoS36C1qEXO4Zlf2w2Eq4tUZTyCrQ=; b=Ag+zmItXTL5GIhhv8zV38sL/WKVQQnr+dfifnSmprGwHRg3EOTqSJmAYV+2Hesh1Ig 1tGkwv+JLvareaalBe2j0a0tM5puW18XYnRQWCIWmR3ri78hbqx6V0aGXPFDYGk4OkgC Qz2HIzojald69rbSQfTpAhhzsF6eKmsh/9YzPgXqELM0bNvEQZfIzVgKMmnwY4zmWgoj IjrFAUcu/rXEtL3HN+qAQWQiL4yLhBRsPfWpaLjGcHC+GQ+pETF4T7Zl6UW/P+f/wavG z/11RJmEu4B9Ej3NskaC1HDKt2z2L8Gy3tFm5qmSIkNy3o7QLJk0jDKWO8BPbEGn+ZEA XLgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vbMeMFYq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g33si35673635pgb.192.2019.04.30.04.55.08; Tue, 30 Apr 2019 04:55:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vbMeMFYq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730814AbfD3LvB (ORCPT + 99 others); Tue, 30 Apr 2019 07:51:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:38388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731285AbfD3Lu7 (ORCPT ); Tue, 30 Apr 2019 07:50:59 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 3425820449; Tue, 30 Apr 2019 11:50:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556625058; bh=VIBDoBYWrv4Hz50FNYm0hZqoUAxsH6f4TnodRCgSobo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vbMeMFYqBXyHAmGjLdjg4wWZ4rd/6kLrGFSPzkHFbHLJouLO8pStbe4PEKh1shdrq YTRjCmjupQBUDeuJemPmL/gwB33PX68RwuF6DD/kMjckTs73DNBAa9cR/tTY77xpCE SLCyTkXHsoPbA1zHT1inCU+9bW2MC+PXdGrnnA94= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Erez Alfasi , Saeed Mahameed Subject: [PATCH 5.0 75/89] net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query Date: Tue, 30 Apr 2019 13:39:06 +0200 Message-Id: <20190430113613.279103908@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190430113609.741196396@linuxfoundation.org> References: <20190430113609.741196396@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Erez Alfasi [ Upstream commit ace329f4ab3ba434be2adf618073c752d083b524 ] Querying EEPROM high pages data for SFP module is currently not supported by our driver and yet queried, resulting in invalid FW queries. Set the EEPROM ethtool data length to 256 for SFP module will limit the reading for page 0 only and prevent invalid FW queries. Fixes: bb64143eee8c ("net/mlx5e: Add ethtool support for dump module EEPROM") Signed-off-by: Erez Alfasi Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/port.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c @@ -1470,7 +1470,7 @@ static int mlx5e_get_module_info(struct break; case MLX5_MODULE_ID_SFP: modinfo->type = ETH_MODULE_SFF_8472; - modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN; + modinfo->eeprom_len = MLX5_EEPROM_PAGE_LENGTH; break; default: netdev_err(priv->netdev, "%s: cable type not recognized:0x%x\n", --- a/drivers/net/ethernet/mellanox/mlx5/core/port.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c @@ -404,10 +404,6 @@ int mlx5_query_module_eeprom(struct mlx5 size -= offset + size - MLX5_EEPROM_PAGE_LENGTH; i2c_addr = MLX5_I2C_ADDR_LOW; - if (offset >= MLX5_EEPROM_PAGE_LENGTH) { - i2c_addr = MLX5_I2C_ADDR_HIGH; - offset -= MLX5_EEPROM_PAGE_LENGTH; - } MLX5_SET(mcia_reg, in, l, 0); MLX5_SET(mcia_reg, in, module, module_num);