projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
generic: ar8216: add setup_port field to ar8xxx_chip
[openwrt.git]
/
target
/
linux
/
generic
/
files
/
drivers
/
net
/
phy
/
rtl8306.c
diff --git
a/target/linux/generic/files/drivers/net/phy/rtl8306.c
b/target/linux/generic/files/drivers/net/phy/rtl8306.c
index
87c661a
..
78ded0a
100644
(file)
--- a/
target/linux/generic/files/drivers/net/phy/rtl8306.c
+++ b/
target/linux/generic/files/drivers/net/phy/rtl8306.c
@@
-56,6
+56,7
@@
struct rtl_priv {
int do_cpu;
struct mii_bus *bus;
char hwname[sizeof(RTL_NAME_UNKNOWN)];
int do_cpu;
struct mii_bus *bus;
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;
u16 pgsel;
struct mii_bus *bus = priv->bus;
u16 pgsel;
+ if (priv->fixup)
+ return;
+
if (priv->page == page)
return;
if (priv->page == page)
return;
@@
-829,7
+833,7
@@
static struct switch_attr rtl_vlan[] = {
{
RTL_VLAN_REGATTR(VID),
.name = "vid",
{
RTL_VLAN_REGATTR(VID),
.name = "vid",
- .description = "VLAN ID",
+ .description = "VLAN ID
(1-4095)
",
.max = 4095,
},
};
.max = 4095,
},
};
@@
-923,6
+927,8
@@
rtl8306_fixup(struct phy_device *pdev)
if (pdev->addr != 0 && pdev->addr != 4)
return 0;
if (pdev->addr != 0 && pdev->addr != 4)
return 0;
+ memset(&priv, 0, sizeof(priv));
+ priv.fixup = true;
priv.page = -1;
priv.bus = pdev->bus;
chipid = rtl_get(&priv.dev, RTL_REG_CHIPID);
priv.page = -1;
priv.bus = pdev->bus;
chipid = rtl_get(&priv.dev, RTL_REG_CHIPID);
This page took
0.02544 seconds
and
4
git commands to generate.