Page MenuHomeFreeBSD

ahci: increase timout
ClosedPublic

Authored by oshogbo on Feb 7 2023, 12:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 11:23 AM
Unknown Object (File)
Wed, Apr 10, 4:44 AM
Unknown Object (File)
Tue, Apr 9, 12:26 AM
Unknown Object (File)
Wed, Apr 3, 4:12 PM
Unknown Object (File)
Sat, Mar 30, 6:20 PM
Unknown Object (File)
Sat, Mar 30, 10:20 AM
Unknown Object (File)
Sat, Mar 30, 10:20 AM
Unknown Object (File)
Sat, Mar 30, 10:20 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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
2610–2615

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
158

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
158

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.