diff options
author | 2007-05-30 03:55:19 +0000 | |
---|---|---|
committer | 2007-05-30 03:55:19 +0000 | |
commit | a2797234761f14b09d2e8d2e1336c215e989b4c1 (patch) | |
tree | 3f60f0303225c8b858c1b168bc17c5fb525274b0 | |
parent | token fallout.. bad henning (diff) | |
download | wireguard-openbsd-a2797234761f14b09d2e8d2e1336c215e989b4c1.tar.xz wireguard-openbsd-a2797234761f14b09d2e8d2e1336c215e989b4c1.zip |
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.
-rw-r--r-- | sys/dev/pci/ahci.c | 7 |
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, |