public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: linas@austin•ibm.com (Linas Vepstas)
To: Jeff Garzik <jgarzik@pobox•com>
Cc: netdev@vger•kernel.org, cbe-oss-dev@ozlabs•org,
	Ishizaki Kou <kou.ishizaki@toshiba•co.jp>
Subject: [PATCH] spidernet: remove unnecessary accesses to phy
Date: Thu, 10 May 2007 12:18:48 -0500	[thread overview]
Message-ID: <20070510171848.GD4452@austin.ibm.com> (raw)



Jeff, please apply for 2.6.22; This is a purely janitorial patch.

(I will have additonal patches for the spidernet in a few days;
I'm still debugging a rather nasty hang.)

--linas


From: Ishizaki Kou <kou.ishizaki@toshiba•co.jp>

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>

----
 drivers/net/spider_net.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Index: linux-2.6.21-rc7-mm2/drivers/net/spider_net.c
===================================================================
--- linux-2.6.21-rc7-mm2.orig/drivers/net/spider_net.c	2007-05-09 14:19:29.000000000 -0500
+++ linux-2.6.21-rc7-mm2/drivers/net/spider_net.c	2007-05-09 14:20:28.000000000 -0500
@@ -175,12 +175,10 @@ spider_net_setup_aneg(struct spider_net_
 {
 	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;

             reply	other threads:[~2007-05-10 17:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 17:18 Linas Vepstas [this message]
2007-05-11 20:56 ` [PATCH] spidernet: remove unnecessary accesses to phy Jeff Garzik
2007-05-12  0:23   ` Linas Vepstas
2007-05-12  0:36     ` Jeff Garzik
2007-05-12  1:13       ` Linas Vepstas
  -- strict thread matches above, loose matches on Subject: below --
2007-05-09  7:30 Ishizaki Kou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070510171848.GD4452@austin.ibm.com \
    --to=linas@austin$(echo .)ibm.com \
    --cc=cbe-oss-dev@ozlabs$(echo .)org \
    --cc=jgarzik@pobox$(echo .)com \
    --cc=kou.ishizaki@toshiba$(echo .)co.jp \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox