spidernet: move medium variable into card struct
authorJens Osterkamp <jens@de.ibm.com>
Tue, 20 Feb 2007 22:39:13 +0000 (16:39 -0600)
committerJeff Garzik <jeff@garzik.org>
Tue, 27 Feb 2007 09:16:03 +0000 (04:16 -0500)
This moves the medium variable into the spidernet card structure.
It renames the GMII_ variables to BCM54XX specific ones.

Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/spider_net.c
drivers/net/spider_net.h

index c5d2cb834c09e67cfad50fcf1b42e6322e03d020..e4a9bdd8d77c37b12c0827c13b06db7687a2a413 100644 (file)
@@ -1909,26 +1909,26 @@ static void spider_net_link_phy(unsigned long data)
 
                pr_info("%s: link is down trying to bring it up\n", card->netdev->name);
 
-               switch (phy->medium) {
-               case GMII_COPPER:
+               switch (card->medium) {
+               case BCM54XX_COPPER:
                        /* enable fiber with autonegotiation first */
                        if (phy->def->ops->enable_fiber)
                                phy->def->ops->enable_fiber(phy, 1);
-                       phy->medium = GMII_FIBER;
+                       card->medium = BCM54XX_FIBER;
                        break;
 
-               case GMII_FIBER:
+               case BCM54XX_FIBER:
                        /* fiber didn't come up, try to disable fiber autoneg */
                        if (phy->def->ops->enable_fiber)
                                phy->def->ops->enable_fiber(phy, 0);
-                       phy->medium = GMII_UNKNOWN;
+                       card->medium = BCM54XX_UNKNOWN;
                        break;
 
-               case GMII_UNKNOWN:
+               case BCM54XX_UNKNOWN:
                        /* copper, fiber with and without failed,
                         * retry from beginning */
                        spider_net_setup_aneg(card);
-                       phy->medium = GMII_COPPER;
+                       card->medium = BCM54XX_COPPER;
                        break;
                }
 
index e072a7cb66f55ad351a94f41e1e1fbcb3bcf5d53..f7d1310ff47377fdbca9ac236b60c240f2c1380c 100644 (file)
@@ -444,6 +444,8 @@ struct spider_net_card {
        struct pci_dev *pdev;
        struct mii_phy phy;
 
+       int medium;
+
        void __iomem *regs;
 
        struct spider_net_descr_chain tx_chain;