mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: liujunliang_ljl@163.com
Cc: davem@davemloft.net, horms@verge.net.au, joe@perches.com,
	gregkh@linuxfoundation.org, netdev@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	sunhecheng@vip.126.com
Subject: Re: [PATCH] USB2NET : SR9700 : One Chip USB 1.1 USB2NET SR9700 Device Driver Support
Date: Fri, 30 Aug 2013 01:06:59 +0200	[thread overview]
Message-ID: <20130829230659.GC12124@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1377746832-6201-1-git-send-email-liujunliang_ljl@163.com>

Liu, please check those.

---
 drivers/net/usb/sr9700.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 3f05b35..3ae3caf 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -99,8 +99,9 @@ static int sr_share_read_word(struct usbnet *dev, int phy, u8 reg,
 
 	mutex_lock(&dev->phy_mutex);
 
+	// FIXME: the mistery 0x40 appears in sr_share_write_word as well.
 	sr_write_reg(dev, EPAR, phy ? (reg | 0x40) : reg);
-	sr_write_reg(dev, EPCR, phy ? 0xc : 0x4);
+	sr_write_reg(dev, EPCR, phy ? (EPCR_EPOS | EPCR_ERPRR) : EPCR_ERPRR);
 
 	ret = wait_phy_eeprom_ready(dev, phy);
 	if (ret < 0)
@@ -128,7 +129,10 @@ static int sr_share_write_word(struct usbnet *dev, int phy, u8 reg,
 	if (ret < 0)
 		goto out_unlock;
 
+	// FIXME: see sr_share_read_word above.
 	sr_write_reg(dev, EPAR, phy ? (reg | 0x40) : reg);
+	// 0x1a -> EPCR_WEP | EPCR_EPOS | EPCR_ERPRW ?
+	// 0x12 -> EPCR_WEP | EPCR_ERPRW ?
 	sr_write_reg(dev, EPCR, phy ? 0x1a : 0x12);
 
 	ret = wait_phy_eeprom_ready(dev, phy);
-- 
1.8.3.1


  parent reply	other threads:[~2013-08-29 23:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  3:27 liujunliang_ljl
2013-08-29 23:06 ` Francois Romieu
2013-08-30  4:42   ` Joe Perches
2013-08-29 23:06 ` Francois Romieu
2013-08-29 23:06 ` Francois Romieu [this message]
2013-08-30 21:30 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-08-24 11:26 [PATCH] USB2NET : SR9700 : One chip " liujunliang_ljl
2013-08-24 18:15 ` Joe Perches
2013-08-28 21:43 ` 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=20130829230659.GC12124@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=horms@verge.net.au \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=liujunliang_ljl@163.com \
    --cc=netdev@vger.kernel.org \
    --cc=sunhecheng@vip.126.com \
    /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

all inboxes | Powered by JetHome®