summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-06-25 14:12:44 +0000
committerpatrick <patrick@openbsd.org>2019-06-25 14:12:44 +0000
commite1989b51495725df4194e97f58496d5faa0b77c5 (patch)
tree032bdf78d07e330d40cc118c0d0a7d81f8cba2cb
parentmove new element p_pledge to the tailof kinfo_proc to increase (diff)
downloadwireguard-openbsd-e1989b51495725df4194e97f58496d5faa0b77c5.tar.xz
wireguard-openbsd-e1989b51495725df4194e97f58496d5faa0b77c5.zip
Turn off the code which waits for AHCI_PREG_CMD_CR to be set by the
HBA after ahci_default_port_start() sets AHCI_PREG_CMD_ST. The AHCI spec. rev. 1.3 only requires the inverse to be true, i. e. that a HBA clears AHCI_PREG_CMD_CR when AHCI_PREG_CMD_ST gets cleared by software/driver. In fact, some HBAs will not raise AHCI_PREG_CMD_CR as an immediate consequence of AHCI_PREG_CMD_ST being set. Actually neither the FreeBSD, Linux nor NetBSD counterpart of ahci(4) has an analogous check. Disabling that wait fixes "failed to start command DMA on port N, disabling" bails during attach. From Marius Strobl ok deraadt@ jmatthew@
-rw-r--r--sys/dev/ic/ahci.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index 39adbaa563c..b8ef46a6532 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.32 2017/08/21 21:43:46 jmatthew Exp $ */
+/* $OpenBSD: ahci.c,v 1.33 2019/06/25 14:12:44 patrick Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -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);
}