From patchwork Mon Jul 19 11:33:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruud Bos X-Patchwork-Id: 480322 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB17EC07E9B for ; Mon, 19 Jul 2021 11:33:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1F95610C7 for ; Mon, 19 Jul 2021 11:33:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236565AbhGSKww (ORCPT ); Mon, 19 Jul 2021 06:52:52 -0400 Received: from mail-eopbgr70139.outbound.protection.outlook.com ([40.107.7.139]:6885 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232156AbhGSKwu (ORCPT ); Mon, 19 Jul 2021 06:52:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VApSgfQ/eOhSql3PJPiLtG5VeKRalutq4pTo/+4zpippCzf24hLqI74uMXFd/o6iv9/OAKa9HsQBSnIuL7cWjp4nexNo2d1SdXM9WefsD5vzfT9OjcwNyKf5bSCdSgHEFCqCE52OuVZAsNVR4qKMCZFHWkXrUTna51+lCrwudaEcW9U/Dmfx1QxcSrCHiGBBPq+2B/OePv2gEr/2NUOQ3u2o+DwKPysAGm87hI+lKVhsq/nENDDoDKr0nPJCd238sp8QvqlqsusY4SwshxUcfo2YqU0NVdjY84BL7Aa1cgA5Nynd+1K7YSReYCEycdcVaVWZTIQvuuHdi1brtDxUIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nPlZDvKhE4RraMfAtX7WizVBoBE/gFSrrYogCOBS6W0=; b=V9fMckpRVJR88r4z2r7Tmg7h1GB8AyINFsX1jwpa/gCiq1V8OLVY57zJ82WCrEVp4XdSZaZFm3DBfM/xCxzgirr34L5/GaRNf3NRXPte1oHRYP95pRtMN+Pl6j9kVIfWTSjR3CQSTulx6ZFC2QT9yXOXGKVfCDrB4swHmG83YOMy5Mq7K37D/Odtka6RsWdkmsvSC7vYUpgPQHRG7EsfyokR4sluMxWPBLI59YuVeT9DSP0hoeRaONcgqEDOR+m0VlAK+sl7Bhkc8P26v4cJvsXiFMpk7hYTxKrZL24bkHQLzI8hMxTcn2jung98bkuNDx1yo5PJoIlyKTiMT4SMbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hbkworld.com; dmarc=pass action=none header.from=hbkworld.com; dkim=pass header.d=hbkworld.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hbkworld.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nPlZDvKhE4RraMfAtX7WizVBoBE/gFSrrYogCOBS6W0=; b=bYZc8RPuM+1/p8Cy0jwYSYbGz90Z6Q79YxdqjhTj5btgm8oLIjXVzf4qP60l5rJB7QA/F+OXDlCLOw2MQ81DzMqBexj8GdMRleBms0HO/kpnCDeJ4pSpohWgxTOwrmZVS0Vpy+EVWJ52RueJEV3I5SdywbEmgJh+eIgiKAON+2PD9Hh+YCBvApLfUjNk5kWAqRM9DDP+1vzVMxSPCRxWbYvR6hA+6pd8Uarjt/iBNUakBhQCdVIes1/jHfF9RBAN/mnkcfucjI9y+sSrhg7Sftjzgy6WmSyTMqXvsysc/U1p7ehjgtRBFzi2EUMdHuNNo0Gpzeqw4OtSy7JVlsxkGQ== Received: from AM0PR09MB4276.eurprd09.prod.outlook.com (2603:10a6:20b:166::10) by AM8PR09MB5228.eurprd09.prod.outlook.com (2603:10a6:20b:3db::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.26; Mon, 19 Jul 2021 11:33:29 +0000 Received: from AM0PR09MB4276.eurprd09.prod.outlook.com ([fe80::4d88:bf9c:b655:7a92]) by AM0PR09MB4276.eurprd09.prod.outlook.com ([fe80::4d88:bf9c:b655:7a92%7]) with mapi id 15.20.4331.032; Mon, 19 Jul 2021 11:33:29 +0000 From: Ruud Bos To: "netdev@vger.kernel.org" CC: "davem@davemloft.net" , "kuba@kernel.org" , "jesse.brandeburg@intel.com" , "anthony.l.nguyen@intel.com" Subject: [PATCH net-next 3/4 resend] igb: support PEROUT on 82580/i354/i350 Thread-Topic: [PATCH net-next 3/4 resend] igb: support PEROUT on 82580/i354/i350 Thread-Index: Add8kRi1xbauaCRJT4ayU1H8dQbl3w== Date: Mon, 19 Jul 2021 11:33:28 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_9208be00-d674-40fd-8399-cd3587f85bc0_Enabled=true; MSIP_Label_9208be00-d674-40fd-8399-cd3587f85bc0_SetDate=2021-07-19T11:33:27Z; MSIP_Label_9208be00-d674-40fd-8399-cd3587f85bc0_Method=Privileged; MSIP_Label_9208be00-d674-40fd-8399-cd3587f85bc0_Name=Unrestricted; MSIP_Label_9208be00-d674-40fd-8399-cd3587f85bc0_SiteId=6cce74a3-3975-45e0-9893-b072988b30b6; MSIP_Label_9208be00-d674-40fd-8399-cd3587f85bc0_ActionId=c4f117e0-4206-4bd0-8874-c276b9c9b7e3; MSIP_Label_9208be00-d674-40fd-8399-cd3587f85bc0_ContentBits=2 authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=hbkworld.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 16c20adc-4e9b-422d-b7bb-08d94aa907ce x-ms-traffictypediagnostic: AM8PR09MB5228: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:883; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RR87MWxstV6yLRLXJgUspIoHy3BBzjezmfpspxvbyKvHNwcpPMdX3d4MsBNUyX0/qVmnuU0EklBOW3CG0lA+vRRVI1hIO7BkeXgvV5Aon+6IM4SIE5QkZ6lZ+TTOcnkf12fo9lnb09l+TZhyZyfUkV7DqKPaLC1Ryxw/SHwhykkleYrACfWUDgtytxLcyUIenRxGrrEmt91dij/gL9G6eoKOisqu5rKxEldmZOVu/m4ZMCFwGr9J0wwazU4hFzxByf68Zo/ci4iSPiY/+grQ3cw+XyGDLYo83GXUyrJzfa7siEr57/z9OU4uanqRUHIhdE7inTV4HZjqmSCzPgYrFvJY/eFcdM5wsqwP8WdvVSzzILB97uGojqMJ2eQolSzIS3SnhSVh4toP4YzuPA157kOgV3yO4UhIEJZ8N2fYEscCxmNr89L5KIG8P2YUrjRlgeYWqEeXMNRk+iVeAdmpXIiKbkgyQ/bGKCswsH6NeZaF3za4/fDpYEHYhy7bCBO1PfOb5tNkxLBz+CT/1gGmMZ/th/BH37ofoGEAG4P1+rpKtS/NknNVXa+lMG30+HgoRRQpctmkFRAfMiDfNDthlO+l01mTNejtrRf23loUrbMxVi9J059LeD4R2rG2Ph17dIaip5dT2huyxyng6YaFDr8r3QEbUyaSeRR5zEwvTGLLMAOUhZfbcuCg2HBWFqxVuhd3pFV7C4YrWfmfRQAEHA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR09MB4276.eurprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(366004)(136003)(396003)(346002)(376002)(8936002)(8676002)(5660300002)(6916009)(55016002)(33656002)(52536014)(83380400001)(38100700002)(2906002)(44832011)(122000001)(26005)(9686003)(54906003)(86362001)(186003)(15974865002)(66446008)(64756008)(66556008)(66476007)(4326008)(316002)(71200400001)(66946007)(478600001)(76116006)(7696005)(6506007)(38070700004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?fCe4ARSVPrLabQgemBJkDoyva?= =?utf-8?q?YBwq9gUGefZcRovl7nTp+HikqKWuz6TbC50Ru0rzsJdIf5qlTqQbtthD?= =?utf-8?q?UXXTQsJsCktJ3R7aJwTGt1FV5yIHPmQaHa7E/yl/yB98t/WQwJhFT238?= =?utf-8?q?kVZsfsAPJqwz0wkkhKHpDutuFsZehHgG/WHY7MJkud91oeau91GzgVUI?= =?utf-8?q?0ciAHKXCZSnk9ikjTzbooZVw89qTNoigR1tmm7BxJO7hfuByzNvwvijA?= =?utf-8?q?kYIQFhXoWmXrhq/LxsUWT8+H8r5DmhMIpiL2cjhNRtDSbym/Besr1dL8?= =?utf-8?q?fydN5ygHuTGLN4eShoGRbuKmk0zmmvlfGEHkWxOKgz06TXRu3K8L5kxJ?= =?utf-8?q?ArYCSca1S2of49u/tRYTl+YoLwHAsFp4XlS6wIBKSys9nt2DTYrmSSnW?= =?utf-8?q?ps+EWyjHHtEU1B5SJOd4X4O7Hj3ZF52DyphMem+26PhfWMacYE9nUi8t?= =?utf-8?q?BRx0xqPbfiSOnKrjs8CJto32liG1vJtY2PrZACx/NdxdwXiez4I7xdSa?= =?utf-8?q?B6+jz+0PS1TYMPj91HamjqTiD/ra8cei/j/XW6Ch/sSQYU+kKheQifBp?= =?utf-8?q?HvP0v37a9ErAH0QCrE0z9KTJNUNXlxsmQSnjeD3HPJicyhHXsBPpXz+M?= =?utf-8?q?fy5nY4T/WsBG9RX4g7Z7nGri9D3GjwRT+/3YLxPWIlLwHHiSWNCp3uoi?= =?utf-8?q?EgVyycKEo0DeEY2pXGYSh4CeUfMp5NOjc20VlKITwbshovrzHhGMcaru?= =?utf-8?q?y18qEdGYidDeBNIh+qwJgRcn3UxMUrBPqfVk1zIpMDE5UaTmLOJMiJWv?= =?utf-8?q?ToI2Ul8izxkhBrrUCL1CSrFmJgTzNRTspDoauSrIBoJck5495ZcHGHbV?= =?utf-8?q?kmaNPHvjrnuL2PmTefkW5Fb/lUr8Jr/gROz4SzcDHtI8z4RcDHDC7tFY?= =?utf-8?q?vEei34n58oOz0qJA9BuTwoM9t3vC/dbVdsghpBV6i+ome67WTD29C4Mt?= =?utf-8?q?+x6LExR87Cjen3Aemkskr/kOw3i2fmjwdrQr3ya2w9vsl/Yo3sz86QCv?= =?utf-8?q?YEHlrUxrUQhYtYFAYEwNC26EOEfoVZ4UHQjA7G70EzFAlxTP3SuTwbUW?= =?utf-8?q?3eNmnn8xiYmZXlvxh+jXihkb9eAVZSNw/qEX69TPO1fyRK4SqpLuTxJ3?= =?utf-8?q?fFjvmFCML5g2TGlBGgBswp+3UNfk+PN4Y7/fFbQA02OYJYUssdXl53Qt?= =?utf-8?q?8z7ogKkYxW2/HkkRkjRWnXTLB+T9xRx8RdgL4zDLr95jX3jxOaKUTZuW?= =?utf-8?q?o1oiudRg1nNcDwPArsq4oB3KK8tnbyKHT2PdxbfyA/6RV7iqjbj+NeFD?= =?utf-8?q?cIOaWGWH1Q=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: hbkworld.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR09MB4276.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16c20adc-4e9b-422d-b7bb-08d94aa907ce X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2021 11:33:28.9098 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 6cce74a3-3975-45e0-9893-b072988b30b6 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SWay+BNSEavygFw25WLsU3YBc3ZB1qsjpz6/BON8hKdoGTq9Mgn+QVVT1GIfz1Mv X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR09MB5228 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Support for the PEROUT PTP pin function on 82580/i354/i350 based adapters. Because the time registers of these adapters do not have the nice split in second rollovers as the i210 has, the implementation is slightly more complex compared to the i210 implementation. Signed-off-by: Ruud Bos --- drivers/net/ethernet/intel/igb/igb_main.c | 54 +++++++++- drivers/net/ethernet/intel/igb/igb_ptp.c | 122 +++++++++++++++++++++- 2 files changed, 172 insertions(+), 4 deletions(-) -- 2.30.2 UNRESTRICTED HBK Benelux B.V., Schutweg 15a, NL-5145 NP Waalwijk, The Netherlands www.hbkworld.com Registered as B.V. (Dutch limited liability company) in the Dutch commercial register 08183075 0000 Company domiciled in Waalwijk Managing Directors : Alexandra Hellemans, Jens Wiegand, Jorn Bagijn The information in this email is confidential. It is intended solely for the addressee. If you are not the intended recipient, please let me know and delete this email. diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 928ac9ba1c66..8d87166e5ecb 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -6731,8 +6731,57 @@ static void igb_perout(struct igb_adapter *adapter, int sdp) return; spin_lock(&adapter->tmreg_lock); - ts = timespec64_add(adapter->perout[sdp].start, - adapter->perout[sdp].period); + + if ((hw->mac.type == e1000_82580) || + (hw->mac.type == e1000_i354) || + (hw->mac.type == e1000_i350)) { + u32 systiml, systimh, level_mask, level, rem; + u64 systim, now; + s64 ns = timespec64_to_ns(&adapter->perout[sdp].period); + + /* read systim registers in sequence */ + rd32(E1000_SYSTIMR); + systiml = rd32(E1000_SYSTIML); + systimh = rd32(E1000_SYSTIMH); + systim = (((u64)(systimh & 0xFF)) << 32) | ((u64)systiml); + now = timecounter_cyc2time(&adapter->tc, systim); + + level_mask = (sdp == 1) ? 0x80000 : 0x40000; + level = (rd32(E1000_CTRL) & level_mask) ? 1 : 0; + + div_u64_rem(now, ns, &rem); + systim = systim + (ns - rem); + + /* synchronize pin level with rising/falling edges */ + div_u64_rem(now, ns << 1, &rem); + if (rem < ns) { + /* first half of period */ + if (level == 0) { + /* output is already low, skip this period */ + systim += ns; + pr_notice("igb: periodic output on %s missed falling edge\n", + adapter->sdp_config[sdp].name); + } + } else { + /* second half of period */ + if (level == 1) { + /* output is already high, skip this period */ + systim += ns; + pr_notice("igb: periodic output on %s missed rising edge\n", + adapter->sdp_config[sdp].name); + } + } + + /* for this chip family tv_sec is the upper part of the binary value, + * so not seconds + */ + ts.tv_nsec = (u32)systim; + ts.tv_sec = ((u32)(systim >> 32)) & 0xFF; + } else { + ts = timespec64_add(adapter->perout[sdp].start, + adapter->perout[sdp].period); + } + /* u32 conversion of tv_sec is safe until y2106 */ wr32((sdp == 1) ? E1000_TRGTTIML1 : E1000_TRGTTIML0, ts.tv_nsec); wr32((sdp == 1) ? E1000_TRGTTIMH1 : E1000_TRGTTIMH0, (u32)ts.tv_sec); @@ -6740,6 +6789,7 @@ static void igb_perout(struct igb_adapter *adapter, int sdp) tsauxc |= TSAUXC_EN_TT0; wr32(E1000_TSAUXC, tsauxc); adapter->perout[sdp].start = ts; + spin_unlock(&adapter->tmreg_lock); } diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c index c78d0c2a5341..64a949bb5d8a 100644 --- a/drivers/net/ethernet/intel/igb/igb_ptp.c +++ b/drivers/net/ethernet/intel/igb/igb_ptp.c @@ -508,6 +508,119 @@ static void igb_pin_perout(struct igb_adapter *igb, int chan, int pin, int freq) wr32(E1000_CTRL_EXT, ctrl_ext); } +static int igb_ptp_feature_enable_82580(struct ptp_clock_info *ptp, + struct ptp_clock_request *rq, int on) +{ + struct igb_adapter *igb = + container_of(ptp, struct igb_adapter, ptp_caps); + struct e1000_hw *hw = &igb->hw; + u32 tsauxc, tsim, tsauxc_mask, tsim_mask, trgttiml, trgttimh, systiml, + systimh, level_mask, level, rem; + unsigned long flags; + struct timespec64 ts, start; + int pin = -1; + s64 ns; + u64 systim, now; + + switch (rq->type) { + case PTP_CLK_REQ_EXTTS: + return -EOPNOTSUPP; + + case PTP_CLK_REQ_PEROUT: + /* Reject requests with unsupported flags */ + if (rq->perout.flags) + return -EOPNOTSUPP; + + if (on) { + pin = ptp_find_pin(igb->ptp_clock, PTP_PF_PEROUT, + rq->perout.index); + if (pin < 0) + return -EBUSY; + } + ts.tv_sec = rq->perout.period.sec; + ts.tv_nsec = rq->perout.period.nsec; + ns = timespec64_to_ns(&ts); + ns = ns >> 1; + if (on && (ns < 8LL)) + return -EINVAL; + ts = ns_to_timespec64(ns); + if (rq->perout.index == 1) { + tsauxc_mask = TSAUXC_EN_TT1; + tsim_mask = TSINTR_TT1; + trgttiml = E1000_TRGTTIML1; + trgttimh = E1000_TRGTTIMH1; + } else { + tsauxc_mask = TSAUXC_EN_TT0; + tsim_mask = TSINTR_TT0; + trgttiml = E1000_TRGTTIML0; + trgttimh = E1000_TRGTTIMH0; + } + spin_lock_irqsave(&igb->tmreg_lock, flags); + tsauxc = rd32(E1000_TSAUXC); + tsim = rd32(E1000_TSIM); + if (rq->perout.index == 1) { + tsauxc &= ~(TSAUXC_EN_TT1 | TSAUXC_EN_CLK1 | TSAUXC_ST1); + tsim &= ~TSINTR_TT1; + } else { + tsauxc &= ~(TSAUXC_EN_TT0 | TSAUXC_EN_CLK0 | TSAUXC_ST0); + tsim &= ~TSINTR_TT0; + } + if (on) { + int i = rq->perout.index; + + /* read systim registers in sequence */ + rd32(E1000_SYSTIMR); + systiml = rd32(E1000_SYSTIML); + systimh = rd32(E1000_SYSTIMH); + systim = (((u64)(systimh & 0xFF)) << 32) | ((u64)systiml); + now = timecounter_cyc2time(&igb->tc, systim); + + level_mask = (pin == 1) ? 0x80000 : 0x40000; + level = (rd32(E1000_CTRL) & level_mask) ? 1 : 0; + + div_u64_rem(now, ns, &rem); + systim = systim + (ns - rem); + + /* synchronize pin level with rising/falling edges */ + div_u64_rem(now, ns << 1, &rem); + if (rem < ns) { + /* first half of period */ + if (level == 0) { + /* output is already low, skip this period */ + systim += ns; + } + } else { + /* second half of period */ + if (level == 1) { + /* output is already high, skip this period */ + systim += ns; + } + } + + start = ns_to_timespec64(systim + (ns - rem)); + igb_pin_perout(igb, i, pin, 0); + igb->perout[i].start.tv_sec = start.tv_sec; + igb->perout[i].start.tv_nsec = start.tv_nsec; + igb->perout[i].period.tv_sec = ts.tv_sec; + igb->perout[i].period.tv_nsec = ts.tv_nsec; + + wr32(trgttiml, (u32)systim); + wr32(trgttimh, ((u32)(systim >> 32)) & 0xFF); + tsauxc |= tsauxc_mask; + tsim |= tsim_mask; + } + wr32(E1000_TSAUXC, tsauxc); + wr32(E1000_TSIM, tsim); + spin_unlock_irqrestore(&igb->tmreg_lock, flags); + return 0; + + case PTP_CLK_REQ_PPS: + return -EOPNOTSUPP; + } + + return -EOPNOTSUPP; +} + static int igb_ptp_feature_enable_i210(struct ptp_clock_info *ptp, struct ptp_clock_request *rq, int on) { @@ -1215,16 +1328,21 @@ void igb_ptp_init(struct igb_adapter *adapter) case e1000_82580: case e1000_i354: case e1000_i350: + igb_ptp_sdp_init(adapter); snprintf(adapter->ptp_caps.name, 16, "%pm", netdev->dev_addr); adapter->ptp_caps.owner = THIS_MODULE; adapter->ptp_caps.max_adj = 62499999; - adapter->ptp_caps.n_ext_ts = 0; + adapter->ptp_caps.n_ext_ts = IGB_N_EXTTS; + adapter->ptp_caps.n_per_out = IGB_N_PEROUT; + adapter->ptp_caps.n_pins = IGB_N_SDP; adapter->ptp_caps.pps = 0; + adapter->ptp_caps.pin_config = adapter->sdp_config; adapter->ptp_caps.adjfine = igb_ptp_adjfine_82580; adapter->ptp_caps.adjtime = igb_ptp_adjtime_82576; adapter->ptp_caps.gettimex64 = igb_ptp_gettimex_82580; adapter->ptp_caps.settime64 = igb_ptp_settime_82576; - adapter->ptp_caps.enable = igb_ptp_feature_enable; + adapter->ptp_caps.enable = igb_ptp_feature_enable_82580; + adapter->ptp_caps.verify = igb_ptp_verify_pin; adapter->cc.read = igb_ptp_read_82580; adapter->cc.mask = CYCLECOUNTER_MASK(IGB_NBITS_82580); adapter->cc.mult = 1;