From: Steve Glendinning <steve.glendinning@shawell.net>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Steve Glendinning <steve.glendinning@shawell.net>
Subject: [PATCH 2/3] smsc75xx: eliminate unnecessary phy register read
Date: Fri, 4 May 2012 11:57:12 +0100 [thread overview]
Message-ID: <1336129033-15826-3-git-send-email-steve.glendinning@shawell.net> (raw)
In-Reply-To: <1336129033-15826-1-git-send-email-steve.glendinning@shawell.net>
Only a write is necessary to clear the interrupt status, and we
don't use the value from the preceding read operation. This
patch eliminates the unnecessary read.
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
---
drivers/net/usb/smsc75xx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index ecab87b..72b62b5 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -508,9 +508,7 @@ static int smsc75xx_link_reset(struct usbnet *dev)
u16 lcladv, rmtadv;
int ret;
- /* read and write to clear phy interrupt status */
- ret = smsc75xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC);
- check_warn_return(ret, "Error reading PHY_INT_SRC");
+ /* write to clear phy interrupt status */
smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC,
PHY_INT_SRC_CLEAR_ALL);
--
1.7.9.5
next prev parent reply other threads:[~2012-05-04 10:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-04 10:57 [PATCH 0/3] smsc75xx: more minor fixes Steve Glendinning
2012-05-04 10:57 ` [PATCH 1/3] smsc75xx: replace 0xffff with PHY_INT_SRC_CLEAR_ALL Steve Glendinning
2012-05-04 10:57 ` Steve Glendinning [this message]
2012-05-04 10:57 ` [PATCH 3/3] smsc75xx: let EEPROM determine GPIO/LED settings Steve Glendinning
2012-05-08 3:44 ` [PATCH 0/3] smsc75xx: more minor fixes David Miller
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=1336129033-15826-3-git-send-email-steve.glendinning@shawell.net \
--to=steve.glendinning@shawell.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).