From patchwork Wed Apr 24 11:31:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ido Goshen X-Patchwork-Id: 53042 X-Patchwork-Delegate: xiaolong.ye@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0AC271B4BD; Wed, 24 Apr 2019 13:31:16 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150119.outbound.protection.outlook.com [40.107.15.119]) by dpdk.org (Postfix) with ESMTP id 8B9564F93 for ; Wed, 24 Apr 2019 13:31:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cgstowernetworks.onmicrosoft.com; s=selector1-cgstowernetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yGftUGPH++erx/af5nTXAiEZRrmps2GkMwaFFi0ZQhA=; b=EoRKDltAFxEsgPP8oZ7xCru6enUmjeAlWjKUxh02X5UL5BsZDPXsgnvDUO7N6yLoDVAn2hbRsol+dB3INckB4sscHrfCO++sW1bg1QQqZeOTJziOcsCnD5bkjEudrV4yL0ELWot6pFWR3a5Ou+8m9Go6MXWHWpwVfJm1HxLGmHs= Received: from AM0PR09MB3298.eurprd09.prod.outlook.com (20.179.252.223) by AM0PR09MB2324.eurprd09.prod.outlook.com (20.177.108.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12; Wed, 24 Apr 2019 11:31:13 +0000 Received: from AM0PR09MB3298.eurprd09.prod.outlook.com ([fe80::d8c3:38db:b59c:3d06]) by AM0PR09MB3298.eurprd09.prod.outlook.com ([fe80::d8c3:38db:b59c:3d06%2]) with mapi id 15.20.1835.010; Wed, 24 Apr 2019 11:31:13 +0000 From: Ido Goshen To: Wenzhuo Lu , Konstantin Ananyev CC: "dev@dpdk.org" , Ido Goshen Thread-Topic: [PATCH] net/ixgbe: 10GBASE-T SFP+ copper support Thread-Index: AQHU+pE4z0Lg95FHIE6XK1eEO4icMw== Date: Wed, 24 Apr 2019 11:31:13 +0000 Message-ID: <1556105458-91997-1-git-send-email-ido@cgstowernetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: DB6PR07CA0076.eurprd07.prod.outlook.com (2603:10a6:6:2b::14) To AM0PR09MB3298.eurprd09.prod.outlook.com (2603:10a6:208:16c::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ido@cgstowernetworks.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.9.1 x-originating-ip: [81.218.57.230] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: feee8707-dbc7-4d27-d144-08d6c8a85b3d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:AM0PR09MB2324; x-ms-traffictypediagnostic: AM0PR09MB2324: x-microsoft-antispam-prvs: x-forefront-prvs: 00179089FD x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(346002)(136003)(396003)(39830400003)(376002)(199004)(189003)(66946007)(14444005)(73956011)(3846002)(6486002)(68736007)(6116002)(52116002)(99286004)(36756003)(86362001)(25786009)(305945005)(316002)(71190400001)(8676002)(6506007)(6512007)(107886003)(508600001)(71200400001)(4326008)(386003)(81166006)(72206003)(186003)(110136005)(8936002)(486006)(476003)(2616005)(256004)(81156014)(66556008)(64756008)(2906002)(66066001)(7736002)(6436002)(5660300002)(53936002)(102836004)(26005)(50226002)(54906003)(66446008)(14454004)(66476007)(80792005)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR09MB2324; H:AM0PR09MB3298.eurprd09.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: cgstowernetworks.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: mLYQVk5dfTmF4Z69ojkuzTIIdAnybw6k/vnvHpRhI66kLtMDv8u0QwY+lKZes0kf4RponWWlIYVYsEGoli5MKlq3XAEZwnDVu1E/vQLuwf3w25FlND98riAln8JZAT7Dctz9wT4qHAbcjAlGFRSXoD6WEFskTEoGo6mYpGI7lvatoUcLUBIZ0cOdhlszesbVcU9xTGd11XfxGl/lWkotO/vP1/dv33DNtcLEXr+2dQi1ykqSvvm9yBlMekbEs0hNgogjzKPZNt3UnIdJj0PvwGuNiYiV7+83p0QvkZs47JLQcWrNA3PmHS4eYnt0ZagtIdHTm8vzs3XJ7XaTgr8H6pPdTRox7o3aBltI2r1n+jz4Jr7Tg9HaYhUhjcsW9axZu4xRJvoZVsnTBxw13ZmSdxthzDl0Oeh35D/gw028FkI= Content-ID: MIME-Version: 1.0 X-OriginatorOrg: cgstowernetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: feee8707-dbc7-4d27-d144-08d6c8a85b3d X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Apr 2019 11:31:13.2414 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fc9e9498-07e8-4b82-b4cf-365bba23cbbf X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR09MB2324 Subject: [dpdk-dev] [PATCH] net/ixgbe: 10GBASE-T SFP+ copper support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ido Goshen 10BASE-T SFP+ copper transceivers become cheaper and popular So far those were blocked by ixgbe as “unsupported”. e.g. eth_ixgbe_dev_init(): Unsupported SFP+ Module eth_ixgbe_dev_init(): Hardware Initialization Failure: -19 EAL: Requested device 0000:0a:00.0 cannot be used This patch expands the usage of allow_unsupported_sfp to be more general and makes ixgbe more tolerant to unknown SFPs Signed-off-by: Ido Goshen --- drivers/net/ixgbe/base/ixgbe_phy.c | 22 +++++++++++----------- drivers/net/ixgbe/base/ixgbe_x550.c | 3 +++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c index dd118f9..ff96afc 100644 --- a/drivers/net/ixgbe/base/ixgbe_phy.c +++ b/drivers/net/ixgbe/base/ixgbe_phy.c @@ -1527,18 +1527,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (hw->phy.type == ixgbe_phy_sfp_intel) { status = IXGBE_SUCCESS; } else { - if (hw->allow_unsupported_sfp == true) { - EWARN(hw, - "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " - "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " - "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); - status = IXGBE_SUCCESS; - } else { - DEBUGOUT("SFP+ module not supported\n"); - hw->phy.type = + hw->phy.type = ixgbe_phy_sfp_unsupported; - status = IXGBE_ERR_SFP_NOT_SUPPORTED; - } + status = IXGBE_ERR_SFP_NOT_SUPPORTED; } } else { status = IXGBE_SUCCESS; @@ -1546,6 +1537,15 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) } out: + if (status == IXGBE_ERR_SFP_NOT_SUPPORTED && + hw->allow_unsupported_sfp) { + PMD_INIT_LOG(WARNING, + "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. " + "Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. " + "Intel Corporation is not responsible for any harm caused by using untested modules.\n"); + hw->phy.type = ixgbe_phy_unknown; + status = IXGBE_SUCCESS; + } return status; err_read_i2c_eeprom: diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index a920a14..212d9a0 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -1539,6 +1539,9 @@ STATIC s32 ixgbe_supported_sfp_modules_X550em(struct ixgbe_hw *hw, bool *linear) *linear = false; break; case ixgbe_sfp_type_unknown: + if (hw->allow_unsupported_sfp) + return IXGBE_SUCCESS; + /* fall through */ case ixgbe_sfp_type_1g_cu_core0: case ixgbe_sfp_type_1g_cu_core1: default: