[{"id":1766315,"web_url":"http://patchwork.ozlabs.org/comment/1766315/","msgid":"<20170911135826.GB27599@lunn.ch>","list_archive_url":null,"date":"2017-09-11T13:58:26","subject":"Re: [patch net] mlxsw: spectrum: Fix EEPROM access in case of\n\tSFP/SFP+","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"On Mon, Sep 11, 2017 at 09:42:26AM +0200, Jiri Pirko wrote:\n> From: Arkadi Sharshevsky <arkadis@mellanox.com>\n> \n> The current code does not handle correctly the access to the upper page\n> in case of SFP/SFP+ EEPROM. In that case the offset should be local\n> and the I2C address should be changed.\n\nShame you cannot/didn't expose the i2c bus as a linux i2c bus. The AT24 code\ndoes not have this bug!\n\n     Andrew","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrTzb5FRvz9s0Z\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 11 Sep 2017 23:58:35 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751279AbdIKN6b (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 11 Sep 2017 09:58:31 -0400","from vps0.lunn.ch ([178.209.37.122]:37177 \"EHLO vps0.lunn.ch\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1750903AbdIKN6a (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tMon, 11 Sep 2017 09:58:30 -0400","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1drPEI-0007Lu-6d; Mon, 11 Sep 2017 15:58:26 +0200"],"Date":"Mon, 11 Sep 2017 15:58:26 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Jiri Pirko <jiri@resnulli.us>","Cc":"netdev@vger.kernel.org, davem@davemloft.net, arkadis@mellanox.com,\n\tidosch@mellanox.com, flokli@flokli.de, mlxsw@mellanox.com","Subject":"Re: [patch net] mlxsw: spectrum: Fix EEPROM access in case of\n\tSFP/SFP+","Message-ID":"<20170911135826.GB27599@lunn.ch>","References":"<20170911074226.2020-1-jiri@resnulli.us>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170911074226.2020-1-jiri@resnulli.us>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1766411,"web_url":"http://patchwork.ozlabs.org/comment/1766411/","msgid":"<20170911172753.GB1935@nanopsycho>","list_archive_url":null,"date":"2017-09-11T17:27:53","subject":"Re: [patch net] mlxsw: spectrum: Fix EEPROM access in case of\n\tSFP/SFP+","submitter":{"id":15321,"url":"http://patchwork.ozlabs.org/api/people/15321/","name":"Jiri Pirko","email":"jiri@resnulli.us"},"content":"Mon, Sep 11, 2017 at 03:58:26PM CEST, andrew@lunn.ch wrote:\n>On Mon, Sep 11, 2017 at 09:42:26AM +0200, Jiri Pirko wrote:\n>> From: Arkadi Sharshevsky <arkadis@mellanox.com>\n>> \n>> The current code does not handle correctly the access to the upper page\n>> in case of SFP/SFP+ EEPROM. In that case the offset should be local\n>> and the I2C address should be changed.\n>\n>Shame you cannot/didn't expose the i2c bus as a linux i2c bus. The AT24 code\n\nWe cannot.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=resnulli-us.20150623.gappssmtp.com\n\theader.i=@resnulli-us.20150623.gappssmtp.com\n\theader.b=\"CVizbYYO\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrZdG1b4sz9sBd\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 12 Sep 2017 03:28:02 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752309AbdIKR17 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 11 Sep 2017 13:27:59 -0400","from mail-wr0-f193.google.com ([209.85.128.193]:33377 \"EHLO\n\tmail-wr0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752086AbdIKR15 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 11 Sep 2017 13:27:57 -0400","by mail-wr0-f193.google.com with SMTP id b9so4745509wra.0\n\tfor <netdev@vger.kernel.org>; Mon, 11 Sep 2017 10:27:56 -0700 (PDT)","from localhost ([83.167.225.161]) by smtp.gmail.com with ESMTPSA id\n\td5sm10809605wma.22.2017.09.11.10.27.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 11 Sep 2017 10:27:55 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=resnulli-us.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=1hLPvZdcNxSc/DIVWyuJeurWHdRgiR/OpAX2ZV/r3V4=;\n\tb=CVizbYYOa1oXbXNr+ISrgOX5JyeVpIZ+WwUJFVguHtdn9+bUD6cM/VuegAajuBipXG\n\t7Rha/u3+BrG6hw8TepCVNg3h/Y4L3p20BeaS/TiHRwIcEDViIQ2d1TSGu3k/Dy6VkXSZ\n\tG/HWfL0q925pkyEQkuPgubizKevBgNRLVHNv1ZUpRDlel///qszWkRHG0cfaL6nxEa+Y\n\taTJlGIwTq2S1fqK1eNw2YR1Sz2einjVEsnyw3hlSvteiXx3iKwXiP1mSV+s8Ov+PWW3H\n\t5dnSJbweHP2RNMN1xRMlNrA86kmLBLzE7Nu8uIF3UQMj4SpxMd09ez3XSSjBy364TH6F\n\tqpXA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=1hLPvZdcNxSc/DIVWyuJeurWHdRgiR/OpAX2ZV/r3V4=;\n\tb=C3kAxGLMw1euidsC9MNmdl2jrCcwFw+aA0BV2w+NVe49HG/a5yW2iMrTLlBYxn8PZn\n\tmSd56ILP8km4dgE4s9i107eXIa+X6BgIlc/t4rEBYj0YL1mAyyNRUz+zUKIwdZKEOP/K\n\thyQFgqLALodrMcmlSNAET+uHsVaVcAaCnJjDFA1fyJsH0fdHd2IZ5tURot6/9KC3543w\n\tjrV+D/Mp0dU0NiSGyheLfII99gr2px7qFrG7bXNIXEotByjiRMQk3AW5D7uSuVX/L+Ej\n\tlIGmzSmXrVe6F9aqRLyJfE26qCvYI8j9l1L4eIlfKDNNm8TWtcaXofey6tIdQ4oPZDT4\n\tm+Ug==","X-Gm-Message-State":"AHPjjUjfnfQp9+IXNBf/usbgC2g/sVNAlUB8gBvutEMcgI3P9pakz4vz\n\teT1OzLN7vC92npNJ","X-Google-Smtp-Source":"AOwi7QBNfB7YXCpTSYetE4EwOpYw8xJ/ZgjuFmofwVZG6SUsi+tmbZqdl0v5+t9a5+TxjNOgcplzYg==","X-Received":"by 10.223.135.66 with SMTP id 2mr9052846wrz.208.1505150876097;\n\tMon, 11 Sep 2017 10:27:56 -0700 (PDT)","Date":"Mon, 11 Sep 2017 19:27:53 +0200","From":"Jiri Pirko <jiri@resnulli.us>","To":"Andrew Lunn <andrew@lunn.ch>","Cc":"netdev@vger.kernel.org, davem@davemloft.net, arkadis@mellanox.com,\n\tidosch@mellanox.com, flokli@flokli.de, mlxsw@mellanox.com","Subject":"Re: [patch net] mlxsw: spectrum: Fix EEPROM access in case of\n\tSFP/SFP+","Message-ID":"<20170911172753.GB1935@nanopsycho>","References":"<20170911074226.2020-1-jiri@resnulli.us>\n\t<20170911135826.GB27599@lunn.ch>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170911135826.GB27599@lunn.ch>","User-Agent":"Mutt/1.8.3 (2017-05-23)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1766421,"web_url":"http://patchwork.ozlabs.org/comment/1766421/","msgid":"<20170911.104141.1428817513537310351.davem@davemloft.net>","list_archive_url":null,"date":"2017-09-11T17:41:41","subject":"Re: [patch net] mlxsw: spectrum: Fix EEPROM access in case of\n\tSFP/SFP+","submitter":{"id":15,"url":"http://patchwork.ozlabs.org/api/people/15/","name":"David Miller","email":"davem@davemloft.net"},"content":"From: Jiri Pirko <jiri@resnulli.us>\nDate: Mon, 11 Sep 2017 09:42:26 +0200\n\n> From: Arkadi Sharshevsky <arkadis@mellanox.com>\n> \n> The current code does not handle correctly the access to the upper page\n> in case of SFP/SFP+ EEPROM. In that case the offset should be local\n> and the I2C address should be changed.\n> \n> Fixes: 2ea109039cd3 (\"mlxsw: spectrum: Add support for access cable info via ethtool\")\n> Reported-by: Florian Klink <flokli@flokli.de>\n> Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>\n> Reviewed-by: Ido Schimmel <idosch@mellanox.com>\n> Signed-off-by: Jiri Pirko <jiri@mellanox.com>\n\nApplied and queued up for -stable, thanks.","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrZx53djLz9s81\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 12 Sep 2017 03:41:45 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750993AbdIKRln (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 11 Sep 2017 13:41:43 -0400","from shards.monkeyblade.net ([184.105.139.130]:50776 \"EHLO\n\tshards.monkeyblade.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750877AbdIKRlm (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 11 Sep 2017 13:41:42 -0400","from localhost (74-93-104-98-Washington.hfc.comcastbusiness.net\n\t[74.93.104.98]) (using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\t(Authenticated sender: davem-davemloft)\n\tby shards.monkeyblade.net (Postfix) with ESMTPSA id 2079410223E50;\n\tMon, 11 Sep 2017 10:41:42 -0700 (PDT)"],"Date":"Mon, 11 Sep 2017 10:41:41 -0700 (PDT)","Message-Id":"<20170911.104141.1428817513537310351.davem@davemloft.net>","To":"jiri@resnulli.us","Cc":"netdev@vger.kernel.org, arkadis@mellanox.com, idosch@mellanox.com,\n\tflokli@flokli.de, mlxsw@mellanox.com","Subject":"Re: [patch net] mlxsw: spectrum: Fix EEPROM access in case of\n\tSFP/SFP+","From":"David Miller <davem@davemloft.net>","In-Reply-To":"<20170911074226.2020-1-jiri@resnulli.us>","References":"<20170911074226.2020-1-jiri@resnulli.us>","X-Mailer":"Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)","Mime-Version":"1.0","Content-Type":"Text/Plain; charset=us-ascii","Content-Transfer-Encoding":"7bit","X-Greylist":"Sender succeeded SMTP AUTH, not delayed by\n\tmilter-greylist-4.5.12 (shards.monkeyblade.net\n\t[149.20.54.216]); Mon, 11 Sep 2017 10:41:42 -0700 (PDT)","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]