* [PATCH] spidernet: move medium variable into card struct
@ 2007-02-12 20:37 Jens Osterkamp
2007-02-12 23:28 ` Linas Vepstas
0 siblings, 1 reply; 2+ messages in thread
From: Jens Osterkamp @ 2007-02-12 20:37 UTC (permalink / raw)
To: jgarzik
Cc: benh, Linas Vepstas, James K Lewis, Ishizaki Kou, netdev, cbe-oss-dev
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>
---
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] spidernet: move medium variable into card struct
2007-02-12 20:37 [PATCH] spidernet: move medium variable into card struct Jens Osterkamp
@ 2007-02-12 23:28 ` Linas Vepstas
0 siblings, 0 replies; 2+ messages in thread
From: Linas Vepstas @ 2007-02-12 23:28 UTC (permalink / raw)
To: Jens Osterkamp
Cc: jgarzik, benh, James K Lewis, Ishizaki Kou, netdev, cbe-oss-dev
On Mon, Feb 12, 2007 at 09:37:15PM +0100, Jens Osterkamp wrote:
> 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>
Boot-tested the patch, it works for me
Acked-by: Linas Vepstas <linas@austin.ibm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-12 23:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 20:37 [PATCH] spidernet: move medium variable into card struct Jens Osterkamp
2007-02-12 23:28 ` Linas Vepstas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.