summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-11-12 14:18:30 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-11-12 14:18:30 +0000
commit722c2e57dd5785cf5a2929ef7b39259b750b147a (patch)
treeee42ce5942d30cc721252270c3931123f6fc157a /sys
parent1919b8e8607116ed65d6accf59b5f0b249f7499f (diff)
Simplify code and remove a delay() by actually waiting for the command to
finish. OK mglocker@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/malo.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c
index a18c811ae52..85676a10aa6 100644
--- a/sys/dev/ic/malo.c
+++ b/sys/dev/ic/malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malo.c,v 1.21 2006/11/10 22:29:44 mglocker Exp $ */
+/* $OpenBSD: malo.c,v 1.22 2006/11/12 14:18:29 claudio Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -1257,8 +1257,8 @@ malo_tx_intr(struct malo_softc *sc)
continue;
/* check TX state */
- switch (desc->status & 0x00000001) {
- case 0x00000001:
+ switch (desc->status & 0x1) {
+ case 0x1:
DPRINTF(("data frame was sent successfully\n"));
ifp->if_opackets++;
break;
@@ -1610,10 +1610,8 @@ malo_load_bootimg(struct malo_softc *sc)
malo_mem_write2(sc, 0xbef8, 0x001);
malo_mem_write2(sc, 0xbefa, 0);
malo_mem_write4(sc, 0xbefc, 0);
- malo_send_cmd(sc, 0xc000bef8, 0);
+ malo_send_cmd(sc, 0xc000bef8, 5);
- /* give card a bit time to init */
- delay(50);
DPRINTF(("%s: boot firmware loaded\n", sc->sc_dev.dv_xname));
return (0);