Page MenuHomeFreeBSD

ahci: increase timout

Authored by oshogbo on Feb 7 2023, 12:36 PM.
Referenced Files
F88216941: D38413.id116939.diff
Fri, Jul 12, 3:17 PM
Unknown Object (File)
Tue, Jul 9, 7:59 PM
Unknown Object (File)
Mon, Jul 8, 2:05 AM
Unknown Object (File)
Sun, Jul 7, 9:56 AM
Unknown Object (File)
Fri, Jul 5, 3:13 PM
Unknown Object (File)
Mon, Jul 1, 3:52 PM
Unknown Object (File)
Thu, Jun 27, 5:39 PM
Unknown Object (File)
Thu, Jun 27, 12:32 AM



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, 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 <>
PR: 243401
Sponsored by: Klara, Inc.
Sponsored by: SkunkWerks, GmbH

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
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.

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.

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.

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.