Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11378739rwd; Thu, 22 Jun 2023 12:25:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7SpPE+dsDgk8oL+nbO8oOQc3rXUkV/P6sDsAK+b6S+5+nktZHnZgVV7tatA2vsqWwgHThD X-Received: by 2002:a17:902:7d87:b0:1b5:3c7f:1b3b with SMTP id a7-20020a1709027d8700b001b53c7f1b3bmr12670533plm.35.1687461942707; Thu, 22 Jun 2023 12:25:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687461942; cv=pass; d=google.com; s=arc-20160816; b=mz6RSsFNEDZgoA/PSPaHrHpa2JfBX9QErAGBOTQq/6RDrd2ZbZojbp5gf+c/ae4+qO pq5qnMz9xoAPS7ynN61w3F5h7PTpaEW1k4AVcnS4NWBAhk49h24SO/fKuPoqT8sJWveu l11+KUEFN8pG4QSSsohjaXQfFK2VxIUldAm7H7gKzZyoqGdBlB0csPXkh35rWXrrsYE4 9wAZ0tOx0zw+8QoDTCkEwrL8IfIGYhQ2gK7gL0z8v8b2AthesiGkpuMROM+YUpvpFk2Z oiXXhHg+bH0VPovIbos2XdCeo2MtCvQoL97Ud0pjC3zt1ktBLmrHUNpo6SIECAq3bIZV SRiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=uEvECoNC55ZVS1zTHfyboNmzZMpWU8e6bXe0QY+7xHY=; b=wdEieg0FNHGNnst6hMwd5/+L8/kBRaHQweJJhsq+KKJqiXwEeUBItuW2udqgyxwYnn 62qxRanMXk90ZP5htTj0X435rW1uwag4vlqpN+ScKF9+f+Hv/gIaQg1AaKQePp7KJOlg tJOGR+xhpuG/ciNOxriOMzR3zyDLliqOwoBe4hVngFrhwi6CDC1ctlcWErKGFcg6GEXo CJOxtZL49Rlzf00+DDAfvfmxqqopt9NH0cp8ZMwPiVWT3KF1qaaa3SwFop973J4OJyE5 Lw1Uzb5YdDbkCpJpkXelG5noXtsgqCQERBpf1S9LRg2bwlpVCQ7BNCDn9Xo5Ig8wS/Co 577Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=mvdkIK1b; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iy9-20020a170903130900b001b046acc853si3598734plb.589.2023.06.22.12.25.31; Thu, 22 Jun 2023 12:25:42 -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=mvdkIK1b; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=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 S230239AbjFVSnJ (ORCPT + 99 others); Thu, 22 Jun 2023 14:43:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbjFVSnG (ORCPT ); Thu, 22 Jun 2023 14:43:06 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2046.outbound.protection.outlook.com [40.107.244.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D99BC1FF2; Thu, 22 Jun 2023 11:43:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kDeumnMobiZ6Pcol0fsK6Vxt8rdT7KqaCXevpIoV+UWQLIxQzNdb4Kw4nCueMuxZiIBUjh+pp0ewG98Jrvl+BboP8sqwqJTDATWEzT5y35mc5E2Rn4cE9FJ9U+jZzaBmZV4rHuVa+1xNvvTMmWBJM+M0yYoaa5mdedm36kZuxEnYp7+C6HxRHTG0+qlnJpMOkvVxP2SfEQVMnF11FxsJ4qrMCb8T9VH1enfjrP74BYJoDQgYNTEdSbly7zybxLoiDSTt1+YSiP8zDMou+IAWF6EbNZpwhj97OMSytCKcqcsqMez+Pic3TeLWBWQVLQf/rrpaBGOMqR4PbXUrDKbHYA== 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=uEvECoNC55ZVS1zTHfyboNmzZMpWU8e6bXe0QY+7xHY=; b=nWIi8iAnoYmIKsiU17MFpxlKRx+EMXxPI9srIgjkALJDDxRi/xS1OfFmLJ9z/nrpgII8bmsV8yZsF3xNJqolSWTHK/DTkKI+H4q2TJy64s7iS03ZvA3UjnKB0WyYvNnvfJAMGFAppKvhIprQjMyM3h0bYS3dXGNQ/vTPcDlTRHrK8UIslEKob/NHTzW5M4vCrGoky6LpJfco4M1KK3EaxqrEdhCRtDaCg7ZZAE8vKDs7p1+YRJkwLhOMLUCZ7iStxzLQ5paz/xXyXol65FclmopmPc67QET0BaMtOlJtfuPicatP9Ka5Lhkt0+xbSymjn6WIHDyLdtdPZmmZ5vqRDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=uEvECoNC55ZVS1zTHfyboNmzZMpWU8e6bXe0QY+7xHY=; b=mvdkIK1b1aKpQP0HZ4zDU4hExKMsPTfL+OLw3+CXg8vQJ4SA2gQAFNb7ANS4WbLc7WAytFTmpYh0nPv/QVxNk0tOheo5lISsofQ9BmIbMCoZpDXvov6u7F0yBxw7ecx3hdYuU1cHFq5pJLlaIAm4UFRVzNZn+paaPhSjQ0SFLAU= Received: from MN0PR12MB5953.namprd12.prod.outlook.com (2603:10b6:208:37c::15) by PH7PR12MB9221.namprd12.prod.outlook.com (2603:10b6:510:2e8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Thu, 22 Jun 2023 18:43:02 +0000 Received: from MN0PR12MB5953.namprd12.prod.outlook.com ([fe80::8368:23:db50:8f88]) by MN0PR12MB5953.namprd12.prod.outlook.com ([fe80::8368:23:db50:8f88%5]) with mapi id 15.20.6521.020; Thu, 22 Jun 2023 18:43:02 +0000 From: "Pandey, Radhey Shyam" To: Maxim Kochetkov , "netdev@vger.kernel.org" CC: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Simek, Michal" , Andrew Lunn , Robert Hancock , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2 1/1] net: axienet: Move reset before DMA detection Thread-Topic: [PATCH v2 1/1] net: axienet: Move reset before DMA detection Thread-Index: AQHZpTJJf5eUflWxuUSsEXI/drOhL6+XJ29Q Date: Thu, 22 Jun 2023 18:43:02 +0000 Message-ID: References: <20230622175200.74033-1-fido_max@inbox.ru> In-Reply-To: <20230622175200.74033-1-fido_max@inbox.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR12MB5953:EE_|PH7PR12MB9221:EE_ x-ms-office365-filtering-correlation-id: 0e43f27f-af55-4cb2-a9e4-08db73508236 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hQWpzn5cQkNK4nMfei0jrIa7byHFdCEvyKgnc30LIkpWFQwEVpknNa8++5ooeAwBDYN4qD8r+538EjqDGHhLWmVqBB4B/mVnozklb2vb+muSEgWcFK4a0MkDAKtGAvXvBXMNypngvh/3Do+PMQvNa1H4FO88c7nJj7xj/ozDi0KbyMpic2Xavknj+yYYTFTCNwheNbLL7yMUi5ES5RJ/n83BL5rQlMsqKkNEOKibb8N6TGcjzbCjGn5Lz4q1VAk6Cvquq2r5c04DlExZfY+e0I35122hr+jZOVZ/hE1ta3l1pma+XK0DXfW3L7C/FxtBa1anWqdzJc5yPQ28R8EaeHOPiDrpdpbEJlkPBWlD5JJRJMVmgXqzshg3yE2lTghpmF/iH1pyeDbpq5S/8vl6Deqaq7GUxjqh0A/EgjuidaqBLBjJiM26rnUZkRXL9NNd0Ne4PiWh8v9rQ7ratnPEoifrp6yUsIXKpdmq05D3wLxcjzRPS/rl2/cIL4pi4umJTKfXVDO5F5HGRpzoWpSOWyXn4V48bO4YHEBYsZlqiXe2d1ehPI/rKzmJYzYi5ElqAV6o7nIaFto0biuV3gZKJ7/H3vB1WBOSjODJU1GRkT3Z9Eb3rXdfksCxd9tN9HpU x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB5953.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(396003)(346002)(376002)(39860400002)(136003)(451199021)(7696005)(71200400001)(478600001)(83380400001)(38100700002)(186003)(122000001)(86362001)(38070700005)(55016003)(33656002)(53546011)(6506007)(9686003)(8676002)(8936002)(41300700001)(7416002)(52536014)(5660300002)(2906002)(110136005)(54906003)(66946007)(66476007)(66556008)(66446008)(316002)(64756008)(4326008)(76116006);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?70CfoE4y/TvUWzSuG8fWYEJWpBd3r+MxbKwoCmsj4KfzLNe3P5xQkHxOdsfw?= =?us-ascii?Q?o7B2UuCbhump8E4Uq9H/8Y1Shf4Oen2eQaCu6vMLUgPMsGl8VuKOO1EwLhHW?= =?us-ascii?Q?WcKiOkIx0dYOt3aVbHTA8Yqi5ZHKSpukj3kN3/nsAALEaZvbbSrSJCmJa8n1?= =?us-ascii?Q?e8SV+G1RuuPcBm8uv5T+XR1GEqhFsOozjmv0pgTg/iUi1tG8M5mNnWiYVhgv?= =?us-ascii?Q?e/4ykO4r1XsfUmA9xTNl73FF3brCaDpbtLY6q0bsXOXl193/jl/LhwPXbKD2?= =?us-ascii?Q?hd9aNE/FygWGIOX3otWT1mEuiUqeetd1uhJjz7yX7s1hl30Q8uvG7L+H2Qot?= =?us-ascii?Q?dWh34N2O86oJqp0Wl7ERl/bYJd47pM3tO4JsoXq/DD3HDWpLarHB7iYvdKbk?= =?us-ascii?Q?FndR3xQusCmyq4PVq8p2umJq7i2wweakJiuak2vZWMBZRm7akhAMqrXh7bwZ?= =?us-ascii?Q?kj6FS3qx1y95/tOP/p6Bqud5yKVQdNFkOsVTUE8tdrMYTsqbDZP99j6E9qBU?= =?us-ascii?Q?/9naL0pVRmbTWTILlyqVD5lzUE2pxWdr+wbj2zFUM3xq7mq3ihMH0YwLGXRP?= =?us-ascii?Q?/Sh/XZN1oxDk6/TpAyUHp9qw2R4mwDV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Q?uOlGci6But0Jibjt/p5bSqj6fBDgkGAsnJOHWQfYoCWv3s+bpuLOhfWQtQjb?= =?us-ascii?Q?iyaNfZCbw/jsUnK6eOI1mMoQrmXmIu7qlb3td55+HJfZvyXRyK25kYreMCW1?= =?us-ascii?Q?soHpQpGcw7/B1anBGHgjQCk=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB5953.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e43f27f-af55-4cb2-a9e4-08db73508236 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jun 2023 18:43:02.2120 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MWkfcAHU/wAx9qs2FylIXSgCaLJbXxSFl5JZtxgtlmzw5Ru5GNGSGPQnSIxO/u4L X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9221 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,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, T_SCC_BODY_TEXT_LINE autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Maxim Kochetkov > Sent: Thursday, June 22, 2023 11:22 PM > To: netdev@vger.kernel.org > Cc: Maxim Kochetkov ; Pandey, Radhey Shyam > ; David S. Miller > ; Eric Dumazet ; Jakub > Kicinski ; Paolo Abeni ; Simek, > Michal ; Andrew Lunn ; Robert > Hancock ; linux-arm- > kernel@lists.infradead.org; linux-kernel@vger.kernel.org > Subject: [PATCH v2 1/1] net: axienet: Move reset before DMA detection >=20 > DMA detection will fail if axinet was started before (by boot loader, :%s/axinet/axienet/g > boot ROM, etc). In this state axinet will not start properly. > XAXIDMA_TX_CDESC_OFFSET + 4 register (MM2S_CURDESC_MSB) is used to > detect > 64 DMA capability here. But datasheet says: When DMACR.RS is 1 > (axinet is in enabled state), CURDESC_PTR becomes Read Only (RO) and > is used to fetch the first descriptor. So iowrite32()/ioread32() trick > to this register to detect DMA will not work. > So move axinet reset before DMA detection. >=20 > Fixes: 04cc2da39698 ("net: axienet: reset core on initialization prior to= MDIO Is this fixes tag correct ? I think the failure is introduced after=20 f735c40ed93c net: axienet: Autodetect 64-bit DMA capability? > access") > Signed-off-by: Maxim Kochetkov > --- > drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c > b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c > index 3e310b55bce2..734822321e0a 100644 > --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c > +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c > @@ -2042,6 +2042,11 @@ static int axienet_probe(struct platform_device > *pdev) > goto cleanup_clk; > } >=20 > + /* Reset core now that clocks are enabled, prior to accessing MDIO > */ > + ret =3D __axienet_device_reset(lp); > + if (ret) > + goto cleanup_clk; > + > /* Autodetect the need for 64-bit DMA pointers. > * When the IP is configured for a bus width bigger than 32 bits, > * writing the MSB registers is mandatory, even if they are all 0. > @@ -2096,11 +2101,6 @@ static int axienet_probe(struct platform_device > *pdev) > lp->coalesce_count_tx =3D XAXIDMA_DFT_TX_THRESHOLD; > lp->coalesce_usec_tx =3D XAXIDMA_DFT_TX_USEC; >=20 > - /* Reset core now that clocks are enabled, prior to accessing MDIO > */ > - ret =3D __axienet_device_reset(lp); > - if (ret) > - goto cleanup_clk; > - > ret =3D axienet_mdio_setup(lp); > if (ret) > dev_warn(&pdev->dev, > -- > 2.40.1