48 #define MV88x2010_LINK_STATUS_BUGS 1
60 static int led_link(
struct cphy *
cphy,
u32 do_enable)
63 #define LINK_ENABLE_BIT 0x1
67 if (do_enable & LINK_ENABLE_BIT) {
68 led |= LINK_ENABLE_BIT;
71 led &= ~LINK_ENABLE_BIT;
78 static int mv88x201x_reset(
struct cphy *cphy,
int wait)
86 static int mv88x201x_interrupt_enable(
struct cphy *cphy)
93 if (t1_is_asic(cphy->
adapter)) {
103 static int mv88x201x_interrupt_disable(
struct cphy *cphy)
109 if (t1_is_asic(cphy->
adapter)) {
119 static int mv88x201x_interrupt_clear(
struct cphy *cphy)
124 #ifdef MV88x2010_LINK_STATUS_BUGS
141 #ifdef MV88x2010_LINK_STATUS_BUGS
148 if (t1_is_asic(cphy->
adapter)) {
156 static int mv88x201x_interrupt_handler(
struct cphy *cphy)
159 mv88x201x_interrupt_clear(cphy);
167 static int mv88x201x_set_loopback(
struct cphy *cphy,
int on)
172 static int mv88x201x_get_link_status(
struct cphy *cphy,
int *link_ok,
183 led_link(cphy, *link_ok);
194 static void mv88x201x_destroy(
struct cphy *cphy)
199 static struct cphy_ops mv88x201x_ops = {
200 .destroy = mv88x201x_destroy,
201 .reset = mv88x201x_reset,
202 .interrupt_enable = mv88x201x_interrupt_enable,
203 .interrupt_disable = mv88x201x_interrupt_disable,
204 .interrupt_clear = mv88x201x_interrupt_clear,
205 .interrupt_handler = mv88x201x_interrupt_handler,
206 .get_link_status = mv88x201x_get_link_status,
207 .set_loopback = mv88x201x_set_loopback,
212 static struct cphy *mv88x201x_phy_create(
struct net_device *
dev,
int phy_addr,
216 struct cphy *cphy = kzalloc(
sizeof(*cphy),
GFP_KERNEL);
221 cphy_init(cphy, dev, phy_addr, &mv88x201x_ops, mdio_ops);
258 .create = mv88x201x_phy_create,
259 .reset = mv88x201x_phy_reset