Hi,

on some hardware I see a "failed to start command DMA on port N,
disabling" during attach.  Apparently AHCI spec. rev 1.3 only
requires that a HBA clears AHCI_PREG_CMD_CR when AHCI_PREG_CMD_ST
gets cleared by software/driver, but not the inverse.  Actually
neither the FreeBSD, Linux nor NetBSD counterpart of ahci(4) has
an analogous check.  With this my hardware works totally fine.

Originally found and debugged by Marius Strobl on a completely
different hardware, so now there are two instances of those.
jmatthew@ is fine with this as well.

ok?

Patrick

diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index 39adbaa563c..00e4300ffb3 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -922,11 +922,6 @@ ahci_default_port_start(struct ahci_port *ap, int fre_only)
        }
 #endif
 
-       /* Wait for CR to come on */
-       if (!fre_only &&
-           ahci_pwait_set(ap, AHCI_PREG_CMD, AHCI_PREG_CMD_CR, 1))
-               return (1);
-
        return (0);
 }
 

Reply via email to