Deleted Added
full compact
sfxge.c (278250) sfxge.c (279184)
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

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

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
30#include <sys/cdefs.h>
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

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

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
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/sfxge/sfxge.c 278250 2015-02-05 11:39:15Z arybchik $");
31__FBSDID("$FreeBSD: head/sys/dev/sfxge/sfxge.c 279184 2015-02-22 19:25:57Z arybchik $");
32
33#include <sys/param.h>
34#include <sys/kernel.h>
35#include <sys/bus.h>
36#include <sys/rman.h>
37#include <sys/lock.h>
38#include <sys/module.h>
39#include <sys/mutex.h>

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

56#include "common/efx.h"
57
58#include "sfxge.h"
59#include "sfxge_rx.h"
60
61#define SFXGE_CAP (IFCAP_VLAN_MTU | \
62 IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \
63 IFCAP_JUMBO_MTU | IFCAP_LRO | \
32
33#include <sys/param.h>
34#include <sys/kernel.h>
35#include <sys/bus.h>
36#include <sys/rman.h>
37#include <sys/lock.h>
38#include <sys/module.h>
39#include <sys/mutex.h>

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

56#include "common/efx.h"
57
58#include "sfxge.h"
59#include "sfxge_rx.h"
60
61#define SFXGE_CAP (IFCAP_VLAN_MTU | \
62 IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \
63 IFCAP_JUMBO_MTU | IFCAP_LRO | \
64 IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE)
64 IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWSTATS)
65#define SFXGE_CAP_ENABLE SFXGE_CAP
66#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \
65#define SFXGE_CAP_ENABLE SFXGE_CAP
66#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \
67 IFCAP_JUMBO_MTU | IFCAP_LINKSTATE)
67 IFCAP_JUMBO_MTU | IFCAP_LINKSTATE | IFCAP_HWSTATS)
68
69MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver");
70
71
72SYSCTL_NODE(_hw, OID_AUTO, sfxge, CTLFLAG_RD, 0,
73 "SFXGE driver parameters");
74
75#define SFXGE_PARAM_RX_RING SFXGE_PARAM(rx_ring)

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

338 ifp->if_snd.ifq_drv_maxlen = sc->txq_entries - 1;
339 IFQ_SET_READY(&ifp->if_snd);
340
341 snprintf(sc->tx_lock_name, sizeof(sc->tx_lock_name),
342 "%s:tx", device_get_nameunit(sc->dev));
343 mtx_init(&sc->tx_lock, sc->tx_lock_name, NULL, MTX_DEF);
344#endif
345
68
69MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver");
70
71
72SYSCTL_NODE(_hw, OID_AUTO, sfxge, CTLFLAG_RD, 0,
73 "SFXGE driver parameters");
74
75#define SFXGE_PARAM_RX_RING SFXGE_PARAM(rx_ring)

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

338 ifp->if_snd.ifq_drv_maxlen = sc->txq_entries - 1;
339 IFQ_SET_READY(&ifp->if_snd);
340
341 snprintf(sc->tx_lock_name, sizeof(sc->tx_lock_name),
342 "%s:tx", device_get_nameunit(sc->dev));
343 mtx_init(&sc->tx_lock, sc->tx_lock_name, NULL, MTX_DEF);
344#endif
345
346 ifp->if_get_counter = sfxge_get_counter;
347
346 if ((rc = sfxge_port_ifmedia_init(sc)) != 0)
347 goto fail;
348
349 return (0);
350
351fail:
352 ether_ifdetach(sc->ifnet);
353 return (rc);

--- 472 unchanged lines hidden ---
348 if ((rc = sfxge_port_ifmedia_init(sc)) != 0)
349 goto fail;
350
351 return (0);
352
353fail:
354 ether_ifdetach(sc->ifnet);
355 return (rc);

--- 472 unchanged lines hidden ---