net/sfc/base: import loopback control
[dpdk.git] / drivers / net / sfc / base / ef10_nic.c
index 538e18c..fec6a69 100644 (file)
@@ -1371,10 +1371,29 @@ ef10_nic_probe(
        edcp->edc_max_piobuf_count = 0;
        edcp->edc_pio_alloc_size = 0;
 
+#if EFSYS_OPT_MAC_STATS
+       /* Wipe the MAC statistics */
+       if ((rc = efx_mcdi_mac_stats_clear(enp)) != 0)
+               goto fail5;
+#endif
+
+#if EFSYS_OPT_LOOPBACK
+       if ((rc = efx_mcdi_get_loopback_modes(enp)) != 0)
+               goto fail6;
+#endif
+
        encp->enc_features = enp->en_features;
 
        return (0);
 
+#if EFSYS_OPT_LOOPBACK
+fail6:
+       EFSYS_PROBE(fail6);
+#endif
+#if EFSYS_OPT_MAC_STATS
+fail5:
+       EFSYS_PROBE(fail5);
+#endif
 fail4:
        EFSYS_PROBE(fail4);
 fail3:
@@ -1765,5 +1784,32 @@ ef10_nic_unprobe(
        (void) efx_mcdi_drv_attach(enp, B_FALSE);
 }
 
+#if EFSYS_OPT_DIAG
+
+       __checkReturn   efx_rc_t
+ef10_nic_register_test(
+       __in            efx_nic_t *enp)
+{
+       efx_rc_t rc;
+
+       /* FIXME */
+       _NOTE(ARGUNUSED(enp))
+       _NOTE(CONSTANTCONDITION)
+       if (B_FALSE) {
+               rc = ENOTSUP;
+               goto fail1;
+       }
+       /* FIXME */
+
+       return (0);
+
+fail1:
+       EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+       return (rc);
+}
+
+#endif /* EFSYS_OPT_DIAG */
+
 
 #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */