From patchwork Wed Apr 27 15:05:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 12828930 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FA0BC433F5 for ; Wed, 27 Apr 2022 15:06:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238989AbiD0PJ2 (ORCPT ); Wed, 27 Apr 2022 11:09:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239180AbiD0PJB (ORCPT ); Wed, 27 Apr 2022 11:09:01 -0400 Received: from mail.tkos.co.il (guitar.tkos.co.il [84.110.109.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA122326C2 for ; Wed, 27 Apr 2022 08:05:49 -0700 (PDT) Received: from tarshish.tkos.co.il (unknown [10.0.8.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.tkos.co.il (Postfix) with ESMTPS id B697A44046E; Wed, 27 Apr 2022 18:05:00 +0300 (IDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tkos.co.il; s=default; t=1651071900; bh=tm7liJX8ov/WR2ZC4bn2cXltgUi43lPOmeatkQujUes=; h=From:To:Cc:Subject:Date:From; b=lSJtRsQ/tsGlyJuzSb59rTm8ukUwAg1yHh2g9ecUPyvCNNkWumVQ7eJgRFTJsvtKv sa1xtqCpZCDJF3Net5NzIgiS84p7CCIdag4HCXYZ1NPWpWj6ZScN3ayZuIC499UMVp xoTgGYnFeKOHJieBB8iEudtMxYkw+edYMn++X/pT59/bGPikzzW4T9PlJozYLEnzhI fRI7lVJU80BLIysWmlho2mUCSJM3Br9s1fzBMII+fHtRngp04xG92ZosV+Bc83Tpu/ leUKEUQBrML4RtxmTZVt9UCXbJ+P9lzS+iGYM9Qf3D85LEUcqAcmYxm9Qi1xinJ1Mh U0vnPGF1VEsSA== From: Baruch Siach To: Marcin Wojtas , Russell King Cc: netdev@vger.kernel.org, Baruch Siach Subject: [PATCH] net: mvpp2: add delay at the end of .mac_prepare Date: Wed, 27 Apr 2022 18:05:36 +0300 Message-Id: <2460cc37a4138d3cfb598349e78f0c5f3cfa59c7.1651071936.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Baruch Siach Without this delay PHY mode switch from XLG to SGMII fails in a weird way. Rx side works. However, Tx appears to work as far as the MAC is concerned, but packets don't show up on the wire. Tested with Marvell 10G 88X3310 PHY. Signed-off-by: Baruch Siach --- Not sure this is the right fix. Let me know if you have any better suggestion for me to test. The same issue and fix reproduce with both v5.18-rc4 and v5.10.110. --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 1a835b48791b..8823efe396b1 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -6432,6 +6432,8 @@ static int mvpp2_mac_prepare(struct phylink_config *config, unsigned int mode, } } + mdelay(10); + return 0; }