From 280f43aa8400cbb1ed61ca29e17f487310a4a5cc Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 31 May 2024 11:21:13 -0400 Subject: kernel: ahci: Document workaround Documents a workaround for a possible hw/emulation quirk Signed-off-by: Ian Moffett --- sys/dev/ic/ahci.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3