summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2014-12-04 21:50:29 +0000
committerjoerg <joerg@NetBSD.org>2014-12-04 21:50:29 +0000
commit8a1cb53d1783cf4b64eb14afac8fd5a580d972cd (patch)
tree313ed4f3c9e6e55d7f50dbaeb21266d1efe7f369 /sys/dev
parent3107a3db95b7bcf70245646b19359ba4de53328f (diff)
Increase reset delay in polling mode to 10ms per loop. It seems like
AHCI on the Cubietruck doesn't like the tigther loop. PR 49448.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/ahcisata_core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/ahcisata_core.c b/sys/dev/ic/ahcisata_core.c
index 028f1eca30a..aaadfa14f13 100644
--- a/sys/dev/ic/ahcisata_core.c
+++ b/sys/dev/ic/ahcisata_core.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_core.c,v 1.52 2014/11/23 01:38:49 joerg Exp $ */
+/* $NetBSD: ahcisata_core.c,v 1.53 2014/12/04 21:50:29 joerg Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.52 2014/11/23 01:38:49 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.53 2014/12/04 21:50:29 joerg Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@@ -639,10 +639,12 @@ ahci_exec_fis(struct ata_channel *chp, int timeout, int flags)
/*
* Base timeout is specified in ms.
* If we are allowed to sleep, wait a tick each round.
- * Otherwise delay for 1ms on each round.
+ * Otherwise delay for 10ms on each round.
*/
if (flags & AT_WAIT)
timeout = MAX(1, mstohz(timeout));
+ else
+ timeout = timeout / 10;
AHCI_CMDH_SYNC(sc, achp, 0, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
/* start command */
@@ -669,7 +671,7 @@ ahci_exec_fis(struct ata_channel *chp, int timeout, int flags)
if (flags & AT_WAIT)
tsleep(&sc, PRIBIO, "ahcifis", 1);
else
- delay(1000);
+ delay(10000);
}
aprint_debug("%s channel %d: timeout sending FIS\n",