Commit 4b23a554 authored by Jens Osterkamp's avatar Jens Osterkamp Committed by Jeff Garzik

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: default avatarJens Osterkamp <jens@de.ibm.com>
Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent fc8e13da
...@@ -1909,26 +1909,26 @@ static void spider_net_link_phy(unsigned long data) ...@@ -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); pr_info("%s: link is down trying to bring it up\n", card->netdev->name);
switch (phy->medium) { switch (card->medium) {
case GMII_COPPER: case BCM54XX_COPPER:
/* enable fiber with autonegotiation first */ /* enable fiber with autonegotiation first */
if (phy->def->ops->enable_fiber) if (phy->def->ops->enable_fiber)
phy->def->ops->enable_fiber(phy, 1); phy->def->ops->enable_fiber(phy, 1);
phy->medium = GMII_FIBER; card->medium = BCM54XX_FIBER;
break; break;
case GMII_FIBER: case BCM54XX_FIBER:
/* fiber didn't come up, try to disable fiber autoneg */ /* fiber didn't come up, try to disable fiber autoneg */
if (phy->def->ops->enable_fiber) if (phy->def->ops->enable_fiber)
phy->def->ops->enable_fiber(phy, 0); phy->def->ops->enable_fiber(phy, 0);
phy->medium = GMII_UNKNOWN; card->medium = BCM54XX_UNKNOWN;
break; break;
case GMII_UNKNOWN: case BCM54XX_UNKNOWN:
/* copper, fiber with and without failed, /* copper, fiber with and without failed,
* retry from beginning */ * retry from beginning */
spider_net_setup_aneg(card); spider_net_setup_aneg(card);
phy->medium = GMII_COPPER; card->medium = BCM54XX_COPPER;
break; break;
} }
......
...@@ -444,6 +444,8 @@ struct spider_net_card { ...@@ -444,6 +444,8 @@ struct spider_net_card {
struct pci_dev *pdev; struct pci_dev *pdev;
struct mii_phy phy; struct mii_phy phy;
int medium;
void __iomem *regs; void __iomem *regs;
struct spider_net_descr_chain tx_chain; struct spider_net_descr_chain tx_chain;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment