[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200702122137.15309.jens@de.ibm.com>
Date: Mon, 12 Feb 2007 21:37:15 +0100
From: Jens Osterkamp <jens@...ibm.com>
To: jgarzik@...ox.com
Cc: benh@...nel.crashing.org, Linas Vepstas <linas@...tin.ibm.com>,
James K Lewis <jim@...ewis.com>,
Ishizaki Kou <kou.ishizaki@...hiba.co.jp>,
netdev@...r.kernel.org, cbe-oss-dev@...abs.org
Subject: [PATCH] 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@...ibm.com>
---
Index: linux-2.6.20/drivers/net/spider_net.c
===================================================================
--- linux-2.6.20.orig/drivers/net/spider_net.c
+++ linux-2.6.20/drivers/net/spider_net.c
@@ -1912,26 +1912,26 @@ static void spider_net_link_phy(unsigned
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: linux-2.6.20/drivers/net/spider_net.h
===================================================================
--- linux-2.6.20.orig/drivers/net/spider_net.h
+++ linux-2.6.20/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;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists