public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Marcin Wojtas <mw@semihalf.com>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	 nadavh@marvell.com, Neta Zur Hershkovits <neta@marvell.com>,
	 Kostya Porotchkin <kostap@marvell.com>,
	Hua Jing <jinghua@marvell.com>,
	 semihalf-dabros-jan <jsd@semihalf.com>
Subject: Re: [platforms: PATCH v2 4/4] Marvell/Drivers: MvPhyDxe: Cleanup the header
Date: Mon, 4 Dec 2017 17:35:03 +0100	[thread overview]
Message-ID: <CAPv3WKcR_hSgGegtZbi+aq6Qkq8YXMyWOOk2mCUP_-RuoGcpmw@mail.gmail.com> (raw)
In-Reply-To: <20171204161025.rslvdt5hldrs4rf4@bivouac.eciton.net>

2017-12-04 17:10 GMT+01:00 Leif Lindholm <leif.lindholm@linaro.org>:
> 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 <leif.lindholm@linaro.org>:
>> > 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 <mw@semihalf.com>
>> >> ---
>> >>  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 <leif.lindholm@linaro.org>
>
>> 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


      reply	other threads:[~2017-12-04 16:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 15:35 [platforms: PATCH v2 0/4] Armada 7k/8k - misc improvements pt.3 Marcin Wojtas
2017-12-01 15:35 ` [platforms: PATCH v2 1/4] Marvell/Armada: Switch to dynamic tftp command Marcin Wojtas
2017-12-04 13:32   ` Leif Lindholm
2017-12-04 15:04     ` Marcin Wojtas
2017-12-01 15:35 ` [platforms: PATCH v2 2/4] Marvell/Armada: Fix watchdog control base Marcin Wojtas
2017-12-01 15:35 ` [platforms: PATCH v2 3/4] Marvell/Applications: FirmwareUpdate: Fix usage information Marcin Wojtas
2017-12-04 13:52   ` Leif Lindholm
2017-12-04 15:15     ` Marcin Wojtas
2017-12-01 15:35 ` [platforms: PATCH v2 4/4] Marvell/Drivers: MvPhyDxe: Cleanup the header Marcin Wojtas
2017-12-04 14:00   ` Leif Lindholm
2017-12-04 15:22     ` Marcin Wojtas
2017-12-04 16:10       ` Leif Lindholm
2017-12-04 16:35         ` Marcin Wojtas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPv3WKcR_hSgGegtZbi+aq6Qkq8YXMyWOOk2mCUP_-RuoGcpmw@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox