summaryrefslogtreecommitdiff
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-08-10 06:32:00 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-08-10 06:32:00 +0000
commit5dd996bc2a80dc3718f70a476ca1b609e5951788 (patch)
tree79ea56da0fde03219a4bc84318edb5b23e20181c /target/linux/generic/files
parent19bf880b0329b4468c396dc96b9a9c22afd1d51b (diff)
downloadmtk-20170518-5dd996bc2a80dc3718f70a476ca1b609e5951788.zip
mtk-20170518-5dd996bc2a80dc3718f70a476ca1b609e5951788.tar.gz
mtk-20170518-5dd996bc2a80dc3718f70a476ca1b609e5951788.tar.bz2
generic: rtl8366_smi: increase delay after switch hw reset
SVN-Revision: 33077
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366_smi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
index 9903269..be85274 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
@@ -25,6 +25,9 @@
#define RTL8366_SMI_ACK_RETRY_COUNT 5
+#define RTL8366_SMI_HW_STOP_DELAY 25 /* msecs */
+#define RTL8366_SMI_HW_START_DELAY 100 /* msecs */
+
static inline void rtl8366_smi_clk_delay(struct rtl8366_smi *smi)
{
ndelay(smi->clk_delay);
@@ -312,9 +315,9 @@ static int rtl8366_reset(struct rtl8366_smi *smi)
{
if (smi->hw_reset) {
smi->hw_reset(true);
- msleep(25);
+ msleep(RTL8366_SMI_HW_STOP_DELAY);
smi->hw_reset(false);
- msleep(25);
+ msleep(RTL8366_SMI_HW_START_DELAY);
return 0;
}
@@ -1244,7 +1247,7 @@ static int __rtl8366_smi_init(struct rtl8366_smi *smi, const char *name)
/* start the switch */
if (smi->hw_reset) {
smi->hw_reset(false);
- msleep(25);
+ msleep(RTL8366_SMI_HW_START_DELAY);
}
return 0;