diff options
| author | jmcneill <jmcneill@NetBSD.org> | 2016-06-03 10:34:03 +0000 |
|---|---|---|
| committer | jmcneill <jmcneill@NetBSD.org> | 2016-06-03 10:34:03 +0000 |
| commit | d678a7e4d752ebe4563d3aed0fd65ad62ecb8386 (patch) | |
| tree | 9215dac39194df444090123e37addd50e9ba731c /sys/dev | |
| parent | 7166a6425a65b2462f6044b5bc900b5e6c1adfa2 (diff) | |
PR kern/51211: atactl atabus0 reset causes a panic on Tegra K1
Fix an issue where ahci_reset_channel calls ahci_channel_start with clo=1
even if CAP.SCLO=0.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/ahcisata_core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/ahcisata_core.c b/sys/dev/ic/ahcisata_core.c index 96970d6f44b..8c4c8db2df7 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.56 2016/05/02 19:18:29 christos Exp $ */ +/* $NetBSD: ahcisata_core.c,v 1.57 2016/06/03 10:34:03 jmcneill Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.56 2016/05/02 19:18:29 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.57 2016/06/03 10:34:03 jmcneill Exp $"); #include <sys/types.h> #include <sys/malloc.h> @@ -828,7 +828,8 @@ ahci_reset_channel(struct ata_channel *chp, int flags) /* clear port interrupt register */ AHCI_WRITE(sc, AHCI_P_IS(chp->ch_channel), 0xffffffff); /* clear SErrors and start operations */ - ahci_channel_start(sc, chp, flags, 1); + ahci_channel_start(sc, chp, flags, + (sc->sc_ahci_cap & AHCI_CAP_CLO) ? 1 : 0); /* wait 31s for BSY to clear */ for (i = 0; i <AHCI_RST_WAIT; i++) { tfd = AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel)); |
