From: ZHAO Gang <gamerh2o@gmail.com>
To: Mark Einon <mark.einon@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v3 3/5] staging: et131x: stop read when hit max delay in et131x_phy_mii_read
Date: Wed, 20 Nov 2013 15:56:32 +0800 [thread overview]
Message-ID: <943804b6ad98cdabb3a51bf88c3a8f59617627e9.1384933520.git.gamerh2o@gmail.com> (raw)
In-Reply-To: <cover.1384933520.git.gamerh2o@gmail.com>
stop read and return error when hit max delay time.
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com>
---
drivers/staging/et131x/et131x.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index cda037a..6254a6b 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -1392,6 +1392,7 @@ static int et131x_phy_mii_read(struct et131x_adapter *adapter, u8 addr,
mii_indicator);
status = -EIO;
+ goto out;
}
/* If we hit here we were able to read the register and we need to
@@ -1399,6 +1400,7 @@ static int et131x_phy_mii_read(struct et131x_adapter *adapter, u8 addr,
*/
*value = readl(&mac->mii_mgmt_stat) & ET_MAC_MIIMGMT_STAT_PHYCRTL_MASK;
+out:
/* Stop the read operation */
writel(0, &mac->mii_mgmt_cmd);
--
1.8.3.1
next prev parent reply other threads:[~2013-11-20 7:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 7:53 [PATCH v3 0/5] staging: et131x: patches for et131x driver ZHAO Gang
2013-11-20 7:54 ` [PATCH v3 1/5] staging: et131x: clean up code ZHAO Gang
2013-11-21 21:18 ` Mark Einon
2013-11-20 7:55 ` [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx ZHAO Gang
2013-11-21 21:19 ` Mark Einon
2013-11-22 8:57 ` Dan Carpenter
2013-11-22 9:17 ` Denis Kirjanov
2013-11-22 11:47 ` ZHAO Gang
2013-11-22 11:56 ` Denis Kirjanov
2013-11-22 12:26 ` ZHAO Gang
2013-11-20 7:56 ` ZHAO Gang [this message]
2013-11-21 21:19 ` [PATCH v3 3/5] staging: et131x: stop read when hit max delay in et131x_phy_mii_read Mark Einon
2013-11-20 7:57 ` [PATCH v3 4/5] staging: et131x: remove spinlock adapter->lock ZHAO Gang
2013-11-21 21:19 ` Mark Einon
2013-11-20 7:58 ` [PATCH v3 5/5] staging: et131x: update TODO list ZHAO Gang
2013-11-21 21:20 ` Mark Einon
2013-11-21 21:18 ` [PATCH v3 0/5] staging: et131x: patches for et131x driver Mark Einon
2013-11-22 2:12 ` ZHAO Gang
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=943804b6ad98cdabb3a51bf88c3a8f59617627e9.1384933520.git.gamerh2o@gmail.com \
--to=gamerh2o@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.einon@gmail.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®