Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1268972pxu; Wed, 6 Jan 2021 18:06:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyF0nLzRA8w5VxbBt9Q6Hp3BbbR89ErZKlm0iuu1X245PMAdgBHK0sxWXjwl2oz7gZEJbhZ X-Received: by 2002:a50:9f4e:: with SMTP id b72mr5934281edf.200.1609985162314; Wed, 06 Jan 2021 18:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609985162; cv=none; d=google.com; s=arc-20160816; b=T2tPUEbfnXjNBV+HuDgkdGl7q1v+irY0/zehR3iXb0HDMyLC5LajCH8d6rqAtG3/MC VQPJvNQc1UvyrfrgIzGdxsd7kx/iS5ktJ3V/PMaDuHz5QxrEEndoZMWP5zlVV5vbXTyx EDJrvcwl5fUVMtDJOS/K1O4Opr0L0Xb8DOnfpTaATTBrMJfIFd4YdcZCdy7rRsIMPL/2 jd7e4gceHtgb4xcmw08CJlyjc4HvYe9Uz96GP6Hs18whw4d4stmJTE9Isi+lW3QAqdmL 1VRGBQ+uB3GXhEp3dNBCHo2NqpBtsBrQiCoW3cZT0SekoylG6EChSBeSPmVmraPVEdYF 6hCg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=+dyfXogmKNkQFvaec03It5yo2gQDVA2noirLTcDaOoI=; b=FBKwRGDXgI6jQTigHTvB7x3aD/QNTRtz63hZhv0uB4UBrF9gf1w2YUxW03Ap0cI6AH EFRjvdQiymSBHa6zyr4j6jadJByl+6IBXd+codqOmK8Cv3bScZ8BWfnukWRMg0OW/dMM si2v8iiSag+/JC8sV2mJm1UlTYIbK9FwYsuO/2TOPjHgbDUVhxkrUyRyXyVD20VUyihd V9MT/JCqBNWi+ghDC2tIou/A8DTwtQ58BmSKwyNmju1uuCV0rF2NQxcAl+iPjl67iK8U lGsFIOXU8dp2F5YKW1o9HiwhgEnrTbBr0uThu9qMpFwn24u3n7sJuSrKoPBhDunPfcoy dk+g== 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 w1si1516011ejn.628.2021.01.06.18.05.33; Wed, 06 Jan 2021 18:06:02 -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 S1726641AbhAGCDZ (ORCPT + 99 others); Wed, 6 Jan 2021 21:03:25 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:54204 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbhAGCDY (ORCPT ); Wed, 6 Jan 2021 21:03:24 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kxKdI-00GZPb-Jg; Thu, 07 Jan 2021 03:02:36 +0100 Date: Thu, 7 Jan 2021 03:02:36 +0100 From: Andrew Lunn To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Russell King - ARM Linux admin , "David S. Miller" , Jakub Kicinski , Thomas Schreiber , Heiner Kallweit , Marek =?iso-8859-1?Q?Beh=FAn?= , 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: References: <20201230154755.14746-1-pali@kernel.org> <20210106153749.6748-1-pali@kernel.org> <20210106153749.6748-2-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210106153749.6748-2-pali@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + /* hwmon interface needs to access 16bit registers in atomic way to > + * guarantee coherency of the diagnostic monitoring data. If it is not > + * possible to guarantee coherency because EEPROM is broken in such way > + * that does not support atomic 16bit read operation then we have to > + * skip registration of hwmon device. > + */ > + if (sfp->i2c_block_size < 2) { > + dev_info(sfp->dev, "skipping hwmon device registration " > + "due to broken EEPROM\n"); > + dev_info(sfp->dev, "diagnostic EEPROM area cannot be read " > + "atomically to guarantee data coherency\n"); > + return; > + } This solves hwmon. But we still return the broken data to ethtool -m. I wonder if we should prevent that? Andrew