Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic revert rev 1.73 - while it apparently helped Chri...
details: https://anonhg.NetBSD.org/src/rev/fa345b8eeebe
branches: trunk
changeset: 447608:fa345b8eeebe
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Jan 18 19:16:50 2019 +0000
description:
revert rev 1.73 - while it apparently helped Christos case, it re-broke
the disk detection on several other systems, so need something else
diffstat:
sys/dev/ic/ahcisata_core.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diffs (72 lines):
diff -r 40143008da91 -r fa345b8eeebe sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c Fri Jan 18 18:47:16 2019 +0000
+++ b/sys/dev/ic/ahcisata_core.c Fri Jan 18 19:16:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_core.c,v 1.73 2019/01/12 15:16:51 jdolecek Exp $ */
+/* $NetBSD: ahcisata_core.c,v 1.74 2019/01/18 19:16:50 jdolecek Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.73 2019/01/12 15:16:51 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.74 2019/01/18 19:16:50 jdolecek Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -850,8 +850,6 @@
case TIMEOUT:
aprint_error("%s port %d: setting WDCTL_RST failed "
"for drive %d\n", AHCINAME(sc), chp->ch_channel, drive);
- if (sigp)
- *sigp = 0xffffffff;
error = EBUSY;
goto end;
default:
@@ -877,8 +875,6 @@
case TIMEOUT:
aprint_error("%s port %d: clearing WDCTL_RST failed "
"for drive %d\n", AHCINAME(sc), chp->ch_channel, drive);
- if (sigp)
- *sigp = 0xffffffff;
error = EBUSY;
goto end;
default:
@@ -900,8 +896,6 @@
if (i == AHCI_RST_WAIT) {
aprint_error("%s: BSY never cleared, TD 0x%x\n",
AHCINAME(sc), sig);
- if (sigp)
- *sigp = 0xffffffff;
goto end;
}
AHCIDEBUG_PRINT(("%s: BSY took %d ms\n", AHCINAME(sc), i * 10),
@@ -1000,7 +994,6 @@
return;
}
-again:
/* bring interface up, accept FISs, power up and spin up device */
AHCI_WRITE(sc, AHCI_P_CMD(chp->ch_channel),
AHCI_P_CMD_ICC_AC | AHCI_P_CMD_FRE |
@@ -1011,6 +1004,9 @@
case SStatus_DET_DEV:
ata_delay(chp, 500, "ahcidv", AT_WAIT);
+ /* Initial value, used in case the soft reset fails */
+ sig = AHCI_READ(sc, AHCI_P_SIG(chp->ch_channel));
+
if (sc->sc_ahci_cap & AHCI_CAP_SPM) {
error = ahci_do_reset_drive(chp, PMP_PORT_CTL, AT_WAIT,
&sig, c_slot);
@@ -1023,7 +1019,7 @@
PMP_PORT_CTL);
sc->sc_ahci_cap &= ~AHCI_CAP_SPM;
- goto again;
+ ahci_reset_channel(chp, AT_WAIT);
}
} else {
ahci_do_reset_drive(chp, 0, AT_WAIT, &sig, c_slot);
Home |
Main Index |
Thread Index |
Old Index