summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2007-05-30 03:55:20 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2007-05-30 03:55:20 +0000
commit54f7b30b37ba36f7ac06d3f70c0ca4244b9d0a93 (patch)
tree8b731ead5fb6624722f268485f08d3d2a3cfdebb /sys
parent065a08ac8092d8fa91eff8942b0a9ae7034e9e12 (diff)
my (dlg says crappy) laptop requires some more delays in port_reset or
things go really crazy. ok/help toby tom. dlg unhappy but ok.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ahci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 77792d0e89b..544a7dc0487 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.117 2007/05/10 02:16:11 dlg Exp $ */
+/* $OpenBSD: ahci.c,v 1.118 2007/05/30 03:55:19 tedu Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -1315,14 +1315,15 @@ 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;
ahci_pwrite(ap, AHCI_PREG_SCTL, r);
- delay(2000); /* wait at least 1ms for COMRESET to be sent */
+ delay(10000); /* wait at least 1ms for COMRESET to be sent */
r &= ~AHCI_PREG_SCTL_DET_INIT;
r |= AHCI_PREG_SCTL_DET_NONE;
ahci_pwrite(ap, AHCI_PREG_SCTL, r);
- delay(2000);
+ delay(10000);
/* Wait for device to be detected and communications established */
if (ahci_pwait_eq(ap, AHCI_PREG_SSTS, AHCI_PREG_SSTS_DET,