Skip to content

Commit

Permalink
spidernet: remove unnecessary accesses to phy
Browse files Browse the repository at this point in the history
This patch removes unnecessary accesses to phy registers.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Ishizaki Kou authored and Jeff Garzik committed May 11, 2007
1 parent 491976b commit a1c38a4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/net/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,10 @@ spider_net_setup_aneg(struct spider_net_card *card)
{
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;
Expand Down

0 comments on commit a1c38a4

Please sign in to comment.