Hi Leif,
2017-12-04 15:00 GMT+01:00 Leif Lindholm <leif.lindh...@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 <m...@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: 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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel