mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 20:29:41 +02:00
rtl8306: do not overwrite registers in the phy fixup, it could mess up other switches (fixes #8911), backport of r26410
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@26411 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
16ec0a70b3
commit
3e9da9b162
@ -56,6 +56,7 @@ struct rtl_priv {
|
|||||||
int do_cpu;
|
int do_cpu;
|
||||||
struct mii_bus *bus;
|
struct mii_bus *bus;
|
||||||
char hwname[sizeof(RTL_NAME_UNKNOWN)];
|
char hwname[sizeof(RTL_NAME_UNKNOWN)];
|
||||||
|
bool fixup;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rtl_phyregs {
|
struct rtl_phyregs {
|
||||||
@ -256,6 +257,9 @@ rtl_set_page(struct rtl_priv *priv, unsigned int page)
|
|||||||
struct mii_bus *bus = priv->bus;
|
struct mii_bus *bus = priv->bus;
|
||||||
u16 pgsel;
|
u16 pgsel;
|
||||||
|
|
||||||
|
if (priv->fixup)
|
||||||
|
return;
|
||||||
|
|
||||||
if (priv->page == page)
|
if (priv->page == page)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -923,6 +927,8 @@ rtl8306_fixup(struct phy_device *pdev)
|
|||||||
if (pdev->addr != 0 && pdev->addr != 4)
|
if (pdev->addr != 0 && pdev->addr != 4)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
memset(&priv, 0, sizeof(priv));
|
||||||
|
priv.fixup = true;
|
||||||
priv.page = -1;
|
priv.page = -1;
|
||||||
priv.bus = pdev->bus;
|
priv.bus = pdev->bus;
|
||||||
chipid = rtl_get(&priv.dev, RTL_REG_CHIPID);
|
chipid = rtl_get(&priv.dev, RTL_REG_CHIPID);
|
||||||
|
Loading…
Reference in New Issue
Block a user