diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-06 21:21:58 +0000 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-06 21:21:58 +0000 |
commit | 4f3ff976f5fd90f2401eddf2c81d3226c7de45ed (patch) | |
tree | 8d2520168f48da6229f29877b03c69a8e35cf87b | |
parent | 609712ec91fe5555bb87d4296f313073d6507760 (diff) |
kernel: ahci: Lower link wait time to 8 ms
Section 3.3.11 of the AHCI spec states that software must leave the DET
field set for a minimum of 1 milisecond. Most hardware conforms to this.
Previously, our buffer time was way too high and would slow down the
time it takes for the AHCI driver to finish initialization. If any SATA
drive takes longer than this to start up, fuck it, something is wrong
with it.
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | sys/dev/ic/ahci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c index d17c6a3..e978036 100644 --- a/sys/dev/ic/ahci.c +++ b/sys/dev/ic/ahci.c @@ -353,7 +353,7 @@ hba_port_reset(struct ahci_hba *hba, struct hba_port *port) * Wait for the link to become reestablished * between the port and the HBA. */ - tmr.msleep(300); + tmr.msleep(8); sctl &= ~AHCI_DET_COMRESET; mmio_write32(&port->sctl, sctl); |