Page MenuHomeFreeBSD

ahci: increase timout
ClosedPublic

Authored by oshogbo on Feb 7 2023, 12:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 16, 6:28 AM
Unknown Object (File)
Mon, Jun 3, 11:17 AM
Unknown Object (File)
Mon, Jun 3, 11:16 AM
Unknown Object (File)
Mon, Jun 3, 11:16 AM
Unknown Object (File)
Mon, Jun 3, 11:16 AM
Unknown Object (File)
Sat, Jun 1, 2:22 AM
Unknown Object (File)
May 7 2024, 7:29 PM
Unknown Object (File)
May 2 2024, 11:37 AM
Subscribers

Details

Summary

For some devices, like Marvell 88SE9230, it takes more time
to connect to the device. This patch introduces a special flag
that extends the timeout from around 100ms to around 500ms.

This change is a follow-up to https://reviews.freebsd.org/D37585, in which Warner suggested changing how the timeout is implemented.
I agree that the idea given by Warner is a better approach. However, we would like to land this more straightforward patch before the new release (and more uncomplicated to test and understand) and then work on converting the whole driver to the way suggested by @imp after this landed in a release.

This change is based on the work of: Peter Eriksson <pen@lysator.liu.se>
PR: 243401
Sponsored by: Klara, Inc.
Sponsored by: SkunkWerks, GmbH

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

oshogbo created this revision.
oshogbo created this object with edit policy "No One".
oshogbo added reviewers: imp, emaste, thj.
oshogbo changed the edit policy from "No One" to "All Users".
oshogbo added a subscriber: dch.
thj added inline comments.
sys/dev/ahci/ahci.c
2612–2614

Is this clearer:

'Wait for "connect well", up to 100ms by default and up to 500ms for devices with the SLOWDEV quirk.'

oshogbo updated this revision to Diff 116696.
oshogbo marked an inline comment as done.
allanjude added inline comments.
sys/dev/ahci/ahci.c
157

while the comment is updated, the code still appears to do 25ms * 80 = 2 seconds

oshogbo marked an inline comment as done.
oshogbo added inline comments.
sys/dev/ahci/ahci.c
157

This time is ok, I screw up the comment fix. Suggested in PR.

I like this a lot more than the prior submission. This has cleaned up very nicely. Thank you so much for the time and effort to do so.
I have some qualms about the long delays, but they aren't insane and should be rare enough that the tight loop shouldn't cause operational issues.

This revision is now accepted and ready to land.Feb 8 2023, 2:20 PM
This revision now requires review to proceed.Feb 10 2023, 12:35 AM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 10 2023, 4:10 PM
Closed by commit rG346483b1f104: ahci: increase timout (authored by oshogbo). · Explain Why
This revision was automatically updated to reflect the committed changes.