From 4957911ab151f54f3a60a9371a0c6fa8c75c0cda Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Sun, 12 Nov 2006 14:54:59 +0000 Subject: 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@ --- sys/dev/ic/malo.c | 8 ++++---- 1 file 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 @@ -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); -- cgit v1.2.3