summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-03-29 12:28:00 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-03-29 12:28:00 +0000
commit1f4dde2b1cfbd4676b5e0505afe751d769a427fd (patch)
treedd80d456b9de7e823a9b5d9ededa8de9c02e01ff
parenta159d1591b3327d2d03d541188132af61c3f089a (diff)
Fix a scary bug when setting up the HW dma structure. Use a 2byte bus_space
access to write the mbuf lenght instead of a 4byte one. On big endian machines the length was written to the wrong field and so no TX transactions were done. OK mglocker@
-rw-r--r--sys/dev/ic/acx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c
index a90b5d54dfb..f9428093acf 100644
--- a/sys/dev/ic/acx.c
+++ b/sys/dev/ic/acx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx.c,v 1.69 2007/03/19 23:28:23 claudio Exp $ */
+/* $OpenBSD: acx.c,v 1.70 2007/03/29 12:27:59 claudio Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -2249,7 +2249,7 @@ acx_encap(struct acx_softc *sc, struct acx_txbuf *txbuf, struct mbuf *m,
ctrl |= sc->chip_fw_txdesc_ctrl; /* extra chip specific flags */
ctrl &= ~(DESC_CTRL_HOSTOWN | DESC_CTRL_ACXDONE);
- FW_TXDESC_SETFIELD_4(sc, txbuf, f_tx_len, m->m_pkthdr.len);
+ FW_TXDESC_SETFIELD_2(sc, txbuf, f_tx_len, m->m_pkthdr.len);
FW_TXDESC_SETFIELD_1(sc, txbuf, f_tx_error, 0);
FW_TXDESC_SETFIELD_1(sc, txbuf, f_tx_ack_fail, 0);
FW_TXDESC_SETFIELD_1(sc, txbuf, f_tx_rts_fail, 0);