summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarybchik <arybchik@FreeBSD.org>2016-05-11 06:16:53 +0000
committerarybchik <arybchik@FreeBSD.org>2016-05-11 06:16:53 +0000
commit7ca4dd68968ce335bd79aa5d78944799d1341296 (patch)
tree08b53eb71493e7ede3477ec0c4523b8c382b3522
parent8e30d77ca42e55114300e4e9a8de1811497c0bc1 (diff)
downloadFreeBSD-src-7ca4dd68968ce335bd79aa5d78944799d1341296.zip
FreeBSD-src-7ca4dd68968ce335bd79aa5d78944799d1341296.tar.gz
sfxge(4): remove Falcon-specific code paths from common code
Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6289
-rw-r--r--sys/dev/sfxge/common/efx.h3
-rw-r--r--sys/dev/sfxge/common/efx_ev.c41
-rw-r--r--sys/dev/sfxge/common/efx_impl.h4
-rw-r--r--sys/dev/sfxge/common/efx_intr.c21
-rw-r--r--sys/dev/sfxge/common/efx_rx.c7
5 files changed, 16 insertions, 60 deletions
diff --git a/sys/dev/sfxge/common/efx.h b/sys/dev/sfxge/common/efx.h
index 667bb72..37b0855 100644
--- a/sys/dev/sfxge/common/efx.h
+++ b/sys/dev/sfxge/common/efx.h
@@ -59,7 +59,7 @@ typedef __success(return == 0) int efx_rc_t;
typedef enum efx_family_e {
EFX_FAMILY_INVALID,
- EFX_FAMILY_FALCON,
+ EFX_FAMILY_FALCON, /* Obsolete and not supported */
EFX_FAMILY_SIENA,
EFX_FAMILY_HUNTINGTON,
EFX_FAMILY_MEDFORD,
@@ -246,7 +246,6 @@ efx_mcdi_fini(
/* INTR */
-#define EFX_NINTR_FALCON 64
#define EFX_NINTR_SIENA 1024
typedef enum efx_intr_type_e {
diff --git a/sys/dev/sfxge/common/efx_ev.c b/sys/dev/sfxge/common/efx_ev.c
index 317dc6a..3bb0636 100644
--- a/sys/dev/sfxge/common/efx_ev.c
+++ b/sys/dev/sfxge/common/efx_ev.c
@@ -547,7 +547,6 @@ falconsiena_ev_rx(
__in const efx_ev_callbacks_t *eecp,
__in_opt void *arg)
{
- efx_nic_t *enp = eep->ee_enp;
uint32_t id;
uint32_t size;
uint32_t label;
@@ -577,8 +576,7 @@ falconsiena_ev_rx(
hdr_type = EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_HDR_TYPE);
- is_v6 = (enp->en_family != EFX_FAMILY_FALCON &&
- EFX_QWORD_FIELD(*eqp, FSF_CZ_RX_EV_IPV6_PKT) != 0);
+ is_v6 = (EFX_QWORD_FIELD(*eqp, FSF_CZ_RX_EV_IPV6_PKT) != 0);
/*
* If packet is marked as OK and packet type is TCP/IP or
@@ -671,7 +669,7 @@ falconsiena_ev_rx(
* (which clears PKT_OK). If this is set, then don't trust
* the PKT_TYPE field.
*/
- if (enp->en_family != EFX_FAMILY_FALCON && !ok) {
+ if (!ok) {
uint32_t parse_err;
parse_err = EFX_QWORD_FIELD(*eqp, FSF_CZ_RX_EV_PKT_NOT_PARSED);
@@ -1222,14 +1220,9 @@ falconsiena_ev_qmoderate(
/* If the value is zero then disable the timer */
if (us == 0) {
- if (enp->en_family == EFX_FAMILY_FALCON)
- EFX_POPULATE_DWORD_2(dword,
- FRF_AB_TC_TIMER_MODE, FFE_AB_TIMER_MODE_DIS,
- FRF_AB_TC_TIMER_VAL, 0);
- else
- EFX_POPULATE_DWORD_2(dword,
- FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_DIS,
- FRF_CZ_TC_TIMER_VAL, 0);
+ EFX_POPULATE_DWORD_2(dword,
+ FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_DIS,
+ FRF_CZ_TC_TIMER_VAL, 0);
} else {
uint32_t timer_val;
@@ -1240,14 +1233,9 @@ falconsiena_ev_qmoderate(
if (timer_val > 0)
timer_val--;
- if (enp->en_family == EFX_FAMILY_FALCON)
- EFX_POPULATE_DWORD_2(dword,
- FRF_AB_TC_TIMER_MODE, FFE_AB_TIMER_MODE_INT_HLDOFF,
- FRF_AB_TIMER_VAL, timer_val);
- else
- EFX_POPULATE_DWORD_2(dword,
- FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_INT_HLDOFF,
- FRF_CZ_TC_TIMER_VAL, timer_val);
+ EFX_POPULATE_DWORD_2(dword,
+ FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_INT_HLDOFF,
+ FRF_CZ_TC_TIMER_VAL, timer_val);
}
locked = (eep->ee_index == 0) ? 1 : 0;
@@ -1315,10 +1303,8 @@ falconsiena_ev_qcreate(
#endif /* EFSYS_OPT_MCDI */
/* Set up the new event queue */
- if (enp->en_family != EFX_FAMILY_FALCON) {
- EFX_POPULATE_OWORD_1(oword, FRF_CZ_TIMER_Q_EN, 1);
- EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL, index, &oword, B_TRUE);
- }
+ EFX_POPULATE_OWORD_1(oword, FRF_CZ_TIMER_Q_EN, 1);
+ EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL, index, &oword, B_TRUE);
EFX_POPULATE_OWORD_3(oword, FRF_AZ_EVQ_EN, 1, FRF_AZ_EVQ_SIZE, size,
FRF_AZ_EVQ_BUF_BASE_ID, id);
@@ -1432,11 +1418,8 @@ falconsiena_ev_qdestroy(
EFX_BAR_TBL_WRITEO(enp, FR_AZ_EVQ_PTR_TBL,
eep->ee_index, &oword, B_TRUE);
- if (enp->en_family != EFX_FAMILY_FALCON) {
- EFX_ZERO_OWORD(oword);
- EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL,
- eep->ee_index, &oword, B_TRUE);
- }
+ EFX_ZERO_OWORD(oword);
+ EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL, eep->ee_index, &oword, B_TRUE);
}
static void
diff --git a/sys/dev/sfxge/common/efx_impl.h b/sys/dev/sfxge/common/efx_impl.h
index 12db206..9ab7f97 100644
--- a/sys/dev/sfxge/common/efx_impl.h
+++ b/sys/dev/sfxge/common/efx_impl.h
@@ -788,10 +788,6 @@ struct efx_txq_s {
char rev; \
\
switch ((_enp)->en_family) { \
- case EFX_FAMILY_FALCON: \
- rev = 'B'; \
- break; \
- \
case EFX_FAMILY_SIENA: \
rev = 'C'; \
break; \
diff --git a/sys/dev/sfxge/common/efx_intr.c b/sys/dev/sfxge/common/efx_intr.c
index 555b1ee..a1029c4 100644
--- a/sys/dev/sfxge/common/efx_intr.c
+++ b/sys/dev/sfxge/common/efx_intr.c
@@ -397,24 +397,9 @@ falconsiena_intr_trigger(
/* bug16757: No event queues can be initialized */
EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_EV));
- switch (enp->en_family) {
- case EFX_FAMILY_FALCON:
- if (level >= EFX_NINTR_FALCON) {
- rc = EINVAL;
- goto fail1;
- }
- break;
-
- case EFX_FAMILY_SIENA:
- if (level >= EFX_NINTR_SIENA) {
- rc = EINVAL;
- goto fail1;
- }
- break;
-
- default:
- EFSYS_ASSERT(B_FALSE);
- break;
+ if (level >= EFX_NINTR_SIENA) {
+ rc = EINVAL;
+ goto fail1;
}
if (level > EFX_MASK32(FRF_AZ_KER_INT_LEVE_SEL))
diff --git a/sys/dev/sfxge/common/efx_rx.c b/sys/dev/sfxge/common/efx_rx.c
index 13d1f69..ad683b1 100644
--- a/sys/dev/sfxge/common/efx_rx.c
+++ b/sys/dev/sfxge/common/efx_rx.c
@@ -692,11 +692,6 @@ fail1:
do { \
efx_oword_t oword; \
\
- if ((_enp)->en_family == EFX_FAMILY_FALCON) { \
- (_rc) = ((_ip) || (_tcp)) ? ENOTSUP : 0; \
- break; \
- } \
- \
EFX_BAR_READO((_enp), FR_CZ_RX_RSS_IPV6_REG3, &oword); \
EFX_SET_OWORD_FIELD(oword, \
FRF_CZ_RX_RSS_IPV6_THASH_ENABLE, 1); \
@@ -799,8 +794,6 @@ falconsiena_rx_scale_key_set(
if ((enp->en_features & EFX_FEATURE_IPV6) == 0)
goto done;
- EFSYS_ASSERT3U(enp->en_family, !=, EFX_FAMILY_FALCON);
-
byte = 0;
/* Write Toeplitz IPv6 hash key 3 */
OpenPOWER on IntegriCloud