Skip to content

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

Merged
pelwell merged 1 commit into
raspberrypi:rpi-5.10.yfrom
pelwell:lan87xxfix
Sep 23, 2021
Merged

pelwell merged 1 commit into
raspberrypi:rpi-5.10.yfrom
pelwell:lan87xxfix

Conversation

@pelwell

@pelwell pelwell commented Sep 22, 2021

Copy link
Copy Markdown
Contributor

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

6by9 commented Sep 22, 2021

Copy link
Copy Markdown
Contributor

s/lan87xx/lan78xx

@6by9

6by9 commented Sep 22, 2021

Copy link
Copy Markdown
Contributor

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

pelwell commented Sep 22, 2021

Copy link
Copy Markdown
Contributor Author

LAN87xx is the PHY.

@pelwell

pelwell commented Sep 22, 2021

Copy link
Copy Markdown
Contributor Author

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

l1k commented Jun 22, 2022

Copy link
Copy Markdown
Contributor

@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

l1k commented Jun 22, 2022

Copy link
Copy Markdown
Contributor

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

@pelwell

pelwell commented Jun 23, 2022

Copy link
Copy Markdown
Contributor Author

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.

3 participants