#include "net_driver.h"
#include <linux/module.h>
#include "efx_common.h"
#include "efx_channels.h"
#include "io.h"
#include "ef100_nic.h"
#include "ef100_netdev.h"
#include "ef100_sriov.h"
#include "ef100_regs.h"
#include "ef100.h"
#define EFX_EF100_PCI_DEFAULT_BAR …
#define PCI_EXT_CAP_HDR_LENGTH …
#define ESE_GZ_CFGBAR_CONT_CAP_MIN_LENGTH …
struct ef100_func_ctl_window { … };
static int ef100_pci_walk_xilinx_table(struct efx_nic *efx, u64 offset,
struct ef100_func_ctl_window *result);
#define ROUND_DOWN_TO_DWORD(x) …
#define EXTRACT_BITS(x, lbn, width) …
static u32 _ef100_pci_get_bar_bits_with_width(struct efx_nic *efx,
int structure_start,
int lbn, int width)
{ … }
#define ef100_pci_get_bar_bits(efx, entry_location, bitdef) …
static int ef100_pci_parse_ef100_entry(struct efx_nic *efx, int entry_location,
struct ef100_func_ctl_window *result)
{ … }
static bool ef100_pci_does_bar_overflow(struct efx_nic *efx, int bar,
u64 next_entry)
{ … }
static int ef100_pci_parse_continue_entry(struct efx_nic *efx, int entry_location,
struct ef100_func_ctl_window *result)
{ … }
static int ef100_pci_walk_xilinx_table(struct efx_nic *efx, u64 offset,
struct ef100_func_ctl_window *result)
{ … }
static int _ef100_pci_get_config_bits_with_width(struct efx_nic *efx,
int structure_start, int lbn,
int width, u32 *result)
{ … }
#define ef100_pci_get_config_bits(efx, entry_location, bitdef, result) …
static int ef100_pci_parse_xilinx_cap(struct efx_nic *efx, int vndr_cap,
bool has_offset_hi,
struct ef100_func_ctl_window *result)
{ … }
static int ef100_pci_find_func_ctrl_window(struct efx_nic *efx,
struct ef100_func_ctl_window *result)
{ … }
static void ef100_pci_remove(struct pci_dev *pci_dev)
{
struct efx_nic *efx = pci_get_drvdata(pci_dev);
struct efx_probe_data *probe_data;
if (!efx)
return;
probe_data = container_of(efx, struct efx_probe_data, efx);
ef100_remove_netdev(probe_data);
#ifdef CONFIG_SFC_SRIOV
efx_fini_struct_tc(efx);
#endif
ef100_remove(efx);
efx_fini_io(efx);
pci_dbg(pci_dev, "shutdown successful\n");
pci_set_drvdata(pci_dev, NULL);
efx_fini_struct(efx);
kfree(probe_data);
};
static int ef100_pci_probe(struct pci_dev *pci_dev,
const struct pci_device_id *entry)
{ … }
#ifdef CONFIG_SFC_SRIOV
static int ef100_pci_sriov_configure(struct pci_dev *dev, int num_vfs)
{ … }
#endif
static const struct pci_device_id ef100_pci_table[] = …;
struct pci_driver ef100_pci_driver = …;
MODULE_DEVICE_TABLE(pci, ef100_pci_table);