summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_sisreg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/if_sisreg.h')
-rw-r--r--sys/dev/pci/if_sisreg.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/if_sisreg.h b/sys/dev/pci/if_sisreg.h
index 6a2d745f691..0aa4aff3841 100644
--- a/sys/dev/pci/if_sisreg.h
+++ b/sys/dev/pci/if_sisreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sisreg.h,v 1.30 2009/06/04 18:12:56 sthen Exp $ */
+/* $OpenBSD: if_sisreg.h,v 1.31 2009/07/22 21:32:50 miod Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -340,10 +340,11 @@ struct sis_desc {
#define SIS_CMDSTS_MORE 0x40000000
#define SIS_CMDSTS_OWN 0x80000000
-#define SIS_LASTDESC(x) (!((x)->sis_ctl & SIS_CMDSTS_MORE)))
-#define SIS_OWNDESC(x) ((x)->sis_ctl & SIS_CMDSTS_OWN)
+#define SIS_LASTDESC(x) (!(letoh32((x)->sis_ctl) & SIS_CMDSTS_MORE)))
+#define SIS_OWNDESC(x) (letoh32((x)->sis_ctl) & SIS_CMDSTS_OWN)
#define SIS_INC(x, y) (x) = ((x) == ((y)-1)) ? 0 : (x)+1
-#define SIS_RXBYTES(x) (((x)->sis_ctl & SIS_CMDSTS_BUFLEN) - ETHER_CRC_LEN)
+#define SIS_RXBYTES(x) \
+ ((letoh32((x)->sis_ctl) & SIS_CMDSTS_BUFLEN) - ETHER_CRC_LEN)
#define SIS_RXSTAT_COLL 0x00010000
#define SIS_RXSTAT_LOOPBK 0x00020000