diff options
| author | Roland Dreier <rolandd@cisco.com> | 2005-10-28 18:50:51 -0400 |
|---|---|---|
| committer | Roland Dreier <rolandd@cisco.com> | 2005-10-28 18:50:51 -0400 |
| commit | a4da0628efd788eb199dd9df225e296035ec2539 (patch) | |
| tree | 1e611030c993e1480dc2f07f26976d2d33002b0d /drivers/net/phy | |
| parent | 70a30e16a8a9d22396a4d1e96af86e43594df584 (diff) | |
| parent | 20731945ae743034353a88c307920d1f16cf8ac8 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net/phy')
| -rw-r--r-- | drivers/net/phy/Kconfig | 8 | ||||
| -rw-r--r-- | drivers/net/phy/mdio_bus.c | 20 | ||||
| -rw-r--r-- | drivers/net/phy/phy.c | 8 | ||||
| -rw-r--r-- | drivers/net/phy/phy_device.c | 3 |
4 files changed, 6 insertions, 33 deletions
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 14f4de1a8180..c782a6329805 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig | |||
| @@ -12,14 +12,6 @@ config PHYLIB | |||
| 12 | devices. This option provides infrastructure for | 12 | devices. This option provides infrastructure for |
| 13 | managing PHY devices. | 13 | managing PHY devices. |
| 14 | 14 | ||
| 15 | config PHYCONTROL | ||
| 16 | bool " Support for automatically handling PHY state changes" | ||
| 17 | depends on PHYLIB | ||
| 18 | help | ||
| 19 | Adds code to perform all the work for keeping PHY link | ||
| 20 | state (speed/duplex/etc) up-to-date. Also handles | ||
| 21 | interrupts. | ||
| 22 | |||
| 23 | comment "MII PHY device drivers" | 15 | comment "MII PHY device drivers" |
| 24 | depends on PHYLIB | 16 | depends on PHYLIB |
| 25 | 17 | ||
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 90630672703d..ad93b0da87f0 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
| @@ -133,13 +133,9 @@ static int mdio_bus_suspend(struct device * dev, pm_message_t state) | |||
| 133 | int ret = 0; | 133 | int ret = 0; |
| 134 | struct device_driver *drv = dev->driver; | 134 | struct device_driver *drv = dev->driver; |
| 135 | 135 | ||
| 136 | if (drv && drv->suspend) { | 136 | if (drv && drv->suspend) |
| 137 | ret = drv->suspend(dev, state, SUSPEND_DISABLE); | 137 | ret = drv->suspend(dev, state); |
| 138 | if (ret == 0) | 138 | |
| 139 | ret = drv->suspend(dev, state, SUSPEND_SAVE_STATE); | ||
| 140 | if (ret == 0) | ||
| 141 | ret = drv->suspend(dev, state, SUSPEND_POWER_DOWN); | ||
| 142 | } | ||
| 143 | return ret; | 139 | return ret; |
| 144 | } | 140 | } |
| 145 | 141 | ||
| @@ -148,13 +144,9 @@ static int mdio_bus_resume(struct device * dev) | |||
| 148 | int ret = 0; | 144 | int ret = 0; |
| 149 | struct device_driver *drv = dev->driver; | 145 | struct device_driver *drv = dev->driver; |
| 150 | 146 | ||
| 151 | if (drv && drv->resume) { | 147 | if (drv && drv->resume) |
| 152 | ret = drv->resume(dev, RESUME_POWER_ON); | 148 | ret = drv->resume(dev); |
| 153 | if (ret == 0) | 149 | |
| 154 | ret = drv->resume(dev, RESUME_RESTORE_STATE); | ||
| 155 | if (ret == 0) | ||
| 156 | ret = drv->resume(dev, RESUME_ENABLE); | ||
| 157 | } | ||
| 158 | return ret; | 150 | return ret; |
| 159 | } | 151 | } |
| 160 | 152 | ||
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index d9e11f93bf3a..9209da9dde0d 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
| @@ -242,10 +242,6 @@ EXPORT_SYMBOL(phy_sanitize_settings); | |||
| 242 | * choose the next best ones from the ones selected, so we don't | 242 | * choose the next best ones from the ones selected, so we don't |
| 243 | * care if ethtool tries to give us bad values | 243 | * care if ethtool tries to give us bad values |
| 244 | * | 244 | * |
| 245 | * A note about the PHYCONTROL Layer. If you turn off | ||
| 246 | * CONFIG_PHYCONTROL, you will need to read the PHY status | ||
| 247 | * registers after this function completes, and update your | ||
| 248 | * controller manually. | ||
| 249 | */ | 245 | */ |
| 250 | int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) | 246 | int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) |
| 251 | { | 247 | { |
| @@ -380,7 +376,6 @@ int phy_start_aneg(struct phy_device *phydev) | |||
| 380 | 376 | ||
| 381 | err = phydev->drv->config_aneg(phydev); | 377 | err = phydev->drv->config_aneg(phydev); |
| 382 | 378 | ||
| 383 | #ifdef CONFIG_PHYCONTROL | ||
| 384 | if (err < 0) | 379 | if (err < 0) |
| 385 | goto out_unlock; | 380 | goto out_unlock; |
| 386 | 381 | ||
| @@ -395,14 +390,12 @@ int phy_start_aneg(struct phy_device *phydev) | |||
| 395 | } | 390 | } |
| 396 | 391 | ||
| 397 | out_unlock: | 392 | out_unlock: |
| 398 | #endif | ||
| 399 | spin_unlock(&phydev->lock); | 393 | spin_unlock(&phydev->lock); |
| 400 | return err; | 394 | return err; |
| 401 | } | 395 | } |
| 402 | EXPORT_SYMBOL(phy_start_aneg); | 396 | EXPORT_SYMBOL(phy_start_aneg); |
| 403 | 397 | ||
| 404 | 398 | ||
| 405 | #ifdef CONFIG_PHYCONTROL | ||
| 406 | static void phy_change(void *data); | 399 | static void phy_change(void *data); |
| 407 | static void phy_timer(unsigned long data); | 400 | static void phy_timer(unsigned long data); |
| 408 | 401 | ||
| @@ -868,4 +861,3 @@ static void phy_timer(unsigned long data) | |||
| 868 | mod_timer(&phydev->phy_timer, jiffies + PHY_STATE_TIME * HZ); | 861 | mod_timer(&phydev->phy_timer, jiffies + PHY_STATE_TIME * HZ); |
| 869 | } | 862 | } |
| 870 | 863 | ||
| 871 | #endif /* CONFIG_PHYCONTROL */ | ||
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 33f7bdb5857c..6da1aa0706a1 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
| @@ -101,7 +101,6 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr) | |||
| 101 | return dev; | 101 | return dev; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | #ifdef CONFIG_PHYCONTROL | ||
| 105 | /* phy_prepare_link: | 104 | /* phy_prepare_link: |
| 106 | * | 105 | * |
| 107 | * description: Tells the PHY infrastructure to handle the | 106 | * description: Tells the PHY infrastructure to handle the |
| @@ -160,8 +159,6 @@ void phy_disconnect(struct phy_device *phydev) | |||
| 160 | } | 159 | } |
| 161 | EXPORT_SYMBOL(phy_disconnect); | 160 | EXPORT_SYMBOL(phy_disconnect); |
| 162 | 161 | ||
| 163 | #endif /* CONFIG_PHYCONTROL */ | ||
| 164 | |||
| 165 | /* phy_attach: | 162 | /* phy_attach: |
| 166 | * | 163 | * |
| 167 | * description: Called by drivers to attach to a particular PHY | 164 | * description: Called by drivers to attach to a particular PHY |
