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 ACFA02215238F for ; Mon, 4 Dec 2017 08:30:35 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id n138so6936165wmg.2 for ; Mon, 04 Dec 2017 08:35:05 -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=0GAwbizdwOu1WljYXOxEtRQwnRQn1TLVJo8DWx3+PJI=; b=jLiwFzAUCmmu56+2h2V8S4n8HkIQwm7/ohdgYiUSZHbeyNAIRfWNnV2nLrOk9x+ZRs 5+skYuzfByJ/9GiYNWt8Lwf+ieJMUiE2uuEv3rhpcp5x1x88GeXiteeT1zpIWOTQANiw KXyhOQsdWPzKyS4aACzYBzttDkpvPqmV3NoKx19HxXV/HRioZBmfZfaiMhhlN+vXQ1KA LuKthAaDuQ9kVUaR9NWt/ksW40ckyED+HELNPXLc0vscpQiwxTuPzzEERCHCKo4R/+t3 Sq8HavVGvvVwHKXPH556uG7+0/TUmdF4HUABYDOPqrkQscAUKNiGiSVgEtcbNn24nD0l +Sdw== 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=0GAwbizdwOu1WljYXOxEtRQwnRQn1TLVJo8DWx3+PJI=; b=cUpO+DyAGHCXMTscEqpWtJ9/CrC4UrqpztcOmZ/dC6BRrwxfW+yEJn8Cf+USEownxX uou+p8S1qusg/dHgM3HZxp0D1FA3FgtpOwSkEFNGPRZhNntXvm/mPOHXoZ/nDAWcSIYd SeTkA8gVhQgMXEsfz1D8rAlWaBwicAncEm6iU6WaAIaz4xo1xn/N8lgvkSN3ryarpskf 4RKbnWPokk2QPb9V8pHKJpfN3EzVmn2S7xgAt3VpK408di0rE/7jYosbrkvIC0hy0R9t ibL2EID3fYi3u7vBFeZk08LRpgGr0+2GxrY7/pmNC3F1aI2mwDE5lNLP7o/RDGbuJoMA /XSQ== X-Gm-Message-State: AKGB3mJCtqhLhmbBE4JY3LikVWNLPfE+3ERTGwwkbL7b9sqJjpZknUU4 /Nc0dGlqYN7AZEWMPXZZEmMblrsxUbXnyN9bOwC9pw== X-Google-Smtp-Source: AGs4zMbUFgU8xsRoMVy+w8jDGbDHEqpevQ0t6Yv8HLw4DyHOYmUT065MtCY4snKSjsAtZPAE34qLOjpyPCXHjywiPBg= X-Received: by 10.28.230.78 with SMTP id d75mr8226754wmh.54.1512405304081; Mon, 04 Dec 2017 08:35:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.163.207 with HTTP; Mon, 4 Dec 2017 08:35:03 -0800 (PST) In-Reply-To: <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> <20171204161025.rslvdt5hldrs4rf4@bivouac.eciton.net> From: Marcin Wojtas Date: Mon, 4 Dec 2017 17:35:03 +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 16:30:36 -0000 Content-Type: text/plain; charset="UTF-8" 2017-12-04 17:10 GMT+01:00 Leif Lindholm : > 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? :) > Indeed :) Thanks, Marcin > *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