Message ID | 20230327110607.21964-2-harini.katakam@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1434764vqo; Mon, 27 Mar 2023 04:29:07 -0700 (PDT) X-Google-Smtp-Source: AK7set8++m/IekjMcsXcPSA1UjLROkVgUxy72QQCDF/qPoQY+l7xr9XuwBiBhPxq/2T9CmM8c1fZ X-Received: by 2002:a05:6a20:6723:b0:da:501:55e with SMTP id q35-20020a056a20672300b000da0501055emr9884740pzh.40.1679916547619; Mon, 27 Mar 2023 04:29:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679916547; cv=pass; d=google.com; s=arc-20160816; b=w8S7DYCkuN0AH9ZlC79Pac2oCLIO6BGqJ7vcCV4AL1C9tQKajMPGfZxpNgb5u8Kn3/ xVejcPOwmdeO14VyoPUlrjq8tCEP07/c2xehEQMtyohLjOum1TbZOvFQZcKLRhpH1QpM gBh2WqWfDS1opno1O6gDhwhM3p+TROueVRZ/KEP6YwAj+4anjMBEH9a+lkWl1LTDX2J+ GRUONLmiYFBTHGHYjc/KJzJXa7wAmPRLlKiUQTLRC4LWFE+8hX0ND/aaAnOD+NVwRgnC YxaTelW1gb/LPnZG4WI2GpS5+3r1l3q7qVK1eeFYwojWXahjBJ55bVmSUJmJMSsmRTQw E0Vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Spn8Pi1i4yafXE9SaGQap1MRbPwCW9izTJUcHEd7LXY=; b=V8UrZdvHWOU35oqwY7sSv45BhjsbSOgt+bnGVledJXbWKcWeqsX9PlztT4nihpVobz AZrWCHUEYFkOu5Bsc3A3rUQ/UbUe71Lj3pRidwNUl6CUEpzpgyoaoHIA1nAO0G4Wmg/S pkf8mVEe2/mOYdWp+TtTBCumIqfSxCHfAuX4mEVsI3RdWOnjeDzhYWV9Dkx2iIoNInBx rJ2WgO56MuEU0zxLVVWfkQv7JRqHVpFT03np2bFEwApkl0X3+IBXhvaiU0/tZpFuefZU 75ewJhAF86pXEUnMkHEV4BD3HMwOqFYMEbU8pkTKSXKrdmVF0E9wRKWIzxr3UIAtYD6N EtlA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Xm9St+q1; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r13-20020a63ec4d000000b0050be42c6f04si27285907pgj.539.2023.03.27.04.28.54; Mon, 27 Mar 2023 04:29:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Xm9St+q1; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232392AbjC0LGa (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Mon, 27 Mar 2023 07:06:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjC0LGX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Mar 2023 07:06:23 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2084.outbound.protection.outlook.com [40.107.223.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DBFF468E; Mon, 27 Mar 2023 04:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ca7Uqam4WVgjArgeV3TaTjiSa42xxi/8A4YUatFjqZvy65Cj6ZlYQCjX1vrVaqFgBnbBcK/UfCgsEvzd8Z9QBATAgwT5fLppUoQr/fAQdL7YTeac0ee3zbceql6VRaJp5YUpp7lLBWi33/c0wEo4EKRc+y9cHw1OIUrjB/sfQFCJtqaqWnC6Ak1L9xNIYvcwQNRRfUH7RZ7ZtfjJejD0vXg276x/zxftd18kCiakuYkFG/UmsGVXTOpkTfn3d/9DZpctKvkzOdKa8jPmwuyeXy9GaYyORlF5gnrbmW4QjXO8g5jQaC1eg5CJl2iNfCxYF4R6nO75FzBlOu1zF5ClvQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Spn8Pi1i4yafXE9SaGQap1MRbPwCW9izTJUcHEd7LXY=; b=mXevP6NeQxZ1CTQ+oL7Y8XnI+xHs1n3nQrtv3VOdv71Y59NaiQgMVMV+ceJuPb931rp1VG5URJY9eK2dPXYDAxer88H9vpaCiNuGhiT826ml13Ym4Y6GrQkAq5p+k5hKdkFmnIq2X3wcIoGixyKUyeG14mXje5reVLIV7zGX9Jx1LhzYqTx6DjMjmnNVi9z0YHbr8Hgt08g68b8jpdUBPFatqWL4v7Xa+8tgANZKlu47dbUHdtbheFggDFfAtwFkleV5VX3TCBd7dCLbykq2qq/Kh7W5Wyrn9gFe/c4niL3L8M+cjsNVUhj/QcLmVcLbg1BsN3QxykblUtUr3BfFfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=microchip.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Spn8Pi1i4yafXE9SaGQap1MRbPwCW9izTJUcHEd7LXY=; b=Xm9St+q1z971fTfqCifzDL/1/9ys3YHdtOPltW12siQFvGKwi7tcGT4msPdLWjUXeJKO5FHr1rqsL/7Yc191V7A5VdLkoJtKJQoU+EugTCYPwsaDPSta9MXsmRjagyvnUbodUDr9aV9TJ1MrU/QVUzdol26cJmKPMRRFuALf6uE= Received: from BN8PR03CA0033.namprd03.prod.outlook.com (2603:10b6:408:94::46) by DS0PR12MB8480.namprd12.prod.outlook.com (2603:10b6:8:159::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.30; Mon, 27 Mar 2023 11:06:20 +0000 Received: from BN8NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:408:94:cafe::81) by BN8PR03CA0033.outlook.office365.com (2603:10b6:408:94::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41 via Frontend Transport; Mon, 27 Mar 2023 11:06:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT044.mail.protection.outlook.com (10.13.177.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6222.22 via Frontend Transport; Mon, 27 Mar 2023 11:06:19 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 27 Mar 2023 06:06:15 -0500 Received: from xhdharinik40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Mon, 27 Mar 2023 06:06:12 -0500 From: Harini Katakam <harini.katakam@amd.com> To: <nicolas.ferre@microchip.com>, <davem@davemloft.net>, <richardcochran@gmail.com>, <claudiu.beznea@microchip.com>, <andrei.pistirica@microchip.com>, <kuba@kernel.org>, <edumazet@google.com>, <pabeni@redhat.com> CC: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <michal.simek@amd.com>, <harinikatakamlinux@gmail.com>, <harini.katakam@amd.com> Subject: [PATCH net-next v3 1/3] net: macb: Update gem PTP support check Date: Mon, 27 Mar 2023 16:36:05 +0530 Message-ID: <20230327110607.21964-2-harini.katakam@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230327110607.21964-1-harini.katakam@amd.com> References: <20230327110607.21964-1-harini.katakam@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT044:EE_|DS0PR12MB8480:EE_ X-MS-Office365-Filtering-Correlation-Id: b5f1dc5d-7f66-4137-9b1c-08db2eb34b24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6TAQIxwf3xz668imLXIKW6jUbi+dD+Uf1LGqDm3Bs35MdysjG27g55GI/CkwST0WwCats2Gt1CJVbOw8ZOMWxJuIZWa8Dnr5qMOjYb2J3be6F/d4UW8Zpyp2hDlLLsOiAK8lYLBmYOYRLy2G3XQ0BClk8U0CIM24sN8ugJPw1SDGB9ZQ4ygwkbF7rA8z9fRHCmPwvI4uAhEX3WvhK0oJm0rVmc/iLYlVnl/FP5rg8ri9AulO2JWQs1tGa5N7tzd1ZiujydrXcPFGSAjNaiISnRT/wAXMZ1NhRoCw+K4R39gtyqysK/1FFOMb8+NvpfQ79IBE1RuPCHbP5BcKXwrviApf1M2v+sni9ysYJNCVP+ipsm2Q8WVFezXdP6vX0n6op05FX+kxvmrxLP8wZEWxtDZe/UJC485dr1I4aMY2FRbaljNt6+XZROewshApIwTGtNQ5JrDkjidZLpVAwa9BEcSoG7xeHVZzfQCZ7LhsJykfTu9y52HFQ/bvw6OgFlCHIUMMAUm2IBnnV1+X0/7AF+lcmo2UoewVT2hwzUW7CXKuOQKOMH2U1KzES0e74uuxNMIuHuF+0ssM9aAE652WBhNHhtrRH+rjVL1ZT21ZDQi6ZuGfYYz0FzFF5dro44LGSttO/AFpx2zEWqJ6Yry7T223xBOW7k7hhDzvNrYDFdKN7d4xQ6Zt4kuMV1lsTuDJkeaJrQYcO2sRwj9ueW8jKD9DxRp9i2ellB3TT0q7Ug8= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(136003)(39860400002)(396003)(451199021)(46966006)(36840700001)(40470700004)(356005)(81166007)(7416002)(8936002)(5660300002)(82310400005)(186003)(1076003)(36756003)(26005)(2616005)(2906002)(40480700001)(6666004)(47076005)(86362001)(36860700001)(83380400001)(426003)(336012)(44832011)(40460700003)(82740400003)(4326008)(8676002)(54906003)(70586007)(70206006)(41300700001)(478600001)(110136005)(316002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 11:06:19.6052 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b5f1dc5d-7f66-4137-9b1c-08db2eb34b24 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8480 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761520174122813891?= X-GMAIL-MSGID: =?utf-8?q?1761520174122813891?= |
Series |
Macb PTP minor updates
|
|
Commit Message
Harini Katakam
March 27, 2023, 11:06 a.m. UTC
There are currently two checks for PTP functionality - one on GEM
capability and another on the kernel config option. Combine them
into a single function as there's no use case where gem_has_ptp is
TRUE and MACB_USE_HWSTAMP is false.
Signed-off-by: Harini Katakam <harini.katakam@amd.com>
---
v3:
New patch
drivers/net/ethernet/cadence/macb.h | 2 +-
drivers/net/ethernet/cadence/macb_main.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
Comments
Hi Harini, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Harini-Katakam/net-macb-Update-gem-PTP-support-check/20230327-190937 patch link: https://lore.kernel.org/r/20230327110607.21964-2-harini.katakam%40amd.com patch subject: [PATCH net-next v3 1/3] net: macb: Update gem PTP support check config: riscv-rv32_defconfig (https://download.01.org/0day-ci/archive/20230328/202303280125.0cmGPLT1-lkp@intel.com/config) compiler: riscv32-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/0a2f03b6a91caa746dfd1b56b998534464dae83d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Harini-Katakam/net-macb-Update-gem-PTP-support-check/20230327-190937 git checkout 0a2f03b6a91caa746dfd1b56b998534464dae83d # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/net/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202303280125.0cmGPLT1-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/net/ethernet/cadence/macb_main.c: In function 'macb_configure_caps': >> drivers/net/ethernet/cadence/macb_main.c:3897:35: error: 'struct macb' has no member named 'hw_dma_cap' 3897 | bp->hw_dma_cap |= HW_DMA_CAP_PTP; | ^~ >> drivers/net/ethernet/cadence/macb_main.c:3897:51: error: 'HW_DMA_CAP_PTP' undeclared (first use in this function) 3897 | bp->hw_dma_cap |= HW_DMA_CAP_PTP; | ^~~~~~~~~~~~~~ drivers/net/ethernet/cadence/macb_main.c:3897:51: note: each undeclared identifier is reported only once for each function it appears in >> drivers/net/ethernet/cadence/macb_main.c:3898:49: error: 'gem_ptp_info' undeclared (first use in this function); did you mean 'gem_ptp_init'? 3898 | bp->ptp_info = &gem_ptp_info; | ^~~~~~~~~~~~ | gem_ptp_init vim +3897 drivers/net/ethernet/cadence/macb_main.c 5f1fa992382cf8 drivers/net/macb.c Alexander Beregalov 2009-04-11 3866 64ec42fe272322 drivers/net/ethernet/cadence/macb.c Moritz Fischer 2016-03-29 3867 /* Configure peripheral capabilities according to device tree e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3868 * and integration options used e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3869 */ 64ec42fe272322 drivers/net/ethernet/cadence/macb.c Moritz Fischer 2016-03-29 3870 static void macb_configure_caps(struct macb *bp, 64ec42fe272322 drivers/net/ethernet/cadence/macb.c Moritz Fischer 2016-03-29 3871 const struct macb_config *dt_conf) e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3872 { e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3873 u32 dcfg; e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3874 f6970505defd0e drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2015-03-31 3875 if (dt_conf) f6970505defd0e drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2015-03-31 3876 bp->caps = dt_conf->caps; f6970505defd0e drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2015-03-31 3877 f2ce8a9e48385f drivers/net/ethernet/cadence/macb.c Andy Shevchenko 2015-07-24 3878 if (hw_is_gem(bp->regs, bp->native_io)) { e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3879 bp->caps |= MACB_CAPS_MACB_IS_GEM; e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3880 e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3881 dcfg = gem_readl(bp, DCFG1); e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3882 if (GEM_BFEXT(IRQCOR, dcfg) == 0) e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3883 bp->caps |= MACB_CAPS_ISR_CLEAR_ON_WRITE; e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3884 if (GEM_BFEXT(NO_PCS, dcfg) == 0) e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3885 bp->caps |= MACB_CAPS_PCS; e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3886 dcfg = gem_readl(bp, DCFG12); e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3887 if (GEM_BFEXT(HIGH_SPEED, dcfg) == 1) e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3888 bp->caps |= MACB_CAPS_HIGH_SPEED; e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3889 dcfg = gem_readl(bp, DCFG2); e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3890 if ((dcfg & (GEM_BIT(RX_PKT_BUFF) | GEM_BIT(TX_PKT_BUFF))) == 0) e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3891 bp->caps |= MACB_CAPS_FIFO_MODE; ab91f0a9b5f4b9 drivers/net/ethernet/cadence/macb_main.c Rafal Ozieblo 2017-06-29 3892 if (gem_has_ptp(bp)) { 7b4296148066f1 drivers/net/ethernet/cadence/macb.c Rafal Ozieblo 2017-06-29 3893 if (!GEM_BFEXT(TSU, gem_readl(bp, DCFG5))) 7897b071ac3b45 drivers/net/ethernet/cadence/macb_main.c Antoine Tenart 2019-11-13 3894 dev_err(&bp->pdev->dev, 7897b071ac3b45 drivers/net/ethernet/cadence/macb_main.c Antoine Tenart 2019-11-13 3895 "GEM doesn't support hardware ptp.\n"); ab91f0a9b5f4b9 drivers/net/ethernet/cadence/macb_main.c Rafal Ozieblo 2017-06-29 3896 else { 7b4296148066f1 drivers/net/ethernet/cadence/macb.c Rafal Ozieblo 2017-06-29 @3897 bp->hw_dma_cap |= HW_DMA_CAP_PTP; ab91f0a9b5f4b9 drivers/net/ethernet/cadence/macb_main.c Rafal Ozieblo 2017-06-29 @3898 bp->ptp_info = &gem_ptp_info; 7b4296148066f1 drivers/net/ethernet/cadence/macb.c Rafal Ozieblo 2017-06-29 3899 } e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3900 } ab91f0a9b5f4b9 drivers/net/ethernet/cadence/macb_main.c Rafal Ozieblo 2017-06-29 3901 } e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3902 a35919e174350d drivers/net/ethernet/cadence/macb.c Andy Shevchenko 2015-07-24 3903 dev_dbg(&bp->pdev->dev, "Cadence caps 0x%08x\n", bp->caps); e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3904 } e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3905
Hi Harini, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Harini-Katakam/net-macb-Update-gem-PTP-support-check/20230327-190937 patch link: https://lore.kernel.org/r/20230327110607.21964-2-harini.katakam%40amd.com patch subject: [PATCH net-next v3 1/3] net: macb: Update gem PTP support check config: powerpc-randconfig-r021-20230327 (https://download.01.org/0day-ci/archive/20230328/202303280600.LarprmhI-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install powerpc cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/0a2f03b6a91caa746dfd1b56b998534464dae83d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Harini-Katakam/net-macb-Update-gem-PTP-support-check/20230327-190937 git checkout 0a2f03b6a91caa746dfd1b56b998534464dae83d # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/net/ethernet/cadence/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202303280600.LarprmhI-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/net/ethernet/cadence/macb_main.c:3897:9: error: no member named 'hw_dma_cap' in 'struct macb' bp->hw_dma_cap |= HW_DMA_CAP_PTP; ~~ ^ >> drivers/net/ethernet/cadence/macb_main.c:3897:23: error: use of undeclared identifier 'HW_DMA_CAP_PTP' bp->hw_dma_cap |= HW_DMA_CAP_PTP; ^ >> drivers/net/ethernet/cadence/macb_main.c:3898:21: error: use of undeclared identifier 'gem_ptp_info'; did you mean 'gem_ptp_init'? bp->ptp_info = &gem_ptp_info; ^~~~~~~~~~~~ gem_ptp_init drivers/net/ethernet/cadence/macb.h:1352:20: note: 'gem_ptp_init' declared here static inline void gem_ptp_init(struct net_device *ndev) { } ^ 3 errors generated. vim +3897 drivers/net/ethernet/cadence/macb_main.c 5f1fa992382cf8 drivers/net/macb.c Alexander Beregalov 2009-04-11 3866 64ec42fe272322 drivers/net/ethernet/cadence/macb.c Moritz Fischer 2016-03-29 3867 /* Configure peripheral capabilities according to device tree e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3868 * and integration options used e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3869 */ 64ec42fe272322 drivers/net/ethernet/cadence/macb.c Moritz Fischer 2016-03-29 3870 static void macb_configure_caps(struct macb *bp, 64ec42fe272322 drivers/net/ethernet/cadence/macb.c Moritz Fischer 2016-03-29 3871 const struct macb_config *dt_conf) e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3872 { e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3873 u32 dcfg; e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3874 f6970505defd0e drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2015-03-31 3875 if (dt_conf) f6970505defd0e drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2015-03-31 3876 bp->caps = dt_conf->caps; f6970505defd0e drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2015-03-31 3877 f2ce8a9e48385f drivers/net/ethernet/cadence/macb.c Andy Shevchenko 2015-07-24 3878 if (hw_is_gem(bp->regs, bp->native_io)) { e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3879 bp->caps |= MACB_CAPS_MACB_IS_GEM; e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3880 e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3881 dcfg = gem_readl(bp, DCFG1); e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3882 if (GEM_BFEXT(IRQCOR, dcfg) == 0) e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3883 bp->caps |= MACB_CAPS_ISR_CLEAR_ON_WRITE; e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3884 if (GEM_BFEXT(NO_PCS, dcfg) == 0) e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3885 bp->caps |= MACB_CAPS_PCS; e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3886 dcfg = gem_readl(bp, DCFG12); e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3887 if (GEM_BFEXT(HIGH_SPEED, dcfg) == 1) e4e143e26ce8f5 drivers/net/ethernet/cadence/macb_main.c Parshuram Thombare 2020-10-29 3888 bp->caps |= MACB_CAPS_HIGH_SPEED; e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3889 dcfg = gem_readl(bp, DCFG2); e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3890 if ((dcfg & (GEM_BIT(RX_PKT_BUFF) | GEM_BIT(TX_PKT_BUFF))) == 0) e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3891 bp->caps |= MACB_CAPS_FIFO_MODE; ab91f0a9b5f4b9 drivers/net/ethernet/cadence/macb_main.c Rafal Ozieblo 2017-06-29 3892 if (gem_has_ptp(bp)) { 7b4296148066f1 drivers/net/ethernet/cadence/macb.c Rafal Ozieblo 2017-06-29 3893 if (!GEM_BFEXT(TSU, gem_readl(bp, DCFG5))) 7897b071ac3b45 drivers/net/ethernet/cadence/macb_main.c Antoine Tenart 2019-11-13 3894 dev_err(&bp->pdev->dev, 7897b071ac3b45 drivers/net/ethernet/cadence/macb_main.c Antoine Tenart 2019-11-13 3895 "GEM doesn't support hardware ptp.\n"); ab91f0a9b5f4b9 drivers/net/ethernet/cadence/macb_main.c Rafal Ozieblo 2017-06-29 3896 else { 7b4296148066f1 drivers/net/ethernet/cadence/macb.c Rafal Ozieblo 2017-06-29 @3897 bp->hw_dma_cap |= HW_DMA_CAP_PTP; ab91f0a9b5f4b9 drivers/net/ethernet/cadence/macb_main.c Rafal Ozieblo 2017-06-29 @3898 bp->ptp_info = &gem_ptp_info; 7b4296148066f1 drivers/net/ethernet/cadence/macb.c Rafal Ozieblo 2017-06-29 3899 } e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3900 } ab91f0a9b5f4b9 drivers/net/ethernet/cadence/macb_main.c Rafal Ozieblo 2017-06-29 3901 } e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3902 a35919e174350d drivers/net/ethernet/cadence/macb.c Andy Shevchenko 2015-07-24 3903 dev_dbg(&bp->pdev->dev, "Cadence caps 0x%08x\n", bp->caps); e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3904 } e175587f4d32de drivers/net/ethernet/cadence/macb.c Nicolas Ferre 2014-07-24 3905
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index c1fc91c97cee..b6c5ecbd572c 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -1363,7 +1363,7 @@ static inline bool macb_is_gem(struct macb *bp) static inline bool gem_has_ptp(struct macb *bp) { - return !!(bp->caps & MACB_CAPS_GEM_HAS_PTP); + return (IS_ENABLED(CONFIG_MACB_USE_HWSTAMP) && (!!(bp->caps & MACB_CAPS_GEM_HAS_PTP))); } /** diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index f77bd1223c8f..bcda6a08706f 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -3889,7 +3889,6 @@ static void macb_configure_caps(struct macb *bp, dcfg = gem_readl(bp, DCFG2); if ((dcfg & (GEM_BIT(RX_PKT_BUFF) | GEM_BIT(TX_PKT_BUFF))) == 0) bp->caps |= MACB_CAPS_FIFO_MODE; -#ifdef CONFIG_MACB_USE_HWSTAMP if (gem_has_ptp(bp)) { if (!GEM_BFEXT(TSU, gem_readl(bp, DCFG5))) dev_err(&bp->pdev->dev, @@ -3899,7 +3898,6 @@ static void macb_configure_caps(struct macb *bp, bp->ptp_info = &gem_ptp_info; } } -#endif } dev_dbg(&bp->pdev->dev, "Cadence caps 0x%08x\n", bp->caps);