diff options
author | Henric Jungheim <henric@cvs.openbsd.org> | 2004-04-18 04:15:02 +0000 |
---|---|---|
committer | Henric Jungheim <henric@cvs.openbsd.org> | 2004-04-18 04:15:02 +0000 |
commit | a52be11a68b224fc7f4cc1012ca2452dff524ae1 (patch) | |
tree | 1cf6114918e879ec6a4f09390839ce9b5bc5817c /sys/dev/pci/if_em_osdep.h | |
parent | 8a4790a3b22005bef51373e7baebcd29da1853f4 (diff) |
Sync with FreeBSD's "em".
Diffstat (limited to 'sys/dev/pci/if_em_osdep.h')
-rw-r--r-- | sys/dev/pci/if_em_osdep.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/pci/if_em_osdep.h b/sys/dev/pci/if_em_osdep.h index 98f65819660..0037a78e019 100644 --- a/sys/dev/pci/if_em_osdep.h +++ b/sys/dev/pci/if_em_osdep.h @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ /*$FreeBSD: if_em_osdep.h,v 1.11 2003/05/02 21:17:08 pdeuskar Exp $*/ -/* $OpenBSD: if_em_osdep.h,v 1.2 2003/06/13 19:21:21 henric Exp $ */ +/* $OpenBSD: if_em_osdep.h,v 1.3 2004/04/18 04:15:01 henric Exp $ */ #ifndef _EM_OPENBSD_OS_H_ #define _EM_OPENBSD_OS_H_ @@ -109,5 +109,22 @@ struct em_osdep (E1000_82542_##reg + ((offset) << 2)), \ value) +#define em_io_read(hw, port) \ + bus_space_read_4(((struct em_osdep *)(hw)->back)->em_iobtag, \ + ((struct em_osdep *)(hw)->back)->em_iobhandle, (port)) + +#define em_io_write(hw, port, value) \ + bus_space_write_4(((struct em_osdep *)(hw)->back)->em_iobtag, \ + ((struct em_osdep *)(hw)->back)->em_iobhandle, \ + (port), (value)) + +#ifdef DEBUG +#define EM_KASSERT(exp,msg) do { if (!(exp)) panic msg; } while (0) +#else +#define EM_KASSERT(exp,msg) +#endif +#define bus_dma_tag_destroy(tag) +#define mtx_assert(a, b) splassert(IPL_NET) + #endif /* _EM_OPENBSD_OS_H_ */ |