summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ahci.c
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2007-11-19 01:18:49 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2007-11-19 01:18:49 +0000
commit50a4eb3dbc30703b8ba5c818d3d044d91c618518 (patch)
treec57e8e4deed506aa37393305ed586609fa1a3713 /sys/dev/pci/ahci.c
parent559dc526fa84ef6331eb31fe154ad46bb2324c93 (diff)
When ignoring whether FR turns on or not, we should still set FRE,
otherwise we risk leaving the port disabled after a stop/start during error recovery. ok dlg@
Diffstat (limited to 'sys/dev/pci/ahci.c')
-rw-r--r--sys/dev/pci/ahci.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index db06c027ec9..7b75c0ec7c8 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.132 2007/11/05 07:06:02 dlg Exp $ */
+/* $OpenBSD: ahci.c,v 1.133 2007/11/19 01:18:48 pascoe Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -389,7 +389,7 @@ struct ahci_softc {
int sc_flags;
#define AHCI_F_NO_NCQ (1<<0)
-#define AHCI_F_NO_FER (1<<1)
+#define AHCI_F_IGN_FR (1<<1)
u_int sc_ncmds;
@@ -575,7 +575,7 @@ ahci_ati_ixp600_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
AHCI_PCI_ATI_IXP600_MAGIC, magic);
}
- sc->sc_flags |= AHCI_F_NO_FER;
+ sc->sc_flags |= AHCI_F_IGN_FR;
return (0);
}
@@ -1107,8 +1107,7 @@ ahci_port_start(struct ahci_port *ap, int fre_only)
/* Turn on FRE (and ST) */
r = ahci_pread(ap, AHCI_PREG_CMD) & ~AHCI_PREG_CMD_ICC;
- if (!(ap->ap_sc->sc_flags & AHCI_F_NO_FER))
- r |= AHCI_PREG_CMD_FRE;
+ r |= AHCI_PREG_CMD_FRE;
if (!fre_only)
r |= AHCI_PREG_CMD_ST;
ahci_pwrite(ap, AHCI_PREG_CMD, r);
@@ -1122,7 +1121,7 @@ ahci_port_start(struct ahci_port *ap, int fre_only)
}
#endif
- if (!(ap->ap_sc->sc_flags & AHCI_F_NO_FER)) {
+ if (!(ap->ap_sc->sc_flags & AHCI_F_IGN_FR)) {
/* Wait for FR to come on */
if (ahci_pwait_set(ap, AHCI_PREG_CMD, AHCI_PREG_CMD_FR))
return (2);