From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6D26A58EF for ; Mon, 21 Sep 2015 11:13:26 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 21 Sep 2015 02:13:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,567,1437462000"; d="scan'208";a="809215609" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga002.jf.intel.com with ESMTP; 21 Sep 2015 02:13:24 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.252]) by IRSMSX101.ger.corp.intel.com ([169.254.1.139]) with mapi id 14.03.0248.002; Mon, 21 Sep 2015 10:13:23 +0100 From: "Ananyev, Konstantin" To: "Horton, Remy" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3] ixgbe: fix access to last byte of EEPROM Thread-Index: AQHQ8U9vjNhgd8+5e0iTZgwWBz/zRp5GuIdw Date: Mon, 21 Sep 2015 09:13:22 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836A9892B@irsmsx105.ger.corp.intel.com> References: <1442480744-3393-1-git-send-email-remy.horton@intel.com> <1442497636-5679-1-git-send-email-remy.horton@intel.com> In-Reply-To: <1442497636-5679-1-git-send-email-remy.horton@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] ixgbe: fix access to last byte of EEPROM X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2015 09:13:26 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Remy Horton > Sent: Thursday, September 17, 2015 2:47 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v3] ixgbe: fix access to last byte of EEPROM >=20 > Incorrect operator in ixgbe_get_eeprom & ixgbe_set_eeprom prevents > last byte of EEPROM being read/written, and hence cannot be dumped > or updated in entirity using these functions. >=20 > Fixes: 0198848a47f5 ("ixgbe: add access to specific device info") >=20 > Signed-off-by: Remy Horton > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.c > index ec2918c..4a7ee3b 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -5444,8 +5444,8 @@ ixgbe_get_eeprom(struct rte_eth_dev *dev, >=20 > first =3D in_eeprom->offset >> 1; > length =3D in_eeprom->length >> 1; > - if ((first >=3D hw->eeprom.word_size) || > - ((first + length) >=3D hw->eeprom.word_size)) > + if ((first > hw->eeprom.word_size) || > + ((first + length) > hw->eeprom.word_size)) > return -EINVAL; >=20 > in_eeprom->magic =3D hw->vendor_id | (hw->device_id << 16); > @@ -5464,8 +5464,8 @@ ixgbe_set_eeprom(struct rte_eth_dev *dev, >=20 > first =3D in_eeprom->offset >> 1; > length =3D in_eeprom->length >> 1; > - if ((first >=3D hw->eeprom.word_size) || > - ((first + length) >=3D hw->eeprom.word_size)) > + if ((first > hw->eeprom.word_size) || > + ((first + length) > hw->eeprom.word_size)) > return -EINVAL; >=20 > in_eeprom->magic =3D hw->vendor_id | (hw->device_id << 16); > -- Acked-by: Konstantin Ananyev > 1.9.3