Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10644728pxu; Wed, 30 Dec 2020 07:50:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkduuyJBb6ybd8YiDHXdw0tavA4HgM+3QFUDE3gDrIhtJn9ZU01z3fh15J/wLvZkOcIdrZ X-Received: by 2002:a17:906:7b8d:: with SMTP id s13mr49591742ejo.479.1609343456952; Wed, 30 Dec 2020 07:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609343456; cv=none; d=google.com; s=arc-20160816; b=FSpHOuFxAzjpjxBkPUYkBTv9bdWXFRPqOPFj0keLijx1/OnygyCBqHVNq+z4pegkp8 N9MGF6ce1kJ/RvbQFA8tS0vBGUpX+2bmM5QK8nrQpfN1NQBlQl7TAJ+1Vldk0wNdrdz4 sAi8VO83I7bh/ElRNA1oR5E5hHIRwZ+Sk7TdxsFmjPKw5VXDlWsLbT/IkGomenYh8y1v dYfABTjm/0D+7/M5PsOmvayb5RAGL0+XoQnMJ1UYvyyYnUAuWqK2RCo5qqRexzW5mlnO 7iXFUmU4ECA0nDQTbhDTntLHIwQ+ZvH12nk6gX1yRkkSLVx4WCv4ET6FF22hu9XUd8WW rzkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pe7sRXtnt3A4JM+rqYj+d75FbRKFxsnAp7fueyesDUw=; b=ewpt71fCSpcFANAKHZjMPytSkcORx5Mp54CwB1oqmqkSgM+F01hmQFjH+0LU8C7MO1 xyMUVF6n6CCESTaNzrGuUnevnU4IqtbOB9vBQoAk2SFs24Us+O4tHh9JtNSppt5ip2pr IlU1TKDTKN7t3+76eweBODm4uY3Z8DoG+4jegftHcAJJ+7RB7tLVsciue5/PZoZgdqL4 XQujn+wmwOFZYnQffNo06EpAcLpeXgkjUcuXQqiNZNCoIJrgt7cyhyxf29i7FXAsQKMy PwB6nXqLXcq3DkDQnx2qQblCQtSxTT56i8Nm3J4oK6525hDP/cJhDFEj5VyMCtbgt5Wx L/Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oW8bFMQ9; 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 m19si24194350edb.315.2020.12.30.07.50.34; Wed, 30 Dec 2020 07:50:56 -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=oW8bFMQ9; 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 S1726477AbgL3Ps6 (ORCPT + 99 others); Wed, 30 Dec 2020 10:48:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:46620 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbgL3Ps5 (ORCPT ); Wed, 30 Dec 2020 10:48:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 17F5F20575; Wed, 30 Dec 2020 15:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609343297; bh=YHufGG3AokDDJwfj0LlgBm3yCGwwV8pRMkMk3RZ2ZaE=; h=From:To:Cc:Subject:Date:From; b=oW8bFMQ97MBYUdhc0v4/ZygYifaGdHEJuWC97puhXx+qcn7QVPwroGwPyDK6f5Nb5 wFnrAuNDDly7Fcgu8HdeiNzGb1yoD/rXS65eyJUlXkQ5pxMn0grhmbSwfLxRCNRHa7 ql8qDJfPLpB8OoHHc7D5hlKgxyT2DzCp7aDdFrgUaqddPAvBFs5JKuy00Nb159oOUK Ydx+/abEZQ5KNFsk4qdU2dOwdrdZxLHdtECLSAy8L0WdP8UnBSlFywBOBzIfmRzSdd n9pbFqTPf1ntT0E+GACRCvQ9Btd7UeC6cr0vL/geT8//7kbFXICiKJgM9EWzWhCtqr 9yjUhSNI5QHsQ== Received: by pali.im (Postfix) id 9EA319F8; Wed, 30 Dec 2020 16:48:14 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Russell King , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Jakub Kicinski , =?UTF-8?q?Marek=20Beh=C3=BAn?= Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] net: sfp: add support for GPON RTL8672/RTL9601C and Ubiquiti U-Fiber Date: Wed, 30 Dec 2020 16:47:51 +0100 Message-Id: <20201230154755.14746-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series add generic workaround for reading EEPROM content from broken GPON SFP modules based on Realtek RTL8672/RTL9601C chips and add another workarounds for GPON SFP module Ubiquiti U-Fiber Instant. GPON SFP modules based on Realtek RTL8672/RTL9601C chips do not have a real EEPROM but rather EEPROM emulator which is broken and needs special hack for reading its content. SFP module detection is done based on EEPROM content. But we obviously cannot read EEPROM correctly if we do not know what type of connected SFP module... And to have this chicken and egg problem more complicated, GPON vendors generally put garbage into their EEPROM content so even with knowing EEPROM content we do not know what kind of broken SFP is connected... Workaround for Realtek RTL8672/RTL9601C based modules is therefore done based on broken EEPROM reading characteristic. This patch series also available in my git branch sfp-rtl8672: https://git.kernel.org/pub/scm/linux/kernel/git/pali/linux.git/log/?h=sfp-rtl8672 Pali Rohár (4): net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips net: sfp: allow to use also SFP modules which are detected as SFF net: sfp: assume that LOS is not implemented if both LOS normal and inverted is set net: sfp: add mode quirk for GPON module Ubiquiti U-Fiber Instant drivers/net/phy/sfp-bus.c | 15 +++++ drivers/net/phy/sfp.c | 117 ++++++++++++++++++++++---------------- 2 files changed, 83 insertions(+), 49 deletions(-) -- 2.20.1