diff options
Diffstat (limited to 'drivers/net/chelsio/my3126.c')
-rw-r--r-- | drivers/net/chelsio/my3126.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/chelsio/my3126.c b/drivers/net/chelsio/my3126.c index 040acd29995a..4c6028512d10 100644 --- a/drivers/net/chelsio/my3126.c +++ b/drivers/net/chelsio/my3126.c | |||
@@ -43,11 +43,11 @@ static int my3126_interrupt_handler(struct cphy *cphy) | |||
43 | adapter = cphy->adapter; | 43 | adapter = cphy->adapter; |
44 | 44 | ||
45 | if (cphy->count == 50) { | 45 | if (cphy->count == 50) { |
46 | mdio_read(cphy, 0x1, 0x1, &val); | 46 | cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val); |
47 | val16 = (u16) val; | 47 | val16 = (u16) val; |
48 | status = cphy->bmsr ^ val16; | 48 | status = cphy->bmsr ^ val16; |
49 | 49 | ||
50 | if (status & BMSR_LSTATUS) | 50 | if (status & MDIO_STAT1_LSTATUS) |
51 | t1_link_changed(adapter, 0); | 51 | t1_link_changed(adapter, 0); |
52 | cphy->bmsr = val16; | 52 | cphy->bmsr = val16; |
53 | 53 | ||
@@ -114,14 +114,14 @@ static int my3126_get_link_status(struct cphy *cphy, | |||
114 | adapter_t *adapter; | 114 | adapter_t *adapter; |
115 | 115 | ||
116 | adapter = cphy->adapter; | 116 | adapter = cphy->adapter; |
117 | mdio_read(cphy, 0x1, 0x1, &val); | 117 | cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val); |
118 | val16 = (u16) val; | 118 | val16 = (u16) val; |
119 | 119 | ||
120 | /* Populate elmer_gpo with the register value */ | 120 | /* Populate elmer_gpo with the register value */ |
121 | t1_tpi_read(adapter, A_ELMER0_GPO, &val); | 121 | t1_tpi_read(adapter, A_ELMER0_GPO, &val); |
122 | cphy->elmer_gpo = val; | 122 | cphy->elmer_gpo = val; |
123 | 123 | ||
124 | *link_ok = (val16 & BMSR_LSTATUS); | 124 | *link_ok = (val16 & MDIO_STAT1_LSTATUS); |
125 | 125 | ||
126 | if (*link_ok) { | 126 | if (*link_ok) { |
127 | /* Turn on the LED. */ | 127 | /* Turn on the LED. */ |
@@ -163,9 +163,11 @@ static struct cphy_ops my3126_ops = { | |||
163 | .interrupt_handler = my3126_interrupt_handler, | 163 | .interrupt_handler = my3126_interrupt_handler, |
164 | .get_link_status = my3126_get_link_status, | 164 | .get_link_status = my3126_get_link_status, |
165 | .set_loopback = my3126_set_loopback, | 165 | .set_loopback = my3126_set_loopback, |
166 | .mmds = (MDIO_DEVS_PMAPMD | MDIO_DEVS_PCS | | ||
167 | MDIO_DEVS_PHYXS), | ||
166 | }; | 168 | }; |
167 | 169 | ||
168 | static struct cphy *my3126_phy_create(adapter_t *adapter, | 170 | static struct cphy *my3126_phy_create(struct net_device *dev, |
169 | int phy_addr, const struct mdio_ops *mdio_ops) | 171 | int phy_addr, const struct mdio_ops *mdio_ops) |
170 | { | 172 | { |
171 | struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL); | 173 | struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL); |
@@ -173,7 +175,7 @@ static struct cphy *my3126_phy_create(adapter_t *adapter, | |||
173 | if (!cphy) | 175 | if (!cphy) |
174 | return NULL; | 176 | return NULL; |
175 | 177 | ||
176 | cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); | 178 | cphy_init(cphy, dev, phy_addr, &my3126_ops, mdio_ops); |
177 | INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); | 179 | INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); |
178 | cphy->bmsr = 0; | 180 | cphy->bmsr = 0; |
179 | 181 | ||