Fix numerous minor problems with new phy subsystem.
authorJeff Garzik <jgarzik@pobox.com>
Thu, 11 Aug 2005 06:07:25 +0000 (02:07 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 11 Aug 2005 06:07:25 +0000 (02:07 -0400)
Includes fixes for problems noted by Adrian Bunk, Andrew Morton,
and one other person lost in the annals of history (and email folders).

drivers/net/phy/Kconfig
drivers/net/phy/Makefile
drivers/net/phy/mdio_bus.c
drivers/net/phy/phy.c
drivers/net/phy/phy.c.orig [deleted file]
drivers/net/phy/phy_device.c
include/linux/phy.h

index 8b5db23..c2f1bf1 100644 (file)
@@ -5,7 +5,7 @@
 menu "PHY device support"
 
 config PHYLIB
-       bool "PHY Device support and infrastructure"
+       tristate "PHY Device support and infrastructure"
        depends on NET_ETHERNET
        help
          Ethernet controllers are usually attached to PHY
@@ -24,31 +24,31 @@ comment "MII PHY device drivers"
        depends on PHYLIB
 
 config MARVELL_PHY
-       bool "Drivers for Marvell PHYs"
+       tristate "Drivers for Marvell PHYs"
        depends on PHYLIB
        ---help---
          Currently has a driver for the 88E1011S
        
 config DAVICOM_PHY
-       bool "Drivers for Davicom PHYs"
+       tristate "Drivers for Davicom PHYs"
        depends on PHYLIB
        ---help---
          Currently supports dm9161e and dm9131
 
 config QSEMI_PHY
-       bool "Drivers for Quality Semiconductor PHYs"
+       tristate "Drivers for Quality Semiconductor PHYs"
        depends on PHYLIB
        ---help---
          Currently supports the qs6612
 
 config LXT_PHY
-       bool "Drivers for the Intel LXT PHYs"
+       tristate "Drivers for the Intel LXT PHYs"
        depends on PHYLIB
        ---help---
          Currently supports the lxt970, lxt971
 
 config CICADA_PHY
-       bool "Drivers for the Cicada PHYs"
+       tristate "Drivers for the Cicada PHYs"
        depends on PHYLIB
        ---help---
          Currently supports the cis8204
index 1af05de..fb7cb38 100644 (file)
@@ -1,9 +1,9 @@
 # Makefile for Linux PHY drivers
 
-obj-$(CONFIG_PHYLIB) += phy.o phy_device.o mdio_bus.o
+libphy-objs                    := phy.o phy_device.o mdio_bus.o
 
-obj-$(CONFIG_MARVELL_PHY) += marvell.o
-obj-$(CONFIG_DAVICOM_PHY) += davicom.o
-obj-$(CONFIG_CICADA_PHY) += cicada.o
-obj-$(CONFIG_LXT_PHY) += lxt.o
-obj-$(CONFIG_QSEMI_PHY) += qsemi.o
+obj-$(CONFIG_MARVELL_PHY)      += libphy.o marvell.o
+obj-$(CONFIG_DAVICOM_PHY)      += libphy.o davicom.o
+obj-$(CONFIG_CICADA_PHY)       += libphy.o cicada.o
+obj-$(CONFIG_LXT_PHY)          += libphy.o lxt.o
+obj-$(CONFIG_QSEMI_PHY)                += libphy.o qsemi.o
index e75103b..5fbea6a 100644 (file)
@@ -165,9 +165,9 @@ struct bus_type mdio_bus_type = {
        .resume         = mdio_bus_resume,
 };
 
-static int __init mdio_bus_init(void)
+int __init mdio_bus_init(void)
 {
        return bus_register(&mdio_bus_type);
 }
 
-subsys_initcall(mdio_bus_init);
+
index e2c6896..934065d 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 
-static void phy_change(void *data);
 static void phy_timer(unsigned long data);
 
 /* Convenience function to print out the current phy status
@@ -464,7 +463,6 @@ void phy_stop_machine(struct phy_device *phydev)
        phydev->adjust_state = NULL;
 }
 
-#ifdef CONFIG_PHYCONTROL
 /* phy_error:
  *
  * Moves the PHY to the HALTED state in response to a read
@@ -479,6 +477,10 @@ void phy_error(struct phy_device *phydev)
        spin_unlock(&phydev->lock);
 }
 
+#ifdef CONFIG_PHYCONTROL
+
+static void phy_change(void *data);
+
 /* phy_interrupt
  *
  * description: When a PHY interrupt occurs, the handler disables
@@ -672,6 +674,8 @@ void phy_start(struct phy_device *phydev)
 EXPORT_SYMBOL(phy_stop);
 EXPORT_SYMBOL(phy_start);
 
+#endif /* CONFIG_PHYCONTROL */
+
 /* PHY timer which handles the state machine */
 static void phy_timer(unsigned long data)
 {
@@ -859,4 +863,3 @@ static void phy_timer(unsigned long data)
        mod_timer(&phydev->phy_timer, jiffies + PHY_STATE_TIME * HZ);
 }
 
-#endif /* CONFIG_PHYCONTROL */
diff --cc drivers/net/phy/phy.c.orig
Simple merge
Simple merge
Simple merge