mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-06 09:21:26 +01:00
The 'get_phy_driver' code in 'drivers/net/phy/phy.c' uses the following
method to determine which driver is to be loaded for a particular PHY
module:
list_for_each(entry, &phy_drivers) {
drv = list_entry(entry, struct phy_driver, list);
if ((drv->uid & drv->mask) == (phy_id & drv->mask))
return drv;
}
This means that a drv->mask of 0xfffff0 will return incorrect phy driver
for the logic above, even if the drv->uid is anything other than
something ending with a 0x0.
For e.g. if the RTL8211E drv->uid is 0x1cc915 and drv->mask is 0xffffff
and the RTL8211B drv->uid is 0x1cc910 and drv->mask is 0xffffff0, then
the phy driver selected will always be RTL8211B even though the
underlying phy connected on the board is a 8211E module.
This patch fixes this issue.
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
|
||
|---|---|---|
| .. | ||
| atheros.c | ||
| broadcom.c | ||
| davicom.c | ||
| et1011c.c | ||
| generic_10g.c | ||
| icplus.c | ||
| lxt.c | ||
| Makefile | ||
| marvell.c | ||
| micrel.c | ||
| miiphybb.c | ||
| mv88e61xx.c | ||
| mv88e61xx.h | ||
| mv88e6352.c | ||
| natsemi.c | ||
| phy.c | ||
| realtek.c | ||
| smsc.c | ||
| teranetics.c | ||
| vitesse.c | ||