summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Osterkamp <jens@de.ibm.com>2007-02-20 16:39:13 -0600
committerJeff Garzik <jeff@garzik.org>2007-02-27 04:16:03 -0500
commit4b23a554db1571306d9e9cfb2321c3a44770371e (patch)
treef99461eb7063c4423a6e4fcd05860d49cdc1de53
parentfc8e13da9118b2d45642c2a8bdbdd0448d9f6d04 (diff)
downloadconfigs-4b23a554db1571306d9e9cfb2321c3a44770371e.tar.gz
spidernet: move medium variable into card struct
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>
-rw-r--r--drivers/net/spider_net.c14
-rw-r--r--drivers/net/spider_net.h2
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index c5d2cb834c0..e4a9bdd8d77 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -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;
}
diff --git a/drivers/net/spider_net.h b/drivers/net/spider_net.h
index e072a7cb66f..f7d1310ff47 100644
--- a/drivers/net/spider_net.h
+++ b/drivers/net/spider_net.h
@@ -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;