svn commit: r311095 - stable/10/sys/dev/sfxge/common
Andrew Rybchenko
arybchik at FreeBSD.org
Mon Jan 2 09:49:42 UTC 2017
Author: arybchik
Date: Mon Jan 2 09:49:40 2017
New Revision: 311095
URL: https://svnweb.freebsd.org/changeset/base/311095
Log:
MFC r310819
sfxge(4): cleanup: add efsys_lock_state_t for type of state param in EFSYS_LOCK()
This allows the common code to use the correct type for the lock state
local variable passed to EFSYS_LOCK() and EFSYS_UNLOCK().
On Windows, this allows warning supression pragmas to be removed.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Modified:
stable/10/sys/dev/sfxge/common/ef10_filter.c
stable/10/sys/dev/sfxge/common/efsys.h
stable/10/sys/dev/sfxge/common/efx_filter.c
stable/10/sys/dev/sfxge/common/efx_mcdi.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/sfxge/common/ef10_filter.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_filter.c Mon Jan 2 09:48:34 2017 (r311094)
+++ stable/10/sys/dev/sfxge/common/ef10_filter.c Mon Jan 2 09:49:40 2017 (r311095)
@@ -484,7 +484,7 @@ ef10_filter_restore(
efx_filter_spec_t *spec;
ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
boolean_t restoring;
- int state;
+ efsys_lock_state_t state;
efx_rc_t rc;
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
@@ -559,7 +559,7 @@ ef10_filter_add_internal(
int ins_index;
boolean_t replacing = B_FALSE;
unsigned int i;
- int state;
+ efsys_lock_state_t state;
boolean_t locked = B_FALSE;
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
@@ -761,7 +761,7 @@ ef10_filter_delete_internal(
efx_rc_t rc;
ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
efx_filter_spec_t *spec;
- int state;
+ efsys_lock_state_t state;
uint32_t filter_idx = filter_id % EFX_EF10_FILTER_TBL_ROWS;
/*
@@ -835,7 +835,7 @@ ef10_filter_delete(
unsigned int hash;
unsigned int depth;
unsigned int i;
- int state;
+ efsys_lock_state_t state;
boolean_t locked = B_FALSE;
EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
Modified: stable/10/sys/dev/sfxge/common/efsys.h
==============================================================================
--- stable/10/sys/dev/sfxge/common/efsys.h Mon Jan 2 09:48:34 2017 (r311094)
+++ stable/10/sys/dev/sfxge/common/efsys.h Mon Jan 2 09:49:40 2017 (r311095)
@@ -1095,6 +1095,8 @@ typedef struct efsys_lock_s {
#define SFXGE_EFSYS_LOCK_ASSERT_OWNED(_eslp) \
mtx_assert(&(_eslp)->lock, MA_OWNED)
+typedef int efsys_lock_state_t;
+
#define EFSYS_LOCK_MAGIC 0x000010c4
#define EFSYS_LOCK(_lockp, _state) \
Modified: stable/10/sys/dev/sfxge/common/efx_filter.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_filter.c Mon Jan 2 09:48:34 2017 (r311094)
+++ stable/10/sys/dev/sfxge/common/efx_filter.c Mon Jan 2 09:49:40 2017 (r311095)
@@ -1030,7 +1030,7 @@ siena_filter_tbl_clear(
siena_filter_t *sfp = enp->en_filter.ef_siena_filter;
siena_filter_tbl_t *sftp = &sfp->sf_tbl[tbl_id];
int index;
- int state;
+ efsys_lock_state_t state;
EFSYS_LOCK(enp->en_eslp, state);
@@ -1178,7 +1178,7 @@ siena_filter_restore(
siena_filter_spec_t *spec;
efx_oword_t filter;
int filter_idx;
- int state;
+ efsys_lock_state_t state;
uint32_t key;
efx_rc_t rc;
@@ -1236,7 +1236,7 @@ siena_filter_add(
efx_oword_t filter;
int filter_idx;
unsigned int depth;
- int state;
+ efsys_lock_state_t state;
uint32_t key;
@@ -1317,7 +1317,7 @@ siena_filter_delete(
efx_oword_t filter;
int filter_idx;
unsigned int depth;
- int state;
+ efsys_lock_state_t state;
uint32_t key;
EFSYS_ASSERT3P(spec, !=, NULL);
Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_mcdi.c Mon Jan 2 09:48:34 2017 (r311094)
+++ stable/10/sys/dev/sfxge/common/efx_mcdi.c Mon Jan 2 09:49:40 2017 (r311095)
@@ -181,7 +181,7 @@ efx_mcdi_new_epoch(
__in efx_nic_t *enp)
{
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
- int state;
+ efsys_lock_state_t state;
/* Start a new epoch (allow fresh MCDI requests to succeed) */
EFSYS_LOCK(enp->en_eslp, state);
@@ -252,7 +252,7 @@ efx_mcdi_request_start(
unsigned int seq;
unsigned int xflags;
boolean_t new_epoch;
- int state;
+ efsys_lock_state_t state;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MCDI);
@@ -500,7 +500,7 @@ efx_mcdi_request_poll(
{
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
efx_mcdi_req_t *emrp;
- int state;
+ efsys_lock_state_t state;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -568,7 +568,7 @@ efx_mcdi_request_abort(
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
efx_mcdi_req_t *emrp;
boolean_t aborted;
- int state;
+ efsys_lock_state_t state;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MCDI);
@@ -743,7 +743,7 @@ efx_mcdi_ev_cpl(
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
efx_mcdi_req_t *emrp;
- int state;
+ efsys_lock_state_t state;
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MCDI);
EFSYS_ASSERT3U(enp->en_features, &, EFX_FEATURE_MCDI);
@@ -854,7 +854,7 @@ efx_mcdi_ev_death(
const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
efx_mcdi_req_t *emrp = NULL;
boolean_t ev_cpl;
- int state;
+ efsys_lock_state_t state;
/*
* The MCDI request (if there is one) has been terminated, either
More information about the svn-src-stable
mailing list