diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-29 04:42:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-30 01:46:27 +0100 |
commit | ef2b90ee4dba7a3d9001f1f0003b860b39a4aaae (patch) | |
tree | 5eec233a05fab4fd0c79dc9c1eb6541d45cead53 /drivers/net/sfc/net_driver.h | |
parent | sfc: Turn pause frame generation on and off at the MAC, not the RX FIFO (diff) | |
download | linux-ef2b90ee4dba7a3d9001f1f0003b860b39a4aaae.tar.xz linux-ef2b90ee4dba7a3d9001f1f0003b860b39a4aaae.zip |
sfc: Move Falcon NIC operations to efx_nic_type
This is preparation for adding differing implementations for new NICs.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r-- | drivers/net/sfc/net_driver.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index fddf8f5870ce..32806f9a7e49 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h @@ -843,6 +843,21 @@ static inline const char *efx_dev_name(struct efx_nic *efx) /** * struct efx_nic_type - Efx device type definition + * @probe: Probe the controller + * @remove: Free resources allocated by probe() + * @init: Initialise the controller + * @fini: Shut down the controller + * @monitor: Periodic function for polling link state and hardware monitor + * @reset: Reset the controller hardware and possibly the PHY. This will + * be called while the controller is uninitialised. + * @probe_port: Probe the MAC and PHY + * @remove_port: Free resources allocated by probe_port() + * @prepare_flush: Prepare the hardware for flushing the DMA queues + * @update_stats: Update statistics not provided by event handling + * @start_stats: Start the regular fetching of statistics + * @stop_stats: Stop the regular fetching of statistics + * @push_irq_moderation: Apply interrupt moderation value + * @push_multicast_hash: Apply multicast hash table * @default_mac_ops: efx_mac_operations to set at startup * @revision: Hardware architecture revision * @mem_map_size: Memory BAR mapped size @@ -861,6 +876,20 @@ static inline const char *efx_dev_name(struct efx_nic *efx) * @rx_dc_base: Base address in SRAM of RX queue descriptor caches */ struct efx_nic_type { + int (*probe)(struct efx_nic *efx); + void (*remove)(struct efx_nic *efx); + int (*init)(struct efx_nic *efx); + void (*fini)(struct efx_nic *efx); + void (*monitor)(struct efx_nic *efx); + int (*reset)(struct efx_nic *efx, enum reset_type method); + int (*probe_port)(struct efx_nic *efx); + void (*remove_port)(struct efx_nic *efx); + void (*prepare_flush)(struct efx_nic *efx); + void (*update_stats)(struct efx_nic *efx); + void (*start_stats)(struct efx_nic *efx); + void (*stop_stats)(struct efx_nic *efx); + void (*push_irq_moderation)(struct efx_channel *channel); + void (*push_multicast_hash)(struct efx_nic *efx); struct efx_mac_operations *default_mac_ops; int revision; |