
3 Dec
2010
3 Dec
'10
9:48 a.m.
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 linz@li-pro.net
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