From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (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 C32C12215238F for ; Mon, 4 Dec 2017 08:05:59 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id l141so6785660wmg.1 for ; Mon, 04 Dec 2017 08:10:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M8zuxXV6SdNf9XZXoCo0W+qTCZ2NVmmHgHmlZQFnat4=; b=eAJ4TVXpKvRuIGbJeuMHRcft1ZHY8H/b65GAd2XqRwtXsVoz1StgNyPEC6nHjlLAQ7 BRCQJzl2K0AL+k41nifM5QS1TAtrphjsxZ+ws8h7tWfJaT3VLqk46WCoN/BVB6UR+2bY 2zicglp0saWil6id30tcjeSlu5gimVzdR16PY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=M8zuxXV6SdNf9XZXoCo0W+qTCZ2NVmmHgHmlZQFnat4=; b=RhOyWdRNDmytCI7GXVmYaHyvsgtdsyiMfn4Z051mSMlZlOdFP+sT6n5utP1QODKfkP Th11YB4I+QEqJ6Jvlkznq3F0AOfHTvKcH4isDvi7PkFlXreG+6KuXxBRpP/AbZ4NFYsc U5PtSS3UlS/fyoT3RwDvwAkpEzK8Alt01P09S8BBnfNGeZYyhwEBsSGRG4lfndjbZrEQ IYCZlpUiiNRlwHNjUv/K4jVut7wLFQJBAsEPn1Q7Lvi2yY59M/5pEiNktcxJjuyJWdA6 xChq2oupZr4p23INPVCb8nCG6yCQIlL2s0XJuWdf9KXUsJv3Oo5jsiwVu2u5QQ4HK2ok Sfiw== X-Gm-Message-State: AKGB3mKJDHkdf/csI2TzbDv9fnsBgz5UX7RH4ecY/GyZ2MkHi1KIsFeA HBdje+wTL3IXl38InpMDXRIndA== X-Google-Smtp-Source: AGs4zMZg7yJ09F8ANtTq4S/X5PAolT6n7Y5Fy+Cxe8iL0Htc7IOkRQRQWxEVIV7kIPL6zupXiLvf6Q== X-Received: by 10.28.170.209 with SMTP id t200mr8089315wme.8.1512403828309; Mon, 04 Dec 2017 08:10:28 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id x127sm8218924wmb.10.2017.12.04.08.10.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Dec 2017 08:10:26 -0800 (PST) Date: Mon, 4 Dec 2017 16:10:25 +0000 From: Leif Lindholm To: Marcin Wojtas Cc: edk2-devel-01 , Ard Biesheuvel , nadavh@marvell.com, Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , semihalf-dabros-jan Message-ID: <20171204161025.rslvdt5hldrs4rf4@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> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) 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 16:06:00 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Dec 04, 2017 at 04:22:33PM +0100, Marcin Wojtas wrote: > 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: Aah, that's not the same location as in your v1, is it? :) *grumble* Sure: Reviewed-by: Leif Lindholm > 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