summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_dcreg.h
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2003-07-09 15:03:10 +0000
committermux <mux@FreeBSD.org>2003-07-09 15:03:10 +0000
commitdc662b45d0689bda946cf764e3f5e10837813e9a (patch)
treeaae6fa482f111ff418506867d468c19c1f9de031 /sys/pci/if_dcreg.h
parentb14a2d89ea07034f41b853267f8f06d65fc33377 (diff)
downloadFreeBSD-src-dc662b45d0689bda946cf764e3f5e10837813e9a.zip
FreeBSD-src-dc662b45d0689bda946cf764e3f5e10837813e9a.tar.gz
Make the dc(4) driver endian-clean, so to that it works on sparc64.
There are such cards in Netra X1 boxes, which should thus be fully supported now. Tested by: jake
Diffstat (limited to 'sys/pci/if_dcreg.h')
-rw-r--r--sys/pci/if_dcreg.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/pci/if_dcreg.h b/sys/pci/if_dcreg.h
index 506e81e..edbefef 100644
--- a/sys/pci/if_dcreg.h
+++ b/sys/pci/if_dcreg.h
@@ -472,6 +472,12 @@ struct dc_desc {
#define DC_TXDESC(sc, i) (sc->dc_laddr + \
(uintptr_t)(sc->dc_ldata->dc_tx_list + i) - (uintptr_t)sc->dc_ldata)
+#if BYTE_ORDER == BIG_ENDIAN
+#define DC_SP_MAC(x) ((x) << 16)
+#else
+#define DC_SP_MAC(x) (x)
+#endif
+
struct dc_list_data {
struct dc_desc dc_rx_list[DC_RX_LIST_CNT];
struct dc_desc dc_tx_list[DC_TX_LIST_CNT];
OpenPOWER on IntegriCloud