Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp543086pxu; Thu, 7 Jan 2021 11:21:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJuyRTkJ+ohD32ogK+wfNzY9oncRg4HWf9IWW4h4zRLdx04cAaTsVe/xjy8Chfcn/0Snp/ X-Received: by 2002:a17:906:99c4:: with SMTP id s4mr215047ejn.71.1610047276922; Thu, 07 Jan 2021 11:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610047276; cv=none; d=google.com; s=arc-20160816; b=tFwvXT4Mlkj9WqVv2WYIFFnsC2uM32qFme49o5AH5tL4Lfcu7p8bZTN7Xn51j53d3B RHt/PPcIDj7IAg8LEhtBA+1NT81eaBVWn3ouVyFgtvrOoR8ZwJbedkZZYfylP7LMZXOU CdonkpMios4z8bwtF2iVYPeYPULgUeMkxpT7GgiTpu/e9EXYKBgnOtrIKIRA3NPbwC25 550fAuJBNF6GvUKtuPZotF+0+w2p2UEqdr3pkK1V8iveVXlcBRuAqHcqnuwm7YeuxWey vRyrEQuo/hpZD/HuXVif7EvBqVraHPis6Ss5PNyQnrFwBQtmM+WMTkzMxLkZSpGwid+U l0BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=AD3RV78xsEl4cdOQk2A7WI43HhcCuLs9izB8u7puPLE=; b=l7u7XTJqGr+aATMSRl1no8Rz+E+iazeoL/FsDs1eImPnlbcrxOoGjMicGCovYRD4ZG m11GI3RN1az/gbGweGp1LubZ11yb/CepjUm3mYnJZC+zx9+60gcq3YP+Ul/TPDYaaUpq MKcekmpHR8QGUnJ/MxPNJYdCwxlWyuRXwtLhbg4tFwigUFPsFBHsvz/sR4Qq7nD6Pjmg KHIF5ZdAKDi6kYKHASB8i9K6KRrNMSMngJ7Cb2JNK/einjHCCVjTMlwUedSY+bNCL6LH /M9okR9+pzqVpTRWX+uiBpatMLGuTtevuQPPNlUCh0vk9BN6iqlLCm483S0SKIokCQ51 ceQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eAv4ca6x; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mm17si2457785ejb.131.2021.01.07.11.20.53; Thu, 07 Jan 2021 11:21:16 -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=@kernel.org header.s=k20201202 header.b=eAv4ca6x; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729323AbhAGTTS (ORCPT + 99 others); Thu, 7 Jan 2021 14:19:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:43082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbhAGTTR (ORCPT ); Thu, 7 Jan 2021 14:19:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C6232343E; Thu, 7 Jan 2021 19:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610047117; bh=UCctLD+NI8TifQ33SAD5X6VpKMo4qNarVgUMTBLJDDs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eAv4ca6xplkrk3liN62dEyjhmQK1yhRcXtQqMYRCg4fclZuLMFrKTGbQSBwAC/HDF WCCev/6rzL7v9jLil4dRkUmHFPHjBHbEOKYb8Lp+edblXqR3f/O8bzZ2XIuqCeKuiL F8GHQDB+xI5YpiHl2GIVonh7yLu4qpT6FhVopUN446gzAR35rkNOQ7ZY7/x8hKzeYc W9p7XuxgXadieG61O9nJZXvuZZ5shj0RcSrgJCk+4G9YmVzjOi9EVy8ybKw4eZOO41 9k47BD8cFm6lDjIbaMghe/Vz30R/59igwcJo7HzmfKKT7B+UehxdSiEpYGfTPX3giQ cwsTSvX6yH2BA== Received: by pali.im (Postfix) id A88CD77B; Thu, 7 Jan 2021 20:18:34 +0100 (CET) Date: Thu, 7 Jan 2021 20:18:34 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Russell King - ARM Linux admin Cc: Andrew Lunn , "David S. Miller" , Jakub Kicinski , Thomas Schreiber , Heiner Kallweit , Marek =?utf-8?B?QmVow7pu?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips Message-ID: <20210107191834.bsvwen2rgpozer7o@pali> References: <20201230154755.14746-1-pali@kernel.org> <20210106153749.6748-1-pali@kernel.org> <20210106153749.6748-2-pali@kernel.org> <20210107174006.GQ1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107174006.GQ1551@shell.armlinux.org.uk> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 07 January 2021 17:40:06 Russell King - ARM Linux admin wrote: > On Thu, Jan 07, 2021 at 06:19:23PM +0100, Andrew Lunn wrote: > > Did we loose the comment: > > > > /* Some modules (Nokia 3FE46541AA) lock up if byte 0x51 is read as a > > * single read. Switch back to reading 16 byte blocks ... > > > > That explains why 16 is used. Given how broken stuff is and the number > > of workaround we need, we should try to document as much as we cam, so > > we don't break stuff when adding more workarounds. > > It is _not_ why 16 is used at all. > > We used to read the whole lot in one go. However, some modules could > not cope with a full read - also some Linux I2C drivers struggled with > it. > > So, we reduced it down to 16 bytes. See commit 28e74a7cfd64 ("net: sfp: > read eeprom in maximum 16 byte increments"). That had nothing to do > with the 3FE46541AA, which came along later. It has been discovered > that 3FE46541AA reacts badly to a single byte read to address 0x51 - > it locks the I2C bus. Hence why we can't just go to single byte reads > for every module. > > So, the comment needs to be kept to explain why we are unable to go > to single byte reads for all modules. The choice of 16 remains > relatively arbitary. Do you have an idea where to put a comment?