diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-08-10 06:32:00 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-08-10 06:32:00 +0000 |
commit | 3a14c373fd3becf062b107e26300ba549fbb9f40 (patch) | |
tree | 28159c3f046674b1d904e686d32c3d3cddd3a3b2 /target | |
parent | ff6a809f530c90d726a8e9d27987f2d4eea438dc (diff) |
generic: rtl8366_smi: increase delay after switch hw reset
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33077 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/rtl8366_smi.c | 9 |
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 9903269390..be85274e78 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; |