diff options
author | Divy Le Ray <divy@chelsio.com> | 2008-10-08 20:38:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 20:38:01 -0400 |
commit | 78e4689e908adc8334272756c32c9218d1967408 (patch) | |
tree | 7fdc979df5345b3b45ab2d5c46467ad3415800c1 /drivers/net/cxgb3/ael1002.c | |
parent | 8c26376112fb4b8dfea42069b602c03d53366052 (diff) |
cxgb3: allow for PHY reset status
First step towards overall PHY layering re-organization.
Allow a status return when a PHY is reset.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb3/ael1002.c')
-rw-r--r-- | drivers/net/cxgb3/ael1002.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/cxgb3/ael1002.c b/drivers/net/cxgb3/ael1002.c index ee140e63ddc5..bf22e56429fb 100644 --- a/drivers/net/cxgb3/ael1002.c +++ b/drivers/net/cxgb3/ael1002.c | |||
@@ -119,11 +119,12 @@ static struct cphy_ops ael1002_ops = { | |||
119 | .power_down = ael1002_power_down, | 119 | .power_down = ael1002_power_down, |
120 | }; | 120 | }; |
121 | 121 | ||
122 | void t3_ael1002_phy_prep(struct cphy *phy, struct adapter *adapter, | 122 | int t3_ael1002_phy_prep(struct cphy *phy, struct adapter *adapter, |
123 | int phy_addr, const struct mdio_ops *mdio_ops) | 123 | int phy_addr, const struct mdio_ops *mdio_ops) |
124 | { | 124 | { |
125 | cphy_init(phy, adapter, phy_addr, &ael1002_ops, mdio_ops); | 125 | cphy_init(phy, adapter, phy_addr, &ael1002_ops, mdio_ops); |
126 | ael100x_txon(phy); | 126 | ael100x_txon(phy); |
127 | return 0; | ||
127 | } | 128 | } |
128 | 129 | ||
129 | static int ael1006_reset(struct cphy *phy, int wait) | 130 | static int ael1006_reset(struct cphy *phy, int wait) |
@@ -174,11 +175,12 @@ static struct cphy_ops ael1006_ops = { | |||
174 | .power_down = ael1006_power_down, | 175 | .power_down = ael1006_power_down, |
175 | }; | 176 | }; |
176 | 177 | ||
177 | void t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter, | 178 | int t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter, |
178 | int phy_addr, const struct mdio_ops *mdio_ops) | 179 | int phy_addr, const struct mdio_ops *mdio_ops) |
179 | { | 180 | { |
180 | cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops); | 181 | cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops); |
181 | ael100x_txon(phy); | 182 | ael100x_txon(phy); |
183 | return 0; | ||
182 | } | 184 | } |
183 | 185 | ||
184 | static struct cphy_ops qt2045_ops = { | 186 | static struct cphy_ops qt2045_ops = { |
@@ -191,8 +193,8 @@ static struct cphy_ops qt2045_ops = { | |||
191 | .power_down = ael1006_power_down, | 193 | .power_down = ael1006_power_down, |
192 | }; | 194 | }; |
193 | 195 | ||
194 | void t3_qt2045_phy_prep(struct cphy *phy, struct adapter *adapter, | 196 | int t3_qt2045_phy_prep(struct cphy *phy, struct adapter *adapter, |
195 | int phy_addr, const struct mdio_ops *mdio_ops) | 197 | int phy_addr, const struct mdio_ops *mdio_ops) |
196 | { | 198 | { |
197 | unsigned int stat; | 199 | unsigned int stat; |
198 | 200 | ||
@@ -205,6 +207,7 @@ void t3_qt2045_phy_prep(struct cphy *phy, struct adapter *adapter, | |||
205 | if (!phy_addr && !mdio_read(phy, MDIO_DEV_PMA_PMD, MII_BMSR, &stat) && | 207 | if (!phy_addr && !mdio_read(phy, MDIO_DEV_PMA_PMD, MII_BMSR, &stat) && |
206 | stat == 0xffff) | 208 | stat == 0xffff) |
207 | phy->addr = 1; | 209 | phy->addr = 1; |
210 | return 0; | ||
208 | } | 211 | } |
209 | 212 | ||
210 | static int xaui_direct_reset(struct cphy *phy, int wait) | 213 | static int xaui_direct_reset(struct cphy *phy, int wait) |
@@ -250,8 +253,9 @@ static struct cphy_ops xaui_direct_ops = { | |||
250 | .power_down = xaui_direct_power_down, | 253 | .power_down = xaui_direct_power_down, |
251 | }; | 254 | }; |
252 | 255 | ||
253 | void t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter, | 256 | int t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter, |
254 | int phy_addr, const struct mdio_ops *mdio_ops) | 257 | int phy_addr, const struct mdio_ops *mdio_ops) |
255 | { | 258 | { |
256 | cphy_init(phy, adapter, phy_addr, &xaui_direct_ops, mdio_ops); | 259 | cphy_init(phy, adapter, phy_addr, &xaui_direct_ops, mdio_ops); |
260 | return 0; | ||
257 | } | 261 | } |