Deleted Added
full compact
sfxge.h (277894) sfxge.h (278221)
1/*-
2 * Copyright (c) 2010-2011 Solarflare Communications, Inc.
3 * All rights reserved.
4 *
5 * This software was developed in part by Philip Paeps under contract for
6 * Solarflare Communications, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2010-2011 Solarflare Communications, Inc.
3 * All rights reserved.
4 *
5 * This software was developed in part by Philip Paeps under contract for
6 * Solarflare Communications, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/sfxge/sfxge.h 277894 2015-01-29 19:09:14Z arybchik $
29 * $FreeBSD: head/sys/dev/sfxge/sfxge.h 278221 2015-02-04 20:03:57Z arybchik $
30 */
31
32#ifndef _SFXGE_H
33#define _SFXGE_H
34
35#include <sys/param.h>
36#include <sys/kernel.h>
37#include <sys/condvar.h>

--- 271 unchanged lines hidden (view full) ---

309extern void sfxge_port_stop(struct sfxge_softc *sc);
310extern void sfxge_mac_link_update(struct sfxge_softc *sc,
311 efx_link_mode_t mode);
312extern int sfxge_mac_filter_set(struct sfxge_softc *sc);
313extern int sfxge_port_ifmedia_init(struct sfxge_softc *sc);
314
315#define SFXGE_MAX_MTU (9 * 1024)
316
30 */
31
32#ifndef _SFXGE_H
33#define _SFXGE_H
34
35#include <sys/param.h>
36#include <sys/kernel.h>
37#include <sys/condvar.h>

--- 271 unchanged lines hidden (view full) ---

309extern void sfxge_port_stop(struct sfxge_softc *sc);
310extern void sfxge_mac_link_update(struct sfxge_softc *sc,
311 efx_link_mode_t mode);
312extern int sfxge_mac_filter_set(struct sfxge_softc *sc);
313extern int sfxge_port_ifmedia_init(struct sfxge_softc *sc);
314
315#define SFXGE_MAX_MTU (9 * 1024)
316
317#define SFXGE_ADAPTER_LOCK_INIT(_sc, _name) \
318 sx_init(&(_sc)->softc_lock, (_name))
319#define SFXGE_ADAPTER_LOCK_DESTROY(_sc) \
320 sx_destroy(&(_sc)->softc_lock)
321#define SFXGE_ADAPTER_LOCK(_sc) \
322 sx_xlock(&(_sc)->softc_lock)
323#define SFXGE_ADAPTER_UNLOCK(_sc) \
324 sx_xunlock(&(_sc)->softc_lock)
325#define SFXGE_ADAPTER_LOCK_ASSERT_OWNED(_sc) \
326 sx_assert(&(_sc)->softc_lock, LA_XLOCKED)
327
328#define SFXGE_PORT_LOCK_INIT(_port, _name) \
329 mtx_init(&(_port)->lock, (_name), NULL, MTX_DEF)
330#define SFXGE_PORT_LOCK_DESTROY(_port) \
331 mtx_destroy(&(_port)->lock)
332#define SFXGE_PORT_LOCK(_port) \
333 mtx_lock(&(_port)->lock)
334#define SFXGE_PORT_UNLOCK(_port) \
335 mtx_unlock(&(_port)->lock)
336#define SFXGE_PORT_LOCK_ASSERT_OWNED(_port) \
337 mtx_assert(&(_port)->lock, MA_OWNED)
338
339#define SFXGE_MCDI_LOCK_INIT(_mcdi, _name) \
340 mtx_init(&(_mcdi)->lock, (_name), NULL, MTX_DEF)
341#define SFXGE_MCDI_LOCK_DESTROY(_mcdi) \
342 mtx_destroy(&(_mcdi)->lock)
343#define SFXGE_MCDI_LOCK(_mcdi) \
344 mtx_lock(&(_mcdi)->lock)
345#define SFXGE_MCDI_UNLOCK(_mcdi) \
346 mtx_unlock(&(_mcdi)->lock)
347#define SFXGE_MCDI_LOCK_ASSERT_OWNED(_mcdi) \
348 mtx_assert(&(_mcdi)->lock, MA_OWNED)
349
350#define SFXGE_EVQ_LOCK_INIT(_evq, _name) \
351 mtx_init(&(_evq)->lock, (_name), NULL, MTX_DEF)
352#define SFXGE_EVQ_LOCK_DESTROY(_evq) \
353 mtx_destroy(&(_evq)->lock)
354#define SFXGE_EVQ_LOCK(_evq) \
355 mtx_lock(&(_evq)->lock)
356#define SFXGE_EVQ_UNLOCK(_evq) \
357 mtx_unlock(&(_evq)->lock)
358#define SFXGE_EVQ_LOCK_ASSERT_OWNED(_evq) \
359 mtx_assert(&(_evq)->lock, MA_OWNED)
360
317#endif /* _SFXGE_H */
361#endif /* _SFXGE_H */