From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730071.outbound.protection.outlook.com [40.107.73.71]) by dpdk.org (Postfix) with ESMTP id D339F1B437 for ; Sat, 29 Sep 2018 12:33:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-aquantia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ekuSTalPJaeS/UYmekRY6x3RppeOyZ3i5bALwXJWbHg=; b=iBI4yFtAGVov/Om6qJryhKXKRDPLoYBw8I7hXBylgkHFNmAVvP0fF7igis3drM2xNAqwkVKe7WwzRmpn3sLKLonnkizecp4kG7YUtFUZ8D/6Z2N3nhxI69P56LGoi9Wi0cBR+MAO5b021/lQdXxccXWnRPgHBgqty332jwK3G54= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Igor.Russkikh@aquantia.com; Received: from ubuntubox.rdc.aquantia.com (95.79.108.179) by BLUPR0701MB1650.namprd07.prod.outlook.com (2a01:111:e400:58c6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.22; Sat, 29 Sep 2018 10:32:57 +0000 From: Igor Russkikh To: dev@dpdk.org Cc: pavel.belous@aquantia.com, igor.russkikh@aquantia.com, Pavel Belous Date: Sat, 29 Sep 2018 13:30:35 +0300 Message-Id: <05d371790dc84affdfaccc387c94b4449298f695.1538215990.git.igor.russkikh@aquantia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [95.79.108.179] X-ClientProxiedBy: VI1P193CA0009.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:bd::19) To BLUPR0701MB1650.namprd07.prod.outlook.com (2a01:111:e400:58c6::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f30a9a6c-2b03-4822-0c90-08d625f6efa9 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BLUPR0701MB1650; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1650; 3:21/jebH/CyECfXthcUx0UDkS6ixhnpl3m1NphrrmICvBBXR4uAZdfScqFXbrbSqi7k5fbc8droR8mlli+NyOC/mK0B1B1QE4BgDl5t36LmW4Zh/M7iAxRJMxg/E8sszYD3otQ8uLyi8ZSdmo4g0RxKI7K6TAqIpoxP/wUgJ+/K3f/UFNxE49pIRoCZ9ExF/YLGkRtu/zxdOR83qhmbue4/CIyvVT0K+U0lp9ROwQitkJgpM1II30CRiLt3ge7+/N; 25:ty3uP29dwkc0vO4W7rBJKCHU5ElcqXZLz4MwsYB054jvR5xeAmqDC6kzgc/mirkAU2qJerurTz0nyeiKzWQ9VsdLvG+26AnOigwvzEq6jC9qJQur1epR0QiD5QQkumyRj8QaJT9s0Rl1JIE5GWXjvakKqjeKngwhS/vKUKE81gtsDIgotWaqCE6PMqMR/rHdENdw+cDovSWG1mV/708Hr7/O9UiuO1L1VaprLcsabm3HnZEYU3DN75Z5AA3PPgvcxtyuALq9pKrOoqQ16tukgtEWZKo5UwGcPWPmPJvrd4h2pf3vdZklwotgHyhtBvgI0bx25tJywQ/hn5EwQLXUrSM6BHnZYlYpNXxtkA2IoAU=; 31:g1bIS0iJf+nTryoklytBP2MKCJ2GWDOZCiiBRaoY8smedWyUOFS204V++jonGQlw+QcpzbDuVhwA3rnm+fP+j+0bCn9S5RmE/o3VWSd1Tq+vlXjK1T/JusLbB93bIa/dwgsjttcuj9KMrX5yI3qhKpfX2yKQl7q5l2BPb3o5UKyrfj8qzvBrkLvn+DEkmTG4Rj6SYkxNSYypbQrzDYEFxffD5Fvkfr5GeRioWpsz1m0= X-MS-TrafficTypeDiagnostic: BLUPR0701MB1650: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1650; 20:V1eFhr7gxh0+c4lI7ncNq7BpJ9OtDys4ijgjvntJ4raBw1mWzntSU+I9u+v5oNgcrJUx/ZbmsJkvwE4ZisqWa0RpvkPTAtnOFD5oE8M68B2V0irYMCC0ClQ/BJrGXjUd12NSJagqJCeJUvZkKdpoVERt+HIiuqR4ZZ4dAD6iTDdxG3En1gcrMeQ4RsJRHFw+r+6/IAiLFYbPPpSm/ZgGmXUcB7qn6WscvZIHUDGq6Fi8lAaJh+Oh2CYrLhLxke+dNzpL3sYoy6BWJntMzbH5k2SZNQXpD2c3eGzfLpFKYAvm9Oq+96prt88fXC2U8jB5KaZmbc/wtSHhAwkaO2VEf5/e/p9C19MMeEhQ9FdWDc38VEO/WWZ//eu2kFBBfDWGOMRfKCeVqglKtlCgk/R/xsX+G6KmYLqsDDJXn4sQIveA5/kl/o9qIhZeiEqJPt2ZQyvte0vFf00wDj5QPX9l+6ZSp6CjkQOYkcM2PvIRfy3A6nYRFHX5fw2AxDz2ktSW; 4:YNh23zMNox4+8XqHK+LBvTs3OknUt1sbb1TRtnZBavMv/ocVeM1DI+C+eubp9F3TyV2QmIsS11YamTErFimliJaLL5wGYzl5i4MeJzD18+JTnCcGz5TlF7xW8fFpOtPvB5wAWwjAyDpCXBPRCREYRoeULEicTqvRf1LWAPeYi2B5hfsePE8LGFGO6odiyhpBjAqwnBoLWjKjGGsftU1j+rIac6Eov3Vz3xtaqkKVX8Hk3PF2y74veu9SDhm9fqfY5ftJqebvkTU8F5cOxejcBw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231355)(944501410)(52105095)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699051); SRVR:BLUPR0701MB1650; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1650; X-Forefront-PRVS: 0810818DA0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(136003)(396003)(376002)(39850400004)(366004)(189003)(199004)(16526019)(14444005)(446003)(76176011)(2906002)(6916009)(6666003)(97736004)(8676002)(81166006)(81156014)(36756003)(4326008)(316002)(8936002)(50226002)(34290500001)(575784001)(86362001)(5660300001)(68736007)(16586007)(118296001)(72206003)(3846002)(6116002)(53936002)(386003)(105586002)(6486002)(47776003)(66066001)(486006)(25786009)(305945005)(50466002)(44832011)(956004)(2616005)(26005)(107886003)(52116002)(51416003)(7696005)(186003)(476003)(478600001)(2361001)(7736002)(2351001)(48376002)(106356001)(11346002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1650; H:ubuntubox.rdc.aquantia.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1650; 23:O9RMpUGB0dfx+Jir3SwkTLHw3VOvtpT9933vtXs?= =?us-ascii?Q?+RM4FwbMxs6J6e89oGXtpODHGFHqtdEiJ2GfDg9yvq/m/4lj+sb2bt7vgF1A?= =?us-ascii?Q?gMm3RG3+A4LW+t7g4CbOV/VTHDbn4a1CPuKqeCBwxMIxnJmi2mGUT4ou72IU?= =?us-ascii?Q?53Tkvuy4Af8EnnY9TFl13CfrMII30lHgvmrd4IBfxgUq0lSuXE09F1pSHYyb?= =?us-ascii?Q?KYXQ/PVJ5lhJshnQGM/o+eih3ClSWnoZ50rwHfPSQX7O41WMKnoy0aPvIaa1?= =?us-ascii?Q?Pad8KhkbK9h4ubz9n+btWDjOh9dvL5SX5RYc7RVCaHIyjHTokYt1OUSDH+uY?= =?us-asc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NcM2P/amW2sOANSLMMfSfBeJT1HGIB5EjzHog0sH75uhBX+/wpNOCVak2p6hUs44EsoN4ppWJbS638+9xN4NHGJefV527ywH/ax89D9uB6h2ZXQOnQXB2ENH4In8+eHUVx3YBJKXzSiH7/Vfwn9kjUn4=; 7:+GeWHLiyu2Sw40oWSwJ2sid+cF2ucw0A2SsvFwxnPld/sPOImYoKZBLFwXSN2P1Y7jji2cDnKjCdE/PgRCJNaznbIV8wN3T9YY+w4X5Nh8FzyDk6F3D+ZrtCFglhBbQ3tG7kJcmSAbpuuUViFCoc8EKL6qJod3bRZzreMPXAKSk84EH9s1crcClVWxxLNRLyQZbp7xqbjt1CAzbht6rVwL5KOKN1iYtTpmGS38zkau2LhxgsmVLTPOFAz8HxKoLd SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2018 10:32:57.1891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f30a9a6c-2b03-4822-0c90-08d625f6efa9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1650 Subject: [dpdk-dev] [PATCH v3 21/22] net/atlantic: support for read MAC registers for debug purposes 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: , X-List-Received-Date: Sat, 29 Sep 2018 10:33:05 -0000 From: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: Pavel Belous --- drivers/net/atlantic/atl_ethdev.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index 90ab8d9c0b1d..c69b2536a3e3 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -80,6 +80,9 @@ static int atl_dev_get_eeprom(struct rte_eth_dev *dev, static int atl_dev_set_eeprom(struct rte_eth_dev *dev, struct rte_dev_eeprom_info *eeprom); +/* Regs */ +static int atl_dev_get_regs(struct rte_eth_dev *dev, + struct rte_dev_reg_info *regs); /* Flow control */ static int atl_flow_ctrl_get(struct rte_eth_dev *dev, @@ -238,6 +241,8 @@ static const struct eth_dev_ops atl_eth_dev_ops = { /* Link */ .link_update = atl_dev_link_update, + .get_reg = atl_dev_get_regs, + /* Stats */ .stats_get = atl_dev_stats_get, .xstats_get = atl_dev_xstats_get, @@ -1273,6 +1278,32 @@ atl_dev_set_eeprom(struct rte_eth_dev *dev, struct rte_dev_eeprom_info *eeprom) } static int +atl_dev_get_regs(struct rte_eth_dev *dev, struct rte_dev_reg_info *regs) +{ + struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private); + u32 mif_id; + int err; + + if (regs->data == NULL) { + regs->length = hw_atl_utils_hw_get_reg_length(); + regs->width = sizeof(u32); + return 0; + } + + /* Only full register dump is supported */ + if (regs->length && regs->length != hw_atl_utils_hw_get_reg_length()) + return -ENOTSUP; + + err = hw_atl_utils_hw_get_regs(hw, regs->data); + + /* Device version */ + mif_id = hw_atl_reg_glb_mif_id_get(hw); + regs->version = mif_id & 0xFFU; + + return err; +} + +static int atl_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) { struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private); -- 2.7.4