summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2015-05-24 22:30:05 +0000
committerjmcneill <jmcneill@NetBSD.org>2015-05-24 22:30:05 +0000
commitc7d76f6e3c9c8f4a56178ce4e83a8e8edde04370 (patch)
tree1332d78748874439d04d47c027ada625fb9a6a23 /sys/dev/ic
parent8dfbabb0c8b06d895c324354f463eef900231048 (diff)
Add AHCI_QUIRK_SKIP_RESET quirk to allow for skipping the drive reset
sequence in ahci_do_reset_drive.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/ahcisata_core.c10
-rw-r--r--sys/dev/ic/ahcisatavar.h3
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/ic/ahcisata_core.c b/sys/dev/ic/ahcisata_core.c
index aaadfa14f13..9a92cd715a2 100644
--- a/sys/dev/ic/ahcisata_core.c
+++ b/sys/dev/ic/ahcisata_core.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_core.c,v 1.53 2014/12/04 21:50:29 joerg Exp $ */
+/* $NetBSD: ahcisata_core.c,v 1.54 2015/05/24 22:30:05 jmcneill Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.53 2014/12/04 21:50:29 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.54 2015/05/24 22:30:05 jmcneill Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -708,6 +708,10 @@ again:
if (drive > 0) {
KASSERT(sc->sc_ahci_cap & AHCI_CAP_SPM);
}
+
+ if (sc->sc_ahci_quirks & AHCI_QUIRK_SKIP_RESET)
+ goto skip_reset;
+
/* polled command, assume interrupts are disabled */
/* use slot 0 to send reset, the channel is idle */
cmd_h = &achp->ahcic_cmdh[0];
@@ -759,6 +763,8 @@ again:
default:
break;
}
+
+skip_reset:
/*
* wait 31s for BSY to clear
* This should not be needed, but some controllers clear the
diff --git a/sys/dev/ic/ahcisatavar.h b/sys/dev/ic/ahcisatavar.h
index d258319d206..29aed6b0583 100644
--- a/sys/dev/ic/ahcisatavar.h
+++ b/sys/dev/ic/ahcisatavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisatavar.h,v 1.16 2014/02/24 12:19:05 jmcneill Exp $ */
+/* $NetBSD: ahcisatavar.h,v 1.17 2015/05/24 22:30:05 jmcneill Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -59,6 +59,7 @@ struct ahci_softc {
#define AHCI_PCI_QUIRK_BAD64 __BIT(1) /* broken 64-bit DMA */
#define AHCI_QUIRK_BADPMP __BIT(2) /* broken PMP support, ignore */
#define AHCI_QUIRK_BADPMPRESET __BIT(3) /* broken PMP support for reset */
+#define AHCI_QUIRK_SKIP_RESET __BIT(4) /* skip drive reset sequence */
uint32_t sc_ahci_cap; /* copy of AHCI_CAP */
int sc_ncmds; /* number of command slots */