diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2016-10-02 18:54:03 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2016-10-02 18:54:03 +0000 |
commit | 87cdd56fac41122d4371664f09e2b9729eaba3e7 (patch) | |
tree | 09f031511440f9769d87846942d38684605aef2f /sys | |
parent | 215615798f244b35152e5e0839f6c12dd6d61bb2 (diff) |
Some HBAs report NCQ capability despite only supporting one command
slot. Thus, extend the check whether NCQ actually should be enabled
accordingly.
From Marius Strobl
tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7)
ok jmatthew@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ahci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c index 9f0708f898a..8fa7e0b9cc7 100644 --- a/sys/dev/ic/ahci.c +++ b/sys/dev/ic/ahci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci.c,v 1.26 2016/10/02 18:53:28 patrick Exp $ */ +/* $OpenBSD: ahci.c,v 1.27 2016/10/02 18:54:02 patrick Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -277,6 +277,7 @@ noccc: aaa.aaa_nports = AHCI_MAX_PORTS; aaa.aaa_ncmds = sc->sc_ncmds - 1; if (!(sc->sc_flags & AHCI_F_NO_NCQ) && + sc->sc_ncmds > 2 && (sc->sc_cap & AHCI_REG_CAP_SNCQ)) { aaa.aaa_capability |= ASAA_CAP_NCQ | ASAA_CAP_PMP_NCQ; /* XXX enabling ASAA_CAP_PMP_NCQ with FBS: |