diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-11-18 05:22:07 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-11-18 05:22:07 +0000 |
commit | 6e88c00d7fb2766c4bf8303d30bd4f1e30f1ac23 (patch) | |
tree | 638a3d8b152e94a2107b449e17a41395d5d7478d /sys/dev/pci | |
parent | fdff19ece8ba1e42f2b80a08e13839f086698e69 (diff) |
fix wrong htole usage in the 82544 PCI-X workaround codepath in em_encap().
From FreeBSD
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_em.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 1ae31ab8453..304d718e125 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.90 2005/11/18 03:58:14 brad Exp $ */ +/* $OpenBSD: if_em.c,v 1.91 2005/11/18 05:22:06 brad Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -878,7 +878,6 @@ em_encap(struct em_softc *sc, struct mbuf *m_head) u_int32_t txd_upper; u_int32_t txd_lower, txd_used = 0, txd_saved = 0; int i, j, error; - u_int64_t address; /* For 82544 Workaround */ DESC_ARRAY desc_array; @@ -937,15 +936,13 @@ em_encap(struct em_softc *sc, struct mbuf *m_head) } for (j = 0; j < q.map->dm_nsegs; j++) { /* If sc is 82544 and on PCIX bus */ - if(sc->pcix_82544) { - array_elements = 0; - address = htole64(q.map->dm_segs[j].ds_addr); + if (sc->pcix_82544) { /* * Check the Address and Length combination and * split the data accordingly */ - array_elements = em_fill_descriptors(address, - htole32(q.map->dm_segs[j].ds_len), + array_elements = em_fill_descriptors(q.map->dm_segs[j].ds_addr, + q.map->dm_segs[j].ds_len, &desc_array); for (counter = 0; counter < array_elements; counter++) { if (txd_used == sc->num_tx_desc_avail) { |