Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Add AHCI_QUIRK_SKIP_RESET quirk to allow for skip...



details:   https://anonhg.NetBSD.org/src/rev/be22e625f1f3
branches:  trunk
changeset: 808585:be22e625f1f3
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun May 24 22:30:05 2015 +0000

description:
Add AHCI_QUIRK_SKIP_RESET quirk to allow for skipping the drive reset
sequence in ahci_do_reset_drive.

diffstat:

 sys/dev/ic/ahcisata_core.c |  10 ++++++++--
 sys/dev/ic/ahcisatavar.h   |   3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (55 lines):

diff -r 8e5f55823b1d -r be22e625f1f3 sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c        Sun May 24 22:23:01 2015 +0000
+++ b/sys/dev/ic/ahcisata_core.c        Sun May 24 22:30:05 2015 +0000
@@ -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 @@
        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 @@
        default:
                break;
        }
+
+skip_reset:
        /*
         * wait 31s for BSY to clear
         * This should not be needed, but some controllers clear the
diff -r 8e5f55823b1d -r be22e625f1f3 sys/dev/ic/ahcisatavar.h
--- a/sys/dev/ic/ahcisatavar.h  Sun May 24 22:23:01 2015 +0000
+++ b/sys/dev/ic/ahcisatavar.h  Sun May 24 22:30:05 2015 +0000
@@ -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 @@
 #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 */



Home | Main Index | Thread Index | Old Index