Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105324391
D34956.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
801 B
Referenced Files
None
Subscribers
None
D34956.diff
View Options
diff --git a/sys/dev/vte/if_vte.c b/sys/dev/vte/if_vte.c
--- a/sys/dev/vte/if_vte.c
+++ b/sys/dev/vte/if_vte.c
@@ -1605,9 +1605,10 @@
static void
vte_reset(struct vte_softc *sc)
{
- uint16_t mcr;
+ uint16_t mcr, mdcsc;
int i;
+ mdcsc = CSR_READ_2(sc, VTE_MDCSC);
mcr = CSR_READ_2(sc, VTE_MCR1);
CSR_WRITE_2(sc, VTE_MCR1, mcr | MCR1_MAC_RESET);
for (i = VTE_RESET_TIMEOUT; i > 0; i--) {
@@ -1625,6 +1626,14 @@
CSR_WRITE_2(sc, VTE_MACSM, 0x0002);
CSR_WRITE_2(sc, VTE_MACSM, 0);
DELAY(5000);
+
+ /*
+ * On some SoCs (like Vortex86DX3) MDC speed control register value
+ * needs to be restored to original value instead of default one,
+ * otherwise some PHY registers may fail to be read.
+ */
+ if (mdcsc != MDCSC_DEFAULT)
+ CSR_WRITE_2(sc, VTE_MDCSC, mdcsc);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 15, 10:36 PM (11 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15420902
Default Alt Text
D34956.diff (801 B)
Attached To
Mode
D34956: vte(4): restore original MDC speed control register value after MAC reset, if it wasn't default
Attached
Detach File
Event Timeline
Log In to Comment