Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10701101pxu; Wed, 30 Dec 2020 09:14:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzALryaalOD8+Lp151x/dh4Oned45WsZvmrvXfqEtsrAAFoCBkYMENGVZ0SifXTYlLCnbJ/ X-Received: by 2002:a17:906:3146:: with SMTP id e6mr36369480eje.363.1609348492474; Wed, 30 Dec 2020 09:14:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609348492; cv=none; d=google.com; s=arc-20160816; b=gq99msIxmMOQjZ8dy4b4bwUmp1fn+FCWBWRiZ8yCZApt36slzerdoLsDJQ7jaeX4fq T3+eDvZzAofIa+HNkEIcuHB0qo+uziBDc9I4TfCMiBdVwLe23Gtzj0w+EoRsXZgol2Vg 9AqPrqzDDCJ8V2qJOvHKUJ++4fP9f6CZs369k9WRGuSHotssl81bOIfIZQZY/6annQC9 Asr4qX74z0G9mP0g2hBVF8FYhX6gsRVL4TcqewXLem6mC45J2IJvZiEk73xupd4itH5U 17CmnRDau9sJBxXD+NX1Q6LIvVLrIe5j2YZJ5WovLraCMmvtDs/yb5J4u7Yx0ZCLS4o7 j9ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0ovGojjSf+dCiyO4NW07JvXhd0YQkomQanvdULLQY7o=; b=VaRIYU4wH1s8cr6xobaMJm0nT1bn0tz0iwTeCIo4A3uT1+eSaXBKEGOtrjZ4TEeADY wyqlcpxR0mGUCKtP3DRAq8K8EWcm/MDpSHPUFJof73fH1SNTs9xy4tROn2JpwnIQMsF0 SAxkFrOgK4HyntwfgQR0ukQ+x6RjDx8669CTQMlUsK0Wt+2ido5skY4fBZSHrWsjgiJF qGjDJif22cc2ga3WjAcj94uXNeN7bwXniPGuKcCA1+oThlHUE0h+79LhIPFOJVle9hIH 1SrJjSSZ9u5/SIYY2ahiE+db/RHDuhgMhqKTws/jiIOItVwrwqChnHtef276JjJJRiAq UKeg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si23591117edr.372.2020.12.30.09.14.28; Wed, 30 Dec 2020 09:14:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726371AbgL3ROB (ORCPT + 99 others); Wed, 30 Dec 2020 12:14:01 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44792 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbgL3ROB (ORCPT ); Wed, 30 Dec 2020 12:14:01 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kuf2B-00F3rd-FZ; Wed, 30 Dec 2020 18:13:15 +0100 Date: Wed, 30 Dec 2020 18:13:15 +0100 From: Andrew Lunn To: Russell King - ARM Linux admin Cc: Pali =?iso-8859-1?Q?Roh=E1r?= , Heiner Kallweit , "David S. Miller" , Jakub Kicinski , Marek =?iso-8859-1?Q?Beh=FAn?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips Message-ID: References: <20201230154755.14746-1-pali@kernel.org> <20201230154755.14746-2-pali@kernel.org> <20201230161036.GR1551@shell.armlinux.org.uk> <20201230165634.c4ty3mw6djezuyq6@pali> <20201230170546.GU1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201230170546.GU1551@shell.armlinux.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 30, 2020 at 05:05:46PM +0000, Russell King - ARM Linux admin wrote: > On Wed, Dec 30, 2020 at 05:56:34PM +0100, Pali Roh?r wrote: > > This change is really required for those Realtek chips. I thought that > > it is obvious that from *both* addresses 0x50 and 0x51 can be read only > > one byte at the same time. Reading 2 bytes (for be16 value) cannot be > > really done by one i2 transfer, it must be done in two. > > Then these modules are even more broken than first throught, and > quite simply it is pointless supporting the diagnostics on them > because we can never read the values in an atomic way. > > It's also a violation of the SFF-8472 that _requires_ multi-byte reads > to read these 16 byte values atomically. Reading them with individual > byte reads results in a non-atomic read, and the 16-bit value can not > be trusted to be correct. Hi Pali I have to agree with Russell here. I would rather have no diagnostics than untrustable diagnostics. The only way this is going to be accepted is if the manufacture says that reading the first byte of a word snapshots the second byte as well in an atomic way and returns that snapshot on the second read. But i highly doubt that happens, given how bad these SFPs are. Andrew