summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-04-29 11:31:30 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-04-29 11:31:30 +0000
commitcd37523c528cddfea0eeb15f9fc2990647faac06 (patch)
tree355407a0797b91d1294212a0fb5ccd28d3381af3 /sys/dev
parentb66af3de165953fb15a8295a528202db665f484e (diff)
we dont want to completely fill fifos, so leave a gap when we calculate
how much of the fifo we want to write firmware to. from Nadav Shemer at Tehuti Networks
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_tht.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index 82af7eaf292..d0a2253a436 100644
--- a/sys/dev/pci/if_tht.c
+++ b/sys/dev/pci/if_tht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tht.c,v 1.82 2007/04/29 11:28:25 dlg Exp $ */
+/* $OpenBSD: if_tht.c,v 1.83 2007/04/29 11:31:29 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1603,7 +1603,7 @@ tht_fw_load(struct tht_softc *sc)
goto err;
}
- wrlen = MIN(sc->sc_txt.tf_ready, fwlen);
+ wrlen = MIN(sc->sc_txt.tf_ready - THT_FIFO_GAP, fwlen);
tht_fifo_pre(sc, &sc->sc_txt);
tht_fifo_write(sc, &sc->sc_txt, buf, wrlen);
tht_fifo_post(sc, &sc->sc_txt);