summaryrefslogtreecommitdiffstats
path: root/sys/dev/em/if_em_osdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/em/if_em_osdep.h')
-rw-r--r--sys/dev/em/if_em_osdep.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/sys/dev/em/if_em_osdep.h b/sys/dev/em/if_em_osdep.h
index 2a50b5a..f18f446 100644
--- a/sys/dev/em/if_em_osdep.h
+++ b/sys/dev/em/if_em_osdep.h
@@ -1,6 +1,6 @@
/**************************************************************************
-Copyright (c) 2001-2002, Intel Corporation
+Copyright (c) 2001-2003, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -92,24 +92,15 @@ struct em_osdep
#define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS)
#define E1000_READ_REG(a, reg) (\
- ((a)->mac_type >= em_82543) ? \
bus_space_read_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
- E1000_##reg): \
- bus_space_read_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
- ((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
- E1000_82542_##reg))
-
+ ((a)->mac_type >= em_82543) ? E1000_##reg : E1000_82542_##reg))
#define E1000_WRITE_REG(a, reg, value) (\
- ((a)->mac_type >= em_82543) ? \
bus_space_write_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
- E1000_##reg, value): \
- bus_space_write_4( ((struct em_osdep *)(a)->back)->mem_bus_space_tag, \
- ((struct em_osdep *)(a)->back)->mem_bus_space_handle, \
- E1000_82542_##reg, value))
-
+ ((a)->mac_type >= em_82543) ? E1000_##reg : E1000_82542_##reg, \
+ value))
#define E1000_READ_REG_ARRAY(a, reg, offset) (\
((a)->mac_type >= em_82543) ? \
OpenPOWER on IntegriCloud