xref: /freebsd/sys/dev/sfxge/common/medford_nic.c (revision 6de7c598a411fcf89dca260c3a7206f5b039a5f5)
15f5c71ccSAndrew Rybchenko /*-
25f5c71ccSAndrew Rybchenko  * Copyright (c) 2015 Solarflare Communications Inc.
35f5c71ccSAndrew Rybchenko  * All rights reserved.
45f5c71ccSAndrew Rybchenko  *
55f5c71ccSAndrew Rybchenko  * Redistribution and use in source and binary forms, with or without
65f5c71ccSAndrew Rybchenko  * modification, are permitted provided that the following conditions are met:
75f5c71ccSAndrew Rybchenko  *
85f5c71ccSAndrew Rybchenko  * 1. Redistributions of source code must retain the above copyright notice,
95f5c71ccSAndrew Rybchenko  *    this list of conditions and the following disclaimer.
105f5c71ccSAndrew Rybchenko  * 2. Redistributions in binary form must reproduce the above copyright notice,
115f5c71ccSAndrew Rybchenko  *    this list of conditions and the following disclaimer in the documentation
125f5c71ccSAndrew Rybchenko  *    and/or other materials provided with the distribution.
135f5c71ccSAndrew Rybchenko  *
145f5c71ccSAndrew Rybchenko  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
155f5c71ccSAndrew Rybchenko  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
165f5c71ccSAndrew Rybchenko  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
175f5c71ccSAndrew Rybchenko  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
185f5c71ccSAndrew Rybchenko  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
195f5c71ccSAndrew Rybchenko  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
205f5c71ccSAndrew Rybchenko  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
215f5c71ccSAndrew Rybchenko  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
225f5c71ccSAndrew Rybchenko  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
235f5c71ccSAndrew Rybchenko  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
245f5c71ccSAndrew Rybchenko  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
255f5c71ccSAndrew Rybchenko  *
265f5c71ccSAndrew Rybchenko  * The views and conclusions contained in the software and documentation are
275f5c71ccSAndrew Rybchenko  * those of the authors and should not be interpreted as representing official
285f5c71ccSAndrew Rybchenko  * policies, either expressed or implied, of the FreeBSD Project.
295f5c71ccSAndrew Rybchenko  */
305f5c71ccSAndrew Rybchenko 
315f5c71ccSAndrew Rybchenko #include <sys/cdefs.h>
325f5c71ccSAndrew Rybchenko __FBSDID("$FreeBSD$");
335f5c71ccSAndrew Rybchenko 
345f5c71ccSAndrew Rybchenko #include "efx.h"
355f5c71ccSAndrew Rybchenko #include "efx_impl.h"
365f5c71ccSAndrew Rybchenko #include "mcdi_mon.h"
375f5c71ccSAndrew Rybchenko 
385f5c71ccSAndrew Rybchenko #if EFSYS_OPT_MEDFORD
395f5c71ccSAndrew Rybchenko 
405f5c71ccSAndrew Rybchenko #include "ef10_tlv_layout.h"
415f5c71ccSAndrew Rybchenko 
42*6de7c598SAndrew Rybchenko static	__checkReturn	efx_rc_t
43*6de7c598SAndrew Rybchenko efx_mcdi_get_rxdp_config(
44*6de7c598SAndrew Rybchenko 	__in		efx_nic_t *enp,
45*6de7c598SAndrew Rybchenko 	__out		uint32_t *end_paddingp)
46*6de7c598SAndrew Rybchenko {
47*6de7c598SAndrew Rybchenko 	efx_mcdi_req_t req;
48*6de7c598SAndrew Rybchenko 	uint8_t payload[MAX(MC_CMD_GET_RXDP_CONFIG_IN_LEN,
49*6de7c598SAndrew Rybchenko 			    MC_CMD_GET_RXDP_CONFIG_OUT_LEN)];
50*6de7c598SAndrew Rybchenko 	uint32_t end_padding;
51*6de7c598SAndrew Rybchenko 	efx_rc_t rc;
52*6de7c598SAndrew Rybchenko 
53*6de7c598SAndrew Rybchenko 	memset(payload, 0, sizeof (payload));
54*6de7c598SAndrew Rybchenko 	req.emr_cmd = MC_CMD_GET_RXDP_CONFIG;
55*6de7c598SAndrew Rybchenko 	req.emr_in_buf = payload;
56*6de7c598SAndrew Rybchenko 	req.emr_in_length = MC_CMD_GET_RXDP_CONFIG_IN_LEN;
57*6de7c598SAndrew Rybchenko 	req.emr_out_buf = payload;
58*6de7c598SAndrew Rybchenko 	req.emr_out_length = MC_CMD_GET_RXDP_CONFIG_OUT_LEN;
59*6de7c598SAndrew Rybchenko 
60*6de7c598SAndrew Rybchenko 	efx_mcdi_execute(enp, &req);
61*6de7c598SAndrew Rybchenko 	if (req.emr_rc != 0) {
62*6de7c598SAndrew Rybchenko 		rc = req.emr_rc;
63*6de7c598SAndrew Rybchenko 		goto fail1;
64*6de7c598SAndrew Rybchenko 	}
65*6de7c598SAndrew Rybchenko 
66*6de7c598SAndrew Rybchenko 	if (MCDI_OUT_DWORD_FIELD(req, GET_RXDP_CONFIG_OUT_DATA,
67*6de7c598SAndrew Rybchenko 				    GET_RXDP_CONFIG_OUT_PAD_HOST_DMA) == 0) {
68*6de7c598SAndrew Rybchenko 		/* RX DMA end padding is disabled */
69*6de7c598SAndrew Rybchenko 		end_padding = 0;
70*6de7c598SAndrew Rybchenko 	} else {
71*6de7c598SAndrew Rybchenko 		switch(MCDI_OUT_DWORD_FIELD(req, GET_RXDP_CONFIG_OUT_DATA,
72*6de7c598SAndrew Rybchenko 					    GET_RXDP_CONFIG_OUT_PAD_HOST_LEN)) {
73*6de7c598SAndrew Rybchenko 		case MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_64:
74*6de7c598SAndrew Rybchenko 			end_padding = 64;
75*6de7c598SAndrew Rybchenko 			break;
76*6de7c598SAndrew Rybchenko 		case MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_128:
77*6de7c598SAndrew Rybchenko 			end_padding = 128;
78*6de7c598SAndrew Rybchenko 			break;
79*6de7c598SAndrew Rybchenko 		case MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_256:
80*6de7c598SAndrew Rybchenko 			end_padding = 256;
81*6de7c598SAndrew Rybchenko 			break;
82*6de7c598SAndrew Rybchenko 		default:
83*6de7c598SAndrew Rybchenko 			rc = ENOTSUP;
84*6de7c598SAndrew Rybchenko 			goto fail2;
85*6de7c598SAndrew Rybchenko 		}
86*6de7c598SAndrew Rybchenko 	}
87*6de7c598SAndrew Rybchenko 
88*6de7c598SAndrew Rybchenko 	*end_paddingp = end_padding;
89*6de7c598SAndrew Rybchenko 
90*6de7c598SAndrew Rybchenko 	return (0);
91*6de7c598SAndrew Rybchenko 
92*6de7c598SAndrew Rybchenko fail2:
93*6de7c598SAndrew Rybchenko 	EFSYS_PROBE(fail2);
94*6de7c598SAndrew Rybchenko fail1:
95*6de7c598SAndrew Rybchenko 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
96*6de7c598SAndrew Rybchenko 
97*6de7c598SAndrew Rybchenko 	return (rc);
98*6de7c598SAndrew Rybchenko }
99*6de7c598SAndrew Rybchenko 
100cfa023ebSAndrew Rybchenko 	__checkReturn	efx_rc_t
101cfa023ebSAndrew Rybchenko medford_board_cfg(
102cfa023ebSAndrew Rybchenko 	__in		efx_nic_t *enp)
103cfa023ebSAndrew Rybchenko {
104cfa023ebSAndrew Rybchenko 	efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
105cfa023ebSAndrew Rybchenko 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
106cfa023ebSAndrew Rybchenko 	uint8_t mac_addr[6] = { 0 };
107cfa023ebSAndrew Rybchenko 	uint32_t board_type = 0;
108177347ddSAndrew Rybchenko 	ef10_link_state_t els;
109cfa023ebSAndrew Rybchenko 	efx_port_t *epp = &(enp->en_port);
110cfa023ebSAndrew Rybchenko 	uint32_t port;
111cfa023ebSAndrew Rybchenko 	uint32_t pf;
112cfa023ebSAndrew Rybchenko 	uint32_t vf;
113cfa023ebSAndrew Rybchenko 	uint32_t mask;
114cfa023ebSAndrew Rybchenko 	uint32_t flags;
115cfa023ebSAndrew Rybchenko 	uint32_t sysclk;
116cfa023ebSAndrew Rybchenko 	uint32_t base, nvec;
117*6de7c598SAndrew Rybchenko 	uint32_t end_padding;
118cfa023ebSAndrew Rybchenko 	efx_rc_t rc;
1195f5c71ccSAndrew Rybchenko 
120cfa023ebSAndrew Rybchenko 	/*
121cfa023ebSAndrew Rybchenko 	 * FIXME: Likely to be incomplete and incorrect.
122cfa023ebSAndrew Rybchenko 	 * Parts of this should be shared with Huntington.
123cfa023ebSAndrew Rybchenko 	 */
1245f5c71ccSAndrew Rybchenko 
125cfa023ebSAndrew Rybchenko 	if ((rc = efx_mcdi_get_port_assignment(enp, &port)) != 0)
126cfa023ebSAndrew Rybchenko 		goto fail1;
127cfa023ebSAndrew Rybchenko 
128cfa023ebSAndrew Rybchenko 	/*
129cfa023ebSAndrew Rybchenko 	 * NOTE: The MCDI protocol numbers ports from zero.
130cfa023ebSAndrew Rybchenko 	 * The common code MCDI interface numbers ports from one.
131cfa023ebSAndrew Rybchenko 	 */
132cfa023ebSAndrew Rybchenko 	emip->emi_port = port + 1;
133cfa023ebSAndrew Rybchenko 
134cfa023ebSAndrew Rybchenko 	if ((rc = ef10_external_port_mapping(enp, port,
135cfa023ebSAndrew Rybchenko 		    &encp->enc_external_port)) != 0)
136cfa023ebSAndrew Rybchenko 		goto fail2;
137cfa023ebSAndrew Rybchenko 
138cfa023ebSAndrew Rybchenko 	/*
139cfa023ebSAndrew Rybchenko 	 * Get PCIe function number from firmware (used for
140cfa023ebSAndrew Rybchenko 	 * per-function privilege and dynamic config info).
141cfa023ebSAndrew Rybchenko 	 *  - PCIe PF: pf = PF number, vf = 0xffff.
142cfa023ebSAndrew Rybchenko 	 *  - PCIe VF: pf = parent PF, vf = VF number.
143cfa023ebSAndrew Rybchenko 	 */
144cfa023ebSAndrew Rybchenko 	if ((rc = efx_mcdi_get_function_info(enp, &pf, &vf)) != 0)
145cfa023ebSAndrew Rybchenko 		goto fail3;
146cfa023ebSAndrew Rybchenko 
147cfa023ebSAndrew Rybchenko 	encp->enc_pf = pf;
148cfa023ebSAndrew Rybchenko 	encp->enc_vf = vf;
149cfa023ebSAndrew Rybchenko 
150cfa023ebSAndrew Rybchenko 	/* MAC address for this function */
151cfa023ebSAndrew Rybchenko 	if (EFX_PCI_FUNCTION_IS_PF(encp)) {
152cfa023ebSAndrew Rybchenko 		rc = efx_mcdi_get_mac_address_pf(enp, mac_addr);
153cfa023ebSAndrew Rybchenko 		if ((rc == 0) && (mac_addr[0] & 0x02)) {
154cfa023ebSAndrew Rybchenko 			/*
155cfa023ebSAndrew Rybchenko 			 * If the static config does not include a global MAC
156cfa023ebSAndrew Rybchenko 			 * address pool then the board may return a locally
157cfa023ebSAndrew Rybchenko 			 * administered MAC address (this should only happen on
158cfa023ebSAndrew Rybchenko 			 * incorrectly programmed boards).
159cfa023ebSAndrew Rybchenko 			 */
160cfa023ebSAndrew Rybchenko 			rc = EINVAL;
161cfa023ebSAndrew Rybchenko 		}
162cfa023ebSAndrew Rybchenko 	} else {
163cfa023ebSAndrew Rybchenko 		rc = efx_mcdi_get_mac_address_vf(enp, mac_addr);
164cfa023ebSAndrew Rybchenko 	}
165cfa023ebSAndrew Rybchenko 	if (rc != 0)
166cfa023ebSAndrew Rybchenko 		goto fail4;
167cfa023ebSAndrew Rybchenko 
168cfa023ebSAndrew Rybchenko 	EFX_MAC_ADDR_COPY(encp->enc_mac_addr, mac_addr);
169cfa023ebSAndrew Rybchenko 
170cfa023ebSAndrew Rybchenko 	/* Board configuration */
171cfa023ebSAndrew Rybchenko 	rc = efx_mcdi_get_board_cfg(enp, &board_type, NULL, NULL);
172cfa023ebSAndrew Rybchenko 	if (rc != 0) {
173cfa023ebSAndrew Rybchenko 		/* Unprivileged functions may not be able to read board cfg */
174cfa023ebSAndrew Rybchenko 		if (rc == EACCES)
175cfa023ebSAndrew Rybchenko 			board_type = 0;
176cfa023ebSAndrew Rybchenko 		else
177cfa023ebSAndrew Rybchenko 			goto fail5;
178cfa023ebSAndrew Rybchenko 	}
179cfa023ebSAndrew Rybchenko 
180cfa023ebSAndrew Rybchenko 	encp->enc_board_type = board_type;
181cfa023ebSAndrew Rybchenko 	encp->enc_clk_mult = 1; /* not used for Medford */
182cfa023ebSAndrew Rybchenko 
183cfa023ebSAndrew Rybchenko 	/* Fill out fields in enp->en_port and enp->en_nic_cfg from MCDI */
184cfa023ebSAndrew Rybchenko 	if ((rc = efx_mcdi_get_phy_cfg(enp)) != 0)
185cfa023ebSAndrew Rybchenko 		goto fail6;
186cfa023ebSAndrew Rybchenko 
187cfa023ebSAndrew Rybchenko 	/* Obtain the default PHY advertised capabilities */
188ee2812adSAndrew Rybchenko 	if ((rc = ef10_phy_get_link(enp, &els)) != 0)
189cfa023ebSAndrew Rybchenko 		goto fail7;
190177347ddSAndrew Rybchenko 	epp->ep_default_adv_cap_mask = els.els_adv_cap_mask;
191177347ddSAndrew Rybchenko 	epp->ep_adv_cap_mask = els.els_adv_cap_mask;
192cfa023ebSAndrew Rybchenko 
193cfa023ebSAndrew Rybchenko 	if (EFX_PCI_FUNCTION_IS_VF(encp)) {
194cfa023ebSAndrew Rybchenko 		/*
195cfa023ebSAndrew Rybchenko 		 * Interrupt testing does not work for VFs. See bug50084.
196cfa023ebSAndrew Rybchenko 		 * FIXME: Does this still  apply to Medford?
197cfa023ebSAndrew Rybchenko 		 */
198cfa023ebSAndrew Rybchenko 		encp->enc_bug41750_workaround = B_TRUE;
199cfa023ebSAndrew Rybchenko 	}
200cfa023ebSAndrew Rybchenko 
201cfa023ebSAndrew Rybchenko 	/* Chained multicast is always enabled on Medford */
202cfa023ebSAndrew Rybchenko 	encp->enc_bug26807_workaround = B_TRUE;
203cfa023ebSAndrew Rybchenko 
204cfa023ebSAndrew Rybchenko 	/* Get sysclk frequency (in MHz). */
205cfa023ebSAndrew Rybchenko 	if ((rc = efx_mcdi_get_clock(enp, &sysclk)) != 0)
206cfa023ebSAndrew Rybchenko 		goto fail8;
207cfa023ebSAndrew Rybchenko 
208cfa023ebSAndrew Rybchenko 	/*
209cfa023ebSAndrew Rybchenko 	 * The timer quantum is 1536 sysclk cycles, documented for the
210cfa023ebSAndrew Rybchenko 	 * EV_TMR_VAL field of EV_TIMER_TBL. Scale for MHz and ns units.
211cfa023ebSAndrew Rybchenko 	 */
212cfa023ebSAndrew Rybchenko 	encp->enc_evq_timer_quantum_ns = 1536000UL / sysclk; /* 1536 cycles */
213cfa023ebSAndrew Rybchenko 	encp->enc_evq_timer_max_us = (encp->enc_evq_timer_quantum_ns <<
214cfa023ebSAndrew Rybchenko 		    FRF_CZ_TC_TIMER_VAL_WIDTH) / 1000;
215cfa023ebSAndrew Rybchenko 
216cfa023ebSAndrew Rybchenko 	/* Check capabilities of running datapath firmware */
217cfa023ebSAndrew Rybchenko 	if ((rc = ef10_get_datapath_caps(enp)) != 0)
218cfa023ebSAndrew Rybchenko 	    goto fail9;
219cfa023ebSAndrew Rybchenko 
220cfa023ebSAndrew Rybchenko 	/* Alignment for receive packet DMA buffers */
221cfa023ebSAndrew Rybchenko 	encp->enc_rx_buf_align_start = 1;
222cfa023ebSAndrew Rybchenko 
223*6de7c598SAndrew Rybchenko 	/* Get the RX DMA end padding alignment configuration */
224*6de7c598SAndrew Rybchenko 	if ((rc = efx_mcdi_get_rxdp_config(enp, &end_padding)) != 0)
225*6de7c598SAndrew Rybchenko 		goto fail10;
226*6de7c598SAndrew Rybchenko 	encp->enc_rx_buf_align_end = end_padding;
227cfa023ebSAndrew Rybchenko 
228cfa023ebSAndrew Rybchenko 	/* Alignment for WPTR updates */
229cfa023ebSAndrew Rybchenko 	encp->enc_rx_push_align = EF10_RX_WPTR_ALIGN;
230cfa023ebSAndrew Rybchenko 
231cfa023ebSAndrew Rybchenko 	/*
232cfa023ebSAndrew Rybchenko 	 * Set resource limits for MC_CMD_ALLOC_VIS. Note that we cannot use
233cfa023ebSAndrew Rybchenko 	 * MC_CMD_GET_RESOURCE_LIMITS here as that reports the available
234cfa023ebSAndrew Rybchenko 	 * resources (allocated to this PCIe function), which is zero until
235cfa023ebSAndrew Rybchenko 	 * after we have allocated VIs.
236cfa023ebSAndrew Rybchenko 	 */
237cfa023ebSAndrew Rybchenko 	encp->enc_evq_limit = 1024;
238cfa023ebSAndrew Rybchenko 	encp->enc_rxq_limit = EFX_RXQ_LIMIT_TARGET;
239cfa023ebSAndrew Rybchenko 	encp->enc_txq_limit = EFX_TXQ_LIMIT_TARGET;
240cfa023ebSAndrew Rybchenko 
241cfa023ebSAndrew Rybchenko 	encp->enc_buftbl_limit = 0xFFFFFFFF;
242cfa023ebSAndrew Rybchenko 
243cfa023ebSAndrew Rybchenko 	encp->enc_piobuf_limit = MEDFORD_PIOBUF_NBUFS;
244cfa023ebSAndrew Rybchenko 	encp->enc_piobuf_size = MEDFORD_PIOBUF_SIZE;
245cfa023ebSAndrew Rybchenko 	encp->enc_piobuf_min_alloc_size = MEDFORD_MIN_PIO_ALLOC_SIZE;
246cfa023ebSAndrew Rybchenko 
247cfa023ebSAndrew Rybchenko 	/*
248cfa023ebSAndrew Rybchenko 	 * Get the current privilege mask. Note that this may be modified
249cfa023ebSAndrew Rybchenko 	 * dynamically, so this value is informational only. DO NOT use
250cfa023ebSAndrew Rybchenko 	 * the privilege mask to check for sufficient privileges, as that
251cfa023ebSAndrew Rybchenko 	 * can result in time-of-check/time-of-use bugs.
252cfa023ebSAndrew Rybchenko 	 */
25380af6f26SAndrew Rybchenko 	if ((rc = ef10_get_privilege_mask(enp, &mask)) != 0)
254*6de7c598SAndrew Rybchenko 		goto fail11;
255cfa023ebSAndrew Rybchenko 	encp->enc_privilege_mask = mask;
256cfa023ebSAndrew Rybchenko 
257cfa023ebSAndrew Rybchenko 	/* Get interrupt vector limits */
258cfa023ebSAndrew Rybchenko 	if ((rc = efx_mcdi_get_vector_cfg(enp, &base, &nvec, NULL)) != 0) {
259cfa023ebSAndrew Rybchenko 		if (EFX_PCI_FUNCTION_IS_PF(encp))
260*6de7c598SAndrew Rybchenko 			goto fail12;
261cfa023ebSAndrew Rybchenko 
262cfa023ebSAndrew Rybchenko 		/* Ignore error (cannot query vector limits from a VF). */
263cfa023ebSAndrew Rybchenko 		base = 0;
264cfa023ebSAndrew Rybchenko 		nvec = 1024;
265cfa023ebSAndrew Rybchenko 	}
266cfa023ebSAndrew Rybchenko 	encp->enc_intr_vec_base = base;
267cfa023ebSAndrew Rybchenko 	encp->enc_intr_limit = nvec;
268cfa023ebSAndrew Rybchenko 
269cfa023ebSAndrew Rybchenko 	/*
270cfa023ebSAndrew Rybchenko 	 * Maximum number of bytes into the frame the TCP header can start for
271cfa023ebSAndrew Rybchenko 	 * firmware assisted TSO to work.
272cfa023ebSAndrew Rybchenko 	 */
273cfa023ebSAndrew Rybchenko 	encp->enc_tx_tso_tcp_header_offset_limit = EF10_TCP_HEADER_OFFSET_LIMIT;
274cfa023ebSAndrew Rybchenko 
275739ebba6SAndrew Rybchenko 	/*
276739ebba6SAndrew Rybchenko 	 * Medford stores a single global copy of VPD, not per-PF as on
277739ebba6SAndrew Rybchenko 	 * Huntington.
278739ebba6SAndrew Rybchenko 	 */
279739ebba6SAndrew Rybchenko 	encp->enc_vpd_is_global = B_TRUE;
280739ebba6SAndrew Rybchenko 
281cfa023ebSAndrew Rybchenko 	return (0);
282cfa023ebSAndrew Rybchenko 
283*6de7c598SAndrew Rybchenko fail12:
284*6de7c598SAndrew Rybchenko 	EFSYS_PROBE(fail12);
285cfa023ebSAndrew Rybchenko fail11:
286cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail11);
287cfa023ebSAndrew Rybchenko fail10:
288cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail10);
289cfa023ebSAndrew Rybchenko fail9:
290cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail9);
291cfa023ebSAndrew Rybchenko fail8:
292cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail8);
293cfa023ebSAndrew Rybchenko fail7:
294cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail7);
295cfa023ebSAndrew Rybchenko fail6:
296cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail6);
297cfa023ebSAndrew Rybchenko fail5:
298cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail5);
299cfa023ebSAndrew Rybchenko fail4:
300cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail4);
301cfa023ebSAndrew Rybchenko fail3:
302cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail3);
303cfa023ebSAndrew Rybchenko fail2:
304cfa023ebSAndrew Rybchenko 	EFSYS_PROBE(fail2);
305cfa023ebSAndrew Rybchenko fail1:
306cfa023ebSAndrew Rybchenko 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
307cfa023ebSAndrew Rybchenko 
308cfa023ebSAndrew Rybchenko 	return (rc);
309cfa023ebSAndrew Rybchenko }
3105f5c71ccSAndrew Rybchenko 
3115f5c71ccSAndrew Rybchenko #endif	/* EFSYS_OPT_MEDFORD */
312