Matthew Hilder

Bug in fec.c linux 2.6.31 sdk L2.6.31_09.12.01_SDK_SOURCE

Discussion created by Matthew Hilder on Nov 4, 2011
Latest reply on Nov 9, 2011 by Fabio Estevam

file linux-2.6.31/drivers/net/fec.c

The fec_set_mac_address function has a line:

writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24),
        fep + FEC_ADDR_HIGH);

which should read:

writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24),
        fep->hwp + FEC_ADDR_HIGH);

Writing to fep + FEC_ADDR_HIGH causes strange crashes and it took some time to find it was this function clobbering some-one else's data.

 

I hope this helps some-one.

 

 Matt.

Outcomes