mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
phy: advertise pause on the forced speeds from 1G up
The advertisement written for a forced speed of 1G and above is 0x1001, while auto and the forced 10M and 100M modes all carry bit 10, the PAUSE capability. Forcing a port to 1g or faster therefore takes pause off the link: the advertisement narrows and the far end has nothing left to agree to. Measured on a SWTGW218AS through phyget and physet, on a port with no link so nothing was disturbed. Auto reads 0x15e1, port 1 1g reads 0x1001, port 1 auto reads 0x15e1 again, and writing 0x1401 by hand sticks. That bit 10 is the pause capability follows from a second reading: two ports advertise the same 0x15e1 from this side, and pause is active only against the partner whose own advertisement carries the bit. Reported by feelfree69 in #489.
This commit is contained in:
1 parent
fa93340c24
commit
2c231fdf69
1 file changed
+3
-2
+3
-2
@@ -354,8 +354,9 @@ void phy_set_speed(void) __banked
|
|||||||
phy_modify(phy_settings.port, PHY_MMD31, PHY_MMD31_GBCR, 0x0200, 0x0000);
|
phy_modify(phy_settings.port, PHY_MMD31, PHY_MMD31_GBCR, 0x0200, 0x0000);
|
||||||
} else {
|
} else {
|
||||||
// AN Advertisement Register (MMD 7.0x0010)
|
// AN Advertisement Register (MMD 7.0x0010)
|
||||||
// bits 0-4: 0x1 (802.3 supported), Extended Next Page format used
|
// bits 0-4: 0x1 (802.3 supported), bit 10: PAUSE,
|
||||||
phy_write(phy_settings.port, PHY_MMD_AN, PHY_ANEG_ADV, 0x1001);
|
// Extended Next Page format used
|
||||||
|
phy_write(phy_settings.port, PHY_MMD_AN, PHY_ANEG_ADV, 0x1401);
|
||||||
if (phy_settings.speed == PHY_SPEED_1G) {
|
if (phy_settings.speed == PHY_SPEED_1G) {
|
||||||
// Multi-GBASE-TBASE-T AN Control 1 Register (MMD 7.0x0020)
|
// Multi-GBASE-TBASE-T AN Control 1 Register (MMD 7.0x0020)
|
||||||
// bit 14: SLAVE, bit 13: Multi-Port device, 1: LD Loop timin enableed
|
// bit 14: SLAVE, bit 13: Multi-Port device, 1: LD Loop timin enableed
|
||||||
|
|||||||
Reference in new issue
Block a user