Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix AHCI_QUIRK_BADPMPRESET: when reset fails for ...
details: https://anonhg.NetBSD.org/src/rev/697b098215af
branches: trunk
changeset: 781109:697b098215af
user: bouyer <bouyer%NetBSD.org@localhost>
date: Mon Aug 20 11:59:29 2012 +0000
description:
Fix AHCI_QUIRK_BADPMPRESET: when reset fails for drive 15, stop, clear
errors and restart the channel before retrying with drive 0.
Should fix the problem of drives not detected any more reported by
Markus W Kilbinger on current-users.
diffstat:
sys/dev/ic/ahcisata_core.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (42 lines):
diff -r 26b08f483f27 -r 697b098215af sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c Mon Aug 20 10:32:31 2012 +0000
+++ b/sys/dev/ic/ahcisata_core.c Mon Aug 20 11:59:29 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_core.c,v 1.41 2012/08/10 16:35:00 bouyer Exp $ */
+/* $NetBSD: ahcisata_core.c,v 1.42 2012/08/20 11:59:29 bouyer Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.41 2012/08/10 16:35:00 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.42 2012/08/20 11:59:29 bouyer Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -644,6 +644,7 @@
uint32_t sig;
KASSERT((AHCI_READ(sc, AHCI_P_CMD(chp->ch_channel)) & AHCI_P_CMD_CR) == 0);
+again:
/* clear port interrupt register */
AHCI_WRITE(sc, AHCI_P_IS(chp->ch_channel), 0xffffffff);
/* clear SErrors and start operations */
@@ -660,7 +661,6 @@
if (drive > 0) {
KASSERT(sc->sc_ahci_cap & AHCI_CAP_SPM);
}
-again:
/* polled command, assume interrupts are disabled */
/* use slot 0 to send reset, the channel is idle */
cmd_h = &achp->ahcic_cmdh[0];
@@ -701,6 +701,7 @@
* try again with port 0
*/
drive = 0;
+ ahci_channel_stop(sc, chp, flags);
goto again;
}
aprint_error("%s channel %d: clearing WDCTL_RST failed "
Home |
Main Index |
Thread Index |
Old Index