aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-31 11:21:13 -0400
committerIan Moffett <ian@osmora.org>2024-05-31 11:21:13 -0400
commit280f43aa8400cbb1ed61ca29e17f487310a4a5cc (patch)
treebac06917dbd56b663e01e2c3fdc1ceead8c07448
parent65e5d1448eb10fea727d16d0c43a6929f61455c1 (diff)
kernel: ahci: Document workaround
Documents a workaround for a possible hw/emulation quirk Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/dev/ic/ahci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index 43b4d1d..14dbf74 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -444,6 +444,12 @@ ahci_reset_port(struct hba_port *port)
{
uint32_t sctl, ssts;
+ /*
+ * Some odd behaviour may occur if a COMRESET is sent
+ * to the port while it is in an idle state...
+ * A workaround to this is to bring the port up
+ * then immediately transmit the COMRESET to the device.
+ */
ahci_start_port(port);
sctl = mmio_read32(&port->sctl);