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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 8367FC2D0E4 for ; Tue, 24 Nov 2020 00:20:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D5DD20758 for ; Tue, 24 Nov 2020 00:20:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729146AbgKXAUX (ORCPT ); Mon, 23 Nov 2020 19:20:23 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:46338 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726844AbgKXAUX (ORCPT ); Mon, 23 Nov 2020 19:20:23 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1khM4D-008ZOl-0v; Tue, 24 Nov 2020 01:20:21 +0100 Date: Tue, 24 Nov 2020 01:20:21 +0100 From: Andrew Lunn To: Russell King Cc: Heiner Kallweit , "David S. Miller" , netdev@vger.kernel.org, Jakub Kicinski Subject: Re: [PATCH net-next] net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround Message-ID: <20201124002021.GB2031446@lunn.ch> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > @@ -335,10 +336,19 @@ static int sfp_i2c_read(struct sfp *sfp, bool a2, u8 dev_addr, void *buf, > size_t len) > { > struct i2c_msg msgs[2]; > - u8 bus_addr = a2 ? 0x51 : 0x50; > + size_t block_size; > size_t this_len; > + u8 bus_addr; > int ret; > > + if (a2) { > + block_size = 16; > + bus_addr = 0x51; Hi Russell, Thomas Does this man the diagnostic page can be read 16 bytes at a time, even when the other page has to be 1 bytes at a time? That seems rather odd. Or is the diagnostic page not implemented in these SFPs? Andrew