summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-11-12 14:54:59 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-11-12 14:54:59 +0000
commit4957911ab151f54f3a60a9371a0c6fa8c75c0cda (patch)
tree7d2dc179a8e73558d34e06b4a904cdeb2c596f3a /sys
parent3095c9ba6ae8c6e69dfcc12b83f167a032a9c93d (diff)
In malo_send_cmd_dma() reduce the poll loop to 10 and increase the delay
to 100. Even the slowest command take only about half of the time so this should be enough. Discussed with mglocker@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/malo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c
index 75a96aa2053..93655678867 100644
--- a/sys/dev/ic/malo.c
+++ b/sys/dev/ic/malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malo.c,v 1.23 2006/11/12 14:26:04 claudio Exp $ */
+/* $OpenBSD: malo.c,v 1.24 2006/11/12 14:54:58 claudio Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -547,15 +547,15 @@ malo_send_cmd_dma(struct malo_softc *sc, bus_addr_t addr)
malo_ctl_write4(sc, 0x0c18, 2); /* CPU_TRANSFER_CMD */
malo_ctl_read4(sc, 0x0c14);
- for (i = 0; i < 100; i++) {
- delay(50);
+ for (i = 0; i < 10; i++) {
+ delay(100);
bus_dmamap_sync(sc->sc_dmat, sc->sc_cmd_dmam, 0, PAGE_SIZE,
BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
if (hdr->cmd & 0x8000)
break;
}
- if (i == 100)
+ if (i == 10)
return (ETIMEDOUT);
return (0);