summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/man/man4/ahci.49
-rw-r--r--sys/arch/amd64/conf/GENERIC7
-rw-r--r--sys/arch/i386/conf/GENERIC7
-rw-r--r--sys/arch/sparc64/conf/GENERIC7
-rw-r--r--sys/dev/pci/ahci.c10
5 files changed, 26 insertions, 14 deletions
diff --git a/share/man/man4/ahci.4 b/share/man/man4/ahci.4
index 75c9e48a254..46813e30a52 100644
--- a/share/man/man4/ahci.4
+++ b/share/man/man4/ahci.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ahci.4,v 1.6 2007/07/02 03:37:40 dlg Exp $
+.\" $OpenBSD: ahci.4,v 1.7 2008/04/19 01:18:39 djm Exp $
.\"
.\" Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" TORTIOUS ACTION, ARISING OUT OF
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 2 2007 $
+.Dd $Mdocdate: April 19 2008 $
.Dt AHCI 4
.Os
.Sh NAME
@@ -38,6 +38,11 @@ Although
.Nm
controllers are actual ATA controllers, the driver emulates SCSI via a
translation layer.
+.Pp
+Setting the lowest bit (0x1) of the driver flags forces
+.Nm
+to negotiate SATA 1 (1.5 Gb/s) transfer speeds only.
+It may be useful where higher speeds are unstable.
.Sh SEE ALSO
.Xr intro 4 ,
.Xr jmb 4 ,
diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC
index 24226e274aa..81bbfd0c23b 100644
--- a/sys/arch/amd64/conf/GENERIC
+++ b/sys/arch/amd64/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.224 2008/04/07 01:35:20 deraadt Exp $
+# $OpenBSD: GENERIC,v 1.225 2008/04/19 01:18:39 djm Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -284,9 +284,10 @@ lpt* at puc?
ahc* at pci? # Adaptec 2940 SCSI controllers
scsibus* at ahc?
jmb* at pci? # JMicron JMB36x controllers
-ahci* at jmb?
+ahci* at jmb? flags 0x0000 # flags 0x0001 to force SATA 1 (1.5Gb/s)
pciide* at jmb?
-ahci* at pci? # AHCI SATA controllers
+ahci* at pci? flags 0x0000 # AHCI SATA controllers
+ # flags 0x0001 to force SATA 1 (1.5Gb/s)
scsibus* at ahci?
sili* at pci? # Silicon Image 3124/3132/3531 SATA
scsibus* at sili?
diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC
index 5ae5560dba2..3fdfd7d6b2e 100644
--- a/sys/arch/i386/conf/GENERIC
+++ b/sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.611 2008/04/07 01:35:20 deraadt Exp $
+# $OpenBSD: GENERIC,v 1.612 2008/04/19 01:18:39 djm Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -386,9 +386,10 @@ ahc* at eisa? # Adaptec 274x, aic7770 SCSI controllers
ahc* at pci? # Adaptec 2940/3940/78?? SCSI controllers
scsibus* at ahc?
jmb* at pci? # JMicron JMB36x controllers
-ahci* at jmb?
+ahci* at jmb? flags 0x0000 # flags 0x0001 to force SATA 1 (1.5Gb/s)
pciide* at jmb?
-ahci* at pci? # AHCI SATA controllers
+ahci* at pci? flags 0x0000 # AHCI SATA controllers
+ # flags 0x0001 to force SATA 1 (1.5Gb/s)
scsibus* at ahci?
sili* at pci? # Silicon Image 3124/3132/3531 SATA controllers
scsibus* at sili?
diff --git a/sys/arch/sparc64/conf/GENERIC b/sys/arch/sparc64/conf/GENERIC
index 2d524b0f802..a42c78324d6 100644
--- a/sys/arch/sparc64/conf/GENERIC
+++ b/sys/arch/sparc64/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.199 2008/04/02 22:32:43 kettenis Exp $
+# $OpenBSD: GENERIC,v 1.200 2008/04/19 01:18:39 djm Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -96,9 +96,10 @@ scsibus* at mpi?
arc* at pci? # Areca RAID Controllers
scsibus* at arc?
jmb* at pci? # JMicron JMB36x controllers
-ahci* at jmb?
+ahci* at jmb? flags 0x0000 # flags 0x0001 to force SATA 1 (1.5Gb/s)
pciide* at jmb?
-ahci* at pci? # AHCI SATA controllers
+ahci* at pci? flags 0x0000 # AHCI SATA controllers
+ # flags 0x0001 to force SATA 1 (1.5Gb/s)
scsibus* at ahci?
sili* at pci? # Silicon Image 3124/3132/3531 SATA controllers
scsibus* at sili?
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 487bd871734..847aac346bc 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.138 2008/04/08 19:30:09 kettenis Exp $ */
+/* $OpenBSD: ahci.c,v 1.139 2008/04/19 01:18:39 djm Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -1354,8 +1354,12 @@ ahci_port_portreset(struct ahci_port *ap)
/* Perform device detection */
ahci_pwrite(ap, AHCI_PREG_SCTL, 0);
delay(10000);
- r = AHCI_PREG_SCTL_IPM_DISABLED | AHCI_PREG_SCTL_SPD_ANY |
- AHCI_PREG_SCTL_DET_INIT;
+ r = AHCI_PREG_SCTL_IPM_DISABLED | AHCI_PREG_SCTL_DET_INIT;
+ if ((ap->ap_sc->sc_dev.dv_cfdata->cf_flags & 0x01) != 0) {
+ DPRINTF(AHCI_D_VERBOSE, "%s: forcing GEN1\n", PORTNAME(ap));
+ r |= AHCI_PREG_SCTL_SPD_GEN1;
+ } else
+ r |= AHCI_PREG_SCTL_SPD_ANY;
ahci_pwrite(ap, AHCI_PREG_SCTL, r);
delay(10000); /* wait at least 1ms for COMRESET to be sent */
r &= ~AHCI_PREG_SCTL_DET_INIT;