diff options
author | arybchik <arybchik@FreeBSD.org> | 2015-03-25 11:06:16 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2015-03-25 11:06:16 +0000 |
commit | 58c0feede71085510f3c84e28960f37c07108ea3 (patch) | |
tree | 886e54eac027868199dba72cf1c359407d0431f8 | |
parent | cd01d514359b39b1ade0c1254685dea6b681d56d (diff) | |
download | FreeBSD-src-58c0feede71085510f3c84e28960f37c07108ea3.zip FreeBSD-src-58c0feede71085510f3c84e28960f37c07108ea3.tar.gz |
MFC: 279141
sfxge: style fixes and cleanup
Sync endif comment with conditional.
BOOTROM and SIENA_BOOTROM are the same, but highlight that it is Siena.
Restore commented out assertion.
Sync comments with out-of-tree driver.
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
-rw-r--r-- | sys/dev/sfxge/common/efx_ev.c | 4 | ||||
-rw-r--r-- | sys/dev/sfxge/common/efx_filter.c | 7 | ||||
-rw-r--r-- | sys/dev/sfxge/common/efx_mcdi.c | 2 | ||||
-rw-r--r-- | sys/dev/sfxge/common/efx_nic.c | 9 | ||||
-rw-r--r-- | sys/dev/sfxge/common/efx_tx.c | 5 | ||||
-rw-r--r-- | sys/dev/sfxge/common/siena_mac.c | 1 | ||||
-rw-r--r-- | sys/dev/sfxge/common/siena_nic.c | 2 | ||||
-rw-r--r-- | sys/dev/sfxge/common/siena_nvram.c | 2 | ||||
-rw-r--r-- | sys/dev/sfxge/sfxge_tx.c | 4 |
9 files changed, 21 insertions, 15 deletions
diff --git a/sys/dev/sfxge/common/efx_ev.c b/sys/dev/sfxge/common/efx_ev.c index fb8fbd1..feed316 100644 --- a/sys/dev/sfxge/common/efx_ev.c +++ b/sys/dev/sfxge/common/efx_ev.c @@ -654,7 +654,7 @@ out: return (should_abort); } -#endif /* EFSYS_OPT_SIENA */ +#endif /* EFSYS_OPT_MCDI */ __checkReturn int efx_ev_qprime( @@ -970,7 +970,7 @@ efx_ev_qcreate( eep->ee_handler[FSE_AZ_EV_CODE_DRV_GEN_EV] = efx_ev_drv_gen; #if EFSYS_OPT_MCDI eep->ee_handler[FSE_AZ_EV_CODE_MCDI_EVRESPONSE] = efx_ev_mcdi; -#endif /* EFSYS_OPT_SIENA */ +#endif /* EFSYS_OPT_MCDI */ /* Set up the new event queue */ if (enp->en_family != EFX_FAMILY_FALCON) { diff --git a/sys/dev/sfxge/common/efx_filter.c b/sys/dev/sfxge/common/efx_filter.c index a8583b2..e8455db 100644 --- a/sys/dev/sfxge/common/efx_filter.c +++ b/sys/dev/sfxge/common/efx_filter.c @@ -412,7 +412,7 @@ efx_filter_search( __in uint32_t key, __in boolean_t for_insert, __out int *filter_index, - __out int *depth_required) + __out unsigned int *depth_required) { unsigned hash, incr, filter_idx, depth; @@ -528,7 +528,8 @@ efx_filter_remove_filter( efx_filter_tbl_t *eftp = &efp->ef_tbl[tbl_id]; efx_filter_spec_t *saved_spec; efx_oword_t filter; - int filter_idx, depth; + int filter_idx; + unsigned int depth; int state; uint32_t key; int rc; @@ -561,7 +562,7 @@ efx_filter_remove_index( __in int index) { efx_filter_t *efp = &enp->en_filter; - enum efx_filter_tbl_id tbl_id = efx_filter_tbl_id(type); + efx_filter_tbl_id_t tbl_id = efx_filter_tbl_id(type); efx_filter_tbl_t *eftp = &efp->ef_tbl[tbl_id]; int state; diff --git a/sys/dev/sfxge/common/efx_mcdi.c b/sys/dev/sfxge/common/efx_mcdi.c index 5853b06..3622165 100644 --- a/sys/dev/sfxge/common/efx_mcdi.c +++ b/sys/dev/sfxge/common/efx_mcdi.c @@ -532,7 +532,7 @@ efx_mcdi_version( version: /* The bootrom doesn't understand BOOT_STATUS */ - if (build == MC_CMD_GET_VERSION_OUT_FIRMWARE_BOOTROM) { + if (build == MC_CMD_GET_VERSION_OUT_FIRMWARE_SIENA_BOOTROM) { status = EFX_MCDI_BOOT_ROM; goto out; } diff --git a/sys/dev/sfxge/common/efx_nic.c b/sys/dev/sfxge/common/efx_nic.c index 2bb55d1..b0ba58c 100644 --- a/sys/dev/sfxge/common/efx_nic.c +++ b/sys/dev/sfxge/common/efx_nic.c @@ -249,10 +249,13 @@ efx_nic_create( #if EFSYS_OPT_SIENA case EFX_FAMILY_SIENA: enp->en_enop = (efx_nic_ops_t *)&__efx_nic_siena_ops; - enp->en_features = EFX_FEATURE_IPV6 | + enp->en_features = + EFX_FEATURE_IPV6 | EFX_FEATURE_LFSR_HASH_INSERT | - EFX_FEATURE_LINK_EVENTS | EFX_FEATURE_PERIODIC_MAC_STATS | - EFX_FEATURE_WOL | EFX_FEATURE_MCDI | + EFX_FEATURE_LINK_EVENTS | + EFX_FEATURE_PERIODIC_MAC_STATS | + EFX_FEATURE_WOL | + EFX_FEATURE_MCDI | EFX_FEATURE_LOOKAHEAD_SPLIT | EFX_FEATURE_MAC_HEADER_FILTERS; break; diff --git a/sys/dev/sfxge/common/efx_tx.c b/sys/dev/sfxge/common/efx_tx.c index dcc225d..2ee9c10 100644 --- a/sys/dev/sfxge/common/efx_tx.c +++ b/sys/dev/sfxge/common/efx_tx.c @@ -289,8 +289,9 @@ efx_tx_qcreate( EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TX); - EFX_STATIC_ASSERT(EFX_EV_TX_NLABELS == (1 << FRF_AZ_TX_DESCQ_LABEL_WIDTH)); - /* EFSYS_ASSERT3U(label, <, EFX_EV_TX_NLABELS);*/ + EFX_STATIC_ASSERT(EFX_EV_TX_NLABELS == + (1 << FRF_AZ_TX_DESCQ_LABEL_WIDTH)); + EFSYS_ASSERT3U(label, <, EFX_EV_TX_NLABELS); EFSYS_ASSERT3U(enp->en_tx_qcount + 1, <, encp->enc_txq_limit); if (!ISP2(n) || !(n & EFX_TXQ_NDESCS_MASK)) { diff --git a/sys/dev/sfxge/common/siena_mac.c b/sys/dev/sfxge/common/siena_mac.c index e5c8f3c..38f5bc5 100644 --- a/sys/dev/sfxge/common/siena_mac.c +++ b/sys/dev/sfxge/common/siena_mac.c @@ -534,6 +534,7 @@ siena_mac_stats_update( &generation_start); /* Check that we didn't read the stats in the middle of a DMA */ + /* Not a good enough check ? */ if (memcmp(&generation_start, &generation_end, sizeof (generation_start))) return (EAGAIN); diff --git a/sys/dev/sfxge/common/siena_nic.c b/sys/dev/sfxge/common/siena_nic.c index 7975924..1e97adb 100644 --- a/sys/dev/sfxge/common/siena_nic.c +++ b/sys/dev/sfxge/common/siena_nic.c @@ -478,7 +478,7 @@ siena_phy_cfg( if (MCDI_OUT_DWORD_FIELD(req, GET_PHY_CFG_OUT_FLAGS, GET_PHY_CFG_OUT_BIST)) encp->enc_bist_mask |= (1 << EFX_PHY_BIST_TYPE_NORMAL); -#endif /* EFSYS_OPT_BIST */ +#endif /* EFSYS_OPT_PHY_BIST */ return (0); diff --git a/sys/dev/sfxge/common/siena_nvram.c b/sys/dev/sfxge/common/siena_nvram.c index 249293d..daf8aab 100644 --- a/sys/dev/sfxge/common/siena_nvram.c +++ b/sys/dev/sfxge/common/siena_nvram.c @@ -612,7 +612,7 @@ siena_nvram_get_subtype( if (req.emr_out_length_used < MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST + - (partn + 1) * sizeof(efx_word_t)) { + (partn + 1) * sizeof (efx_word_t)) { rc = ENOENT; goto fail3; } diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c index 63dd8d7..ed78bee 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -505,7 +505,7 @@ sfxge_tx_qdpl_service(struct sfxge_txq *txq) * list", otherwise we atomically push it on the "put list". The swizzle * function takes care of ordering. * - * The length of the put list is bounded by SFXGE_TX_MAX_DEFFERED. We + * The length of the put list is bounded by SFXGE_TX_MAX_DEFERRED. We * overload the csum_data field in the mbuf to keep track of this length * because there is no cheap alternative to avoid races. */ @@ -569,7 +569,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, struct mbuf *mbuf, int locked) /* * Called from if_transmit - will try to grab the txq lock and enqueue to the - * put list if it succeeds, otherwise will push onto the defer list. + * put list if it succeeds, otherwise try to push onto the defer list if space. */ int sfxge_tx_packet_add(struct sfxge_txq *txq, struct mbuf *m) |