[Cbe-oss-dev] [PATCH] spidernet: remove unnecessary accesses to phy
Ishizaki Kou
kou.ishizaki at toshiba.co.jp
Wed May 9 17:30:07 EST 2007
This patch removes unnecessary accesses to phy registers.
Signed-off-by: Kou Ishizaki <kou.ishizaki at toshiba.co.jp>
---
Index: linux-powerpc-git/drivers/net/spider_net.c
diff -u linux-powerpc-git/drivers/net/spider_net.c:1.1.1.9 linux-powerpc-git/drivers/net/spider_net.c:1.14
--- linux-powerpc-git/drivers/net/spider_net.c:1.1.1.9 Tue May 8 09:41:28 2007
+++ linux-powerpc-git/drivers/net/spider_net.c Tue May 8 10:16:59 2007
@@ -175,12 +175,10 @@
{
struct mii_phy *phy = &card->phy;
u32 advertise = 0;
- u16 bmcr, bmsr, stat1000, estat;
+ u16 bmsr, estat;
- bmcr = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMCR);
- bmsr = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMSR);
- stat1000 = spider_net_read_phy(card->netdev, phy->mii_id, MII_STAT1000);
- estat = spider_net_read_phy(card->netdev, phy->mii_id, MII_ESTATUS);
+ bmsr = spider_net_read_phy(card->netdev, phy->mii_id, MII_BMSR);
+ estat = spider_net_read_phy(card->netdev, phy->mii_id, MII_ESTATUS);
if (bmsr & BMSR_10HALF)
advertise |= ADVERTISED_10baseT_Half;
More information about the cbe-oss-dev
mailing list