summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgb/if_ixgb.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2005-04-05 05:05:29 +0000
committeralc <alc@FreeBSD.org>2005-04-05 05:05:29 +0000
commit1e3e9d828baf2224a03932507bf5f7a61d210c42 (patch)
treee1cefdf0480d24859ebb7b38bc7adce3aeebf081 /sys/dev/ixgb/if_ixgb.h
parent1db6f984bc833564c7c17621a845a89b5e2b8f17 (diff)
downloadFreeBSD-src-1e3e9d828baf2224a03932507bf5f7a61d210c42.zip
FreeBSD-src-1e3e9d828baf2224a03932507bf5f7a61d210c42.tar.gz
Add locking and enable INTR_MPSAFE. Eliminate spl calls.
Submitted by: Paul Willmann willmann at rice dot edu MFC After: 3 weeks
Diffstat (limited to 'sys/dev/ixgb/if_ixgb.h')
-rw-r--r--sys/dev/ixgb/if_ixgb.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/ixgb/if_ixgb.h b/sys/dev/ixgb/if_ixgb.h
index 2ea7dae..9b86f61 100644
--- a/sys/dev/ixgb/if_ixgb.h
+++ b/sys/dev/ixgb/if_ixgb.h
@@ -289,9 +289,10 @@ struct adapter {
struct resource *res_interrupt;
void *int_handler_tag;
struct ifmedia media;
- struct callout_handle timer_handle;
+ struct callout timer;
int io_rid;
u_int8_t unit;
+ struct mtx mtx;
/* Info about the board itself */
u_int32_t part_num;
@@ -376,4 +377,11 @@ struct adapter {
struct ixgb_hw_stats stats;
};
+#define IXGB_LOCK_INIT(_sc, _name) \
+ mtx_init(&(_sc)->mtx, _name, MTX_NETWORK_LOCK, MTX_DEF)
+#define IXGB_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->mtx)
+#define IXGB_LOCK(_sc) mtx_lock(&(_sc)->mtx)
+#define IXGB_UNLOCK(_sc) mtx_unlock(&(_sc)->mtx)
+#define IXGB_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED)
+
#endif /* _IXGB_H_DEFINED_ */
OpenPOWER on IntegriCloud