From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C5B2822152383 for ; Mon, 4 Dec 2017 07:18:05 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id l141so6485911wmg.1 for ; Mon, 04 Dec 2017 07:22:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e/3j8eAWMn4hgrkS8a2bVmIJy4K/ZMcY42ExcXGC658=; b=OU3DgF09pOkwE+Oo6qiHc3VRU2hGSZzIj1UWEQYGSsigvySHiHVWl4hRoPjeCQXduA KuaPhW3D2lIdiqdyUTaZKiLmcCz2MZ3Nf9kQ3+79I95MyQKYyTSZcbf7mvncMfWPE9ib 4kdijiUNPm1UYQONYuXVj3UnZf/wqmlDavRgx9oUGakBGCLVQGHtH3/Lq3RmOVbEpfeB zUOU4Bs12R+hj7H/d+gOYAUmRE0QYga5oSIV0Kv3DZO8wlKPKUqUxdskZHzrkAnMiYJB I2Flc47YSklmsbF5R280nM0qbrxzSUYovj/Zxc9R3jQQl6oEnjxz9iBzKKP5+hjgc13W CNmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e/3j8eAWMn4hgrkS8a2bVmIJy4K/ZMcY42ExcXGC658=; b=TJzgomkhhlGflW38JWUztdLOgfFnMjWhT7t9r07bPXgC7gXV2GK0h5Gea5+HXXUlWg l5pcT3CprvNsMUTNb0ujYAUX/HvHgnD21jnoFplSu2lo1fv17YP7Gutx4h3Dlv7EmPIA 7tsVq2UmZPPoidcm/ozNWVOaY+IDhDOxuPnfH52fKy1p4yG2lSCAEGSfDzGlQEfRIWLh JluEnMojyxJ60HeV1gVKJ03w+pjnnrHW05KNcKiI4P4UzFLdkWTXiIsw7d7Al9K+rDk5 7O0upYFXdhQPoY3JOXqSolIIWza2yUB4ZfuUi3D2Bi/49BY+4BA1qwwrTYhu2KOIQhbD oK9Q== X-Gm-Message-State: AKGB3mIMeqybQXqNNkwsqv9oAejoluNqOqtTcZcUg4ZFa+cY2uwhHk3F pNky1zA7U9xGA7WurdgspOY4wpS22yUg6+NoyRWkaQ== X-Google-Smtp-Source: AGs4zMZyeego9ASetnQlQHcv5HC95cernAU4W4vBpwT4IW/fuCNPw+4omGYZbGKonlLwns3C4b9Op1kiI6VppERvvgU= X-Received: by 10.28.230.78 with SMTP id d75mr8032919wmh.54.1512400954394; Mon, 04 Dec 2017 07:22:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.163.207 with HTTP; Mon, 4 Dec 2017 07:22:33 -0800 (PST) In-Reply-To: <20171204140029.yvfn5s7wos7dgyjh@bivouac.eciton.net> References: <1512142507-23282-1-git-send-email-mw@semihalf.com> <1512142507-23282-5-git-send-email-mw@semihalf.com> <20171204140029.yvfn5s7wos7dgyjh@bivouac.eciton.net> From: Marcin Wojtas Date: Mon, 4 Dec 2017 16:22:33 +0100 Message-ID: To: Leif Lindholm Cc: edk2-devel-01 , Ard Biesheuvel , nadavh@marvell.com, Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , semihalf-dabros-jan Subject: Re: [platforms: PATCH v2 4/4] Marvell/Drivers: MvPhyDxe: Cleanup the header X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 15:18:06 -0000 Content-Type: text/plain; charset="UTF-8" Hi Leif, 2017-12-04 15:00 GMT+01:00 Leif Lindholm : > On Fri, Dec 01, 2017 at 04:35:07PM +0100, Marcin Wojtas wrote: >> This patch removes unused macros defined in MvPhyDxe.h, as well >> as improves the style and comments. Pick single definition >> of the autonegotiation timeout - two different macros were used >> for the same purpose. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Marcin Wojtas >> --- >> Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c | 2 +- >> Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.h | 152 ++++---------------- >> 2 files changed, 31 insertions(+), 123 deletions(-) >> >> diff --git a/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c b/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c >> index e776a91..dd2edae 100644 >> --- a/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c >> +++ b/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c >> @@ -328,7 +328,7 @@ MvPhyInit1512 ( >> >> DEBUG((DEBUG_ERROR, "MvPhyDxe: Waiting for PHY auto negotiation... ")); >> for (i = 0; !(Data & BMSR_ANEGCOMPLETE); i++) { >> - if (i > PHY_ANEG_TIMEOUT) { >> + if (i > PHY_AUTONEGOTIATE_TIMEOUT) { > > I think you've had a git accident somewhere: > The existing line upstream is still > if (i > PHY_AUTONEGOTIATE_TIMEOUT) { > This hunk should have just dropped out. > No, it's ok. It just turned out, there were two concurrent definitions of the same thing. Please take a look at what's available on top of the master branch: Header: [...] #define PHY_ANEG_TIMEOUT 4000 #define PHY_INTERFACE_MODE_RGMII 0 #define PHY_INTERFACE_MODE_RGMII_ID 1 #define PHY_INTERFACE_MODE_RGMII_RXID 2 #define PHY_INTERFACE_MODE_RGMII_TXID 3 #define PHY_INTERFACE_MODE_SGMII 4 #define PHY_INTERFACE_MODE_RTBI 5 #define PHY_AUTONEGOTIATE_TIMEOUT 5000 [...] Driver: ~Line 204: DEBUG((DEBUG_ERROR,"MvPhyDxe: Waiting for PHY realtime link")); while (!(Data & MIIM_88E1xxx_PHYSTAT_SPDDONE)) { if (i > PHY_AUTONEGOTIATE_TIMEOUT) { ~Line 327: DEBUG((DEBUG_ERROR, "MvPhyDxe: Waiting for PHY auto negotiation... ")); for (i = 0; !(Data & BMSR_ANEGCOMPLETE); i++) { if (i > PHY_ANEG_TIMEOUT) { DEBUG((DEBUG_ERROR, "timeout\n")); Best regards, Marcin