From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Fri, 03 Dec 2010 09:48:08 +0100 Subject: [U-Boot] [PATCH V2 1/1] net: fix some bugs in LL TEMAC driver In-Reply-To: <1290419192-13422-2-git-send-email-linz@li-pro.net> References: <66901067543efe59d87b3a805a4b19ce52a780c5.1290192590.git.linz@li-pro.net> <1290419192-13422-1-git-send-email-linz@li-pro.net> <1290419192-13422-2-git-send-email-linz@li-pro.net> Message-ID: <4CF8AEC8.4020204@monstr.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Stephan Linz wrote: > * avoid using link variable uninitialized > * avoid using phy_addr variable with invalid value > * reorganize phy control: first looking for phy than link > * return with error (result value 0) if no phy/link was found > * fix boolean mistake in wait for link: wait as long as we got > phy register 1 has no link indication (BMSR != 0x24) > * expand the 'first run' flag handling in ll_temac_init() in > respect to possible error detection in xps_ll_temac_phy_ctrl() > > Signed-off-by: Stephan Linz > --- > drivers/net/xilinx_ll_temac.c | 52 ++++++++++++++++++++++++++++++----------- > 1 files changed, 38 insertions(+), 14 deletions(-) > > diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c > index 72a1632..ff93c1f 100644 > --- a/drivers/net/xilinx_ll_temac.c > +++ b/drivers/net/xilinx_ll_temac.c > @@ -225,24 +225,21 @@ static void read_phy_reg (struct eth_device *dev, int phy_addr) > #endif > > static int phy_addr = -1; > -static int link; > +static int link = 0; Static variables are always initialized to 0. I fixed this in your patch. Added to microblaze custodian repository. Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian