Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: phy: lan87xx: Allow more time for link detect #4598

Merged
merged 1 commit into from Sep 23, 2021

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented Sep 22, 2021

With EDPWRDOWN set in idle, it must be cleared before checking for
ENERGYON going high, indicating that a link is being established.
The existing code allows 640ms for ENERGYON to go high, but on
Raspberry Pis that appears not to be enough, causing link detection
to fail.

Increase the polling timeout to 1500ms - with a polling interval of
10ms it shouldn't cause unnecessary delays.

See: #4393

Signed-off-by: Phil Elwell phil@raspberrypi.com

With EDPWRDOWN set in idle, it must be cleared before checking for
ENERGYON going high, indicating that a link is being established.
The existing code allows 640ms for ENERGYON to go high, but on
Raspberry Pis that appears not to be enough, causing link detection
to fail.

Increase the polling timeout to 1500ms - with a polling interval of
10ms it shouldn't cause unnecessary delays.

See: raspberrypi#4393

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@6by9
Copy link
Contributor

6by9 commented Sep 22, 2021

s/lan87xx/lan78xx

@6by9
Copy link
Contributor

6by9 commented Sep 22, 2021

Oh joys, they've mixed and matched 8700 and 7800. Lovely!

I was just about to note that the LAN7800 is only on the 3B+, not the 3B the linked issue references.

@pelwell
Copy link
Contributor Author

pelwell commented Sep 22, 2021

LAN87xx is the PHY.

@pelwell
Copy link
Contributor Author

pelwell commented Sep 22, 2021

Hence:

@@ -195,12 +195,12 @@ static int lan87xx_read_status(struct phy_device *phydev)

@pelwell pelwell merged commit 094e36e into raspberrypi:rpi-5.10.y Sep 23, 2021
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Sep 23, 2021
See: raspberrypi/linux#4593

kernel: rpivid: Ensure IRQs have completed before uniniting context
See: raspberrypi/linux#4599

kernel: net: phy: lan87xx: Allow more time for link detect
See: raspberrypi/linux#4598
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Sep 23, 2021
See: raspberrypi/linux#4593

kernel: rpivid: Ensure IRQs have completed before uniniting context
See: raspberrypi/linux#4599

kernel: net: phy: lan87xx: Allow more time for link detect
See: raspberrypi/linux#4598
@pelwell pelwell deleted the lan87xxfix branch September 24, 2021 08:17
@l1k
Copy link
Contributor

l1k commented Jun 22, 2022

@pelwell Please note that starting with v5.19, commits 72aa729 and 5e73e07 will no longer be necessary and can be dropped from the Foundation's downstream kernel. We've moved to interrupt-driven link detection (instead of polling) in upstream with commit 2642cc6.

@l1k
Copy link
Contributor

l1k commented Jun 22, 2022

Excuse me, I meant 1ce8b37. The other one is a fixup for that commit.

@pelwell
Copy link
Contributor Author

pelwell commented Jun 23, 2022

Thanks, Lukas - we're always happy to drop downstream patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants