16 static int my3126_interrupt_enable(
struct cphy *
cphy)
23 static int my3126_interrupt_disable(
struct cphy *
cphy)
29 static int my3126_interrupt_clear(
struct cphy *
cphy)
34 #define OFFSET(REG_ADDR) (REG_ADDR << 2)
36 static int my3126_interrupt_handler(
struct cphy *
cphy)
45 if (cphy->
count == 50) {
48 status = cphy->
bmsr ^ val16;
72 if ( (val & (1 << 8)) || (val & (1 << 19)) ||
100 my3126_interrupt_handler(cphy);
103 static int my3126_set_loopback(
struct cphy *
cphy,
int on)
109 static int my3126_get_link_status(
struct cphy *
cphy,
110 int *link_ok,
int *speed,
int *
duplex,
int *
fc)
152 static void my3126_destroy(
struct cphy *cphy)
157 static struct cphy_ops my3126_ops = {
158 .destroy = my3126_destroy,
159 .reset = my3126_reset,
160 .interrupt_enable = my3126_interrupt_enable,
161 .interrupt_disable = my3126_interrupt_disable,
162 .interrupt_clear = my3126_interrupt_clear,
163 .interrupt_handler = my3126_interrupt_handler,
164 .get_link_status = my3126_get_link_status,
165 .set_loopback = my3126_set_loopback,
170 static struct cphy *my3126_phy_create(
struct net_device *
dev,
173 struct cphy *cphy = kzalloc(
sizeof (*cphy),
GFP_KERNEL);
178 cphy_init(cphy, dev, phy_addr, &my3126_ops, mdio_ops);
186 static int my3126_phy_reset(
adapter_t * adapter)
207 .create = my3126_phy_create,
208 .reset = my3126_phy_reset