Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10644786pxu; Wed, 30 Dec 2020 07:51:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXXXMKqXf+dlJluCnf7tTUNrjUl48lE6CN0vNGk2f/XH7uEACNm0VtSbyK8u9z3vl2S2sv X-Received: by 2002:a05:6402:1748:: with SMTP id v8mr52000258edx.136.1609343461641; Wed, 30 Dec 2020 07:51:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609343461; cv=none; d=google.com; s=arc-20160816; b=pQzwPWxuBVODKqGhu1LIt4alVdwRhRP8/aBer2F5RTf71Uw5wsPyKkmzKcwwR5nR8/ JciT8JrR+g9BT+0Nxs+Rf0OVXq1xfw1cwRpgBMNyUREEy7cyBoO5Pzega/N/SISi+G3+ FnfJ50wZgxz9qax4KswrTZZPQzCJVg8pdfwSwAwfoAyB6iPsCbJSycqYOqnRIBWNheux V/CMt4T8ctpwHiX1oL5mOCf/w5E+K7rkc2yKEStzxJSId8KQ5W5jChAJmlfpNZX1YoBX G6KGLam7olpTkdPYUrAlPoNP/fThixHgyYv03svNJ6OcCz0ikOTwS474yxenQqfpB4X7 yFDQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hS18fcGf45IrvUE4rvJ7syKypItSzJhob8x4PYWxp/I=; b=aEF4a0uIk7nJ+TKXmSa6piXQt+20ScqGuJ7EtwbmJmCJppo0C98kteqejY1MWlw/fl xsodCD2cOO9b75GRt2CB3d3vHXRU8yHjADm6yZwwGK3Q6VX4wovEM7cfXfKi/GE4etNk Gr5oG+pXDpKCicpfsYwnf5s33gN1FbVnXNC+7ETDT8vLFZeApa5lDB4blLNbml85gzHF 3WTZPcr1Aj/M9x5Qq1axgxaDcS0N7cZZBLhKxO6ihE75xwD7KhC2bgvMTMAIcWL4xtCr GTUQtPVjVPOQxqleA9ZuMi76ROw/Qk3SRZSkY5FNdoTxJP93B4sXgCiK4KtJrybj/ngt 6E/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L2cDiROy; 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 t11si21423028ejr.335.2020.12.30.07.50.39; Wed, 30 Dec 2020 07:51:01 -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=L2cDiROy; 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 S1726773AbgL3PtC (ORCPT + 99 others); Wed, 30 Dec 2020 10:49:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:46698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbgL3PtC (ORCPT ); Wed, 30 Dec 2020 10:49:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8DD8822242; Wed, 30 Dec 2020 15:48:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609343301; bh=xnHEVZDk0ZJjtLvsuNl+eC760CQNHfhFxMLs1isYStA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L2cDiROy3YnSsBiAv3HhjBbtYwRtKUn4Ogyeo5T4BhVSHEkGOXNh6sR4WuMx3CMdx 1S2H49Lp5og5b6E50QOwp4RoaqUDs3g+F1t9iPvSIssQiu7PrjAdo33qTB/xemmlCY u3o8mdPh+1EPNgM0B84zP2InapfwKGUy/I38sRb4L6JsevVrYybFabDBSvK6yK5L+b ASoyFa4OTdtVWCq/LxVpAkutCh0nMeFiKYB/uj2M/q/39bxs3kV77zNeGggniMqj0a WbNM6WjIkyZ7/Kmtkk/8sIxhFSmA8Uywof+BnW4bSvDweQ6qxg7QAk9hCrA1oijLIr mkqfFA3F73lJA== Received: by pali.im (Postfix) id EC92D9F8; Wed, 30 Dec 2020 16:48:19 +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 2/4] net: sfp: allow to use also SFP modules which are detected as SFF Date: Wed, 30 Dec 2020 16:47:53 +0100 Message-Id: <20201230154755.14746-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201230154755.14746-1-pali@kernel.org> References: <20201230154755.14746-1-pali@kernel.org> 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 Some GPON SFP modules (e.g. Ubiquiti U-Fiber Instant) have set SFF phys_id in their EEPROM. Kernel SFP subsystem currently does not allow to use modules detected as SFF. This change extends check for SFP modules so also those with SFF phys_id are allowed. With this change also GPON SFP module Ubiquiti U-Fiber Instant is recognized. Signed-off-by: Pali Rohár --- drivers/net/phy/sfp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 490e78a72dd6..73f3ecf15260 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -273,7 +273,8 @@ static const struct sff_data sff_data = { static bool sfp_module_supported(const struct sfp_eeprom_id *id) { - return id->base.phys_id == SFF8024_ID_SFP && + return (id->base.phys_id == SFF8024_ID_SFP || + id->base.phys_id == SFF8024_ID_SFF_8472) && id->base.phys_ext_id == SFP_PHYS_EXT_ID_SFP; } -- 2.20.1