+/*
+ * Search for a EF100 resource locator from the given offset of an entry
+ * in a Xilinx capabilities table.
+ */
+static __checkReturn efx_rc_t
+rhead_xilinx_cap_tbl_find_ef100_locator(
+ __in efsys_bar_t *esbp,
+ __in efsys_dma_addr_t tbl_offset,
+ __out efx_bar_region_t *ef100_ebrp)
+{
+ efx_rc_t rc;
+ efsys_dma_addr_t entry_offset = tbl_offset;
+
+ rc = efx_pci_xilinx_cap_tbl_find(esbp, ESE_GZ_CFGBAR_ENTRY_EF100,
+ B_FALSE, &entry_offset);
+ if (rc != 0) {
+ /* EF100 locator not found (ENOENT) or other error */
+ goto fail1;
+ }
+
+ rc = rhead_nic_xilinx_cap_tbl_read_ef100_locator(esbp, entry_offset,
+ ef100_ebrp);
+ if (rc != 0)
+ goto fail2;
+
+ return (0);
+
+fail2:
+ EFSYS_PROBE(fail2);
+fail1:
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+ return (rc);
+}
+