Deleted Added
full compact
siena_nic.c (258676) siena_nic.c (278839)
1/*-
2 * Copyright 2009 Solarflare Communications Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright 2009 Solarflare Communications Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/siena_nic.c 258676 2013-11-27 08:39:48Z pluknet $");
27__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/siena_nic.c 278839 2015-02-16 06:12:04Z arybchik $");
28
29#include "efsys.h"
30#include "efx.h"
31#include "efx_impl.h"
32
33#if EFSYS_OPT_SIENA
34
35static __checkReturn int

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

319 req.emr_in_buf = NULL;
320 req.emr_in_length = 0;
321 req.emr_out_buf = outbuf;
322 req.emr_out_length = MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN;
323
324 efx_mcdi_execute(enp, &req);
325
326 if (req.emr_rc == 0) {
28
29#include "efsys.h"
30#include "efx.h"
31#include "efx_impl.h"
32
33#if EFSYS_OPT_SIENA
34
35static __checkReturn int

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

319 req.emr_in_buf = NULL;
320 req.emr_in_length = 0;
321 req.emr_out_buf = outbuf;
322 req.emr_out_length = MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN;
323
324 efx_mcdi_execute(enp, &req);
325
326 if (req.emr_rc == 0) {
327 if (req.emr_out_length_used < MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN) {
327 if (req.emr_out_length_used <
328 MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN) {
328 rc = EMSGSIZE;
329 goto fail3;
330 }
331
332 encp->enc_evq_limit = MCDI_OUT_DWORD(req,
333 GET_RESOURCE_LIMITS_OUT_EVQ);
334 encp->enc_txq_limit = MIN(EFX_TXQ_LIMIT_TARGET,
335 MCDI_OUT_DWORD(req, GET_RESOURCE_LIMITS_OUT_TXQ));

--- 634 unchanged lines hidden ---
329 rc = EMSGSIZE;
330 goto fail3;
331 }
332
333 encp->enc_evq_limit = MCDI_OUT_DWORD(req,
334 GET_RESOURCE_LIMITS_OUT_EVQ);
335 encp->enc_txq_limit = MIN(EFX_TXQ_LIMIT_TARGET,
336 MCDI_OUT_DWORD(req, GET_RESOURCE_LIMITS_OUT_TXQ));

--- 634 unchanged lines hidden ---