Merge branch 'sfc-remove-some-global-definitions'
Martin Habets says: ==================== sfc: Remove some global definitions These are some small cleanups to remove definitions that need not be defined in .h files. ==================== Link: https://lore.kernel.org/r/164967635861.17602.16525009567130361754.stgit@palantir17.mph.net Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
93c1a40075
|
@ -28,7 +28,6 @@ static inline netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct
|
||||||
ef100_enqueue_skb, __efx_enqueue_skb,
|
ef100_enqueue_skb, __efx_enqueue_skb,
|
||||||
tx_queue, skb);
|
tx_queue, skb);
|
||||||
}
|
}
|
||||||
void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index);
|
|
||||||
void efx_xmit_done_single(struct efx_tx_queue *tx_queue);
|
void efx_xmit_done_single(struct efx_tx_queue *tx_queue);
|
||||||
int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
|
int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
|
||||||
void *type_data);
|
void *type_data);
|
||||||
|
|
|
@ -51,28 +51,7 @@ MODULE_PARM_DESC(irq_adapt_high_thresh,
|
||||||
*/
|
*/
|
||||||
static int napi_weight = 64;
|
static int napi_weight = 64;
|
||||||
|
|
||||||
/***************
|
static const struct efx_channel_type efx_default_channel_type;
|
||||||
* Housekeeping
|
|
||||||
***************/
|
|
||||||
|
|
||||||
int efx_channel_dummy_op_int(struct efx_channel *channel)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void efx_channel_dummy_op_void(struct efx_channel *channel)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct efx_channel_type efx_default_channel_type = {
|
|
||||||
.pre_probe = efx_channel_dummy_op_int,
|
|
||||||
.post_remove = efx_channel_dummy_op_void,
|
|
||||||
.get_name = efx_get_channel_name,
|
|
||||||
.copy = efx_copy_channel,
|
|
||||||
.want_txqs = efx_default_channel_want_txqs,
|
|
||||||
.keep_eventq = false,
|
|
||||||
.want_pio = true,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*************
|
/*************
|
||||||
* INTERRUPTS
|
* INTERRUPTS
|
||||||
|
@ -619,6 +598,7 @@ void efx_fini_channels(struct efx_nic *efx)
|
||||||
/* Allocate and initialise a channel structure, copying parameters
|
/* Allocate and initialise a channel structure, copying parameters
|
||||||
* (but not resources) from an old channel structure.
|
* (but not resources) from an old channel structure.
|
||||||
*/
|
*/
|
||||||
|
static
|
||||||
struct efx_channel *efx_copy_channel(const struct efx_channel *old_channel)
|
struct efx_channel *efx_copy_channel(const struct efx_channel *old_channel)
|
||||||
{
|
{
|
||||||
struct efx_rx_queue *rx_queue;
|
struct efx_rx_queue *rx_queue;
|
||||||
|
@ -696,7 +676,8 @@ fail:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void efx_get_channel_name(struct efx_channel *channel, char *buf, size_t len)
|
static void efx_get_channel_name(struct efx_channel *channel, char *buf,
|
||||||
|
size_t len)
|
||||||
{
|
{
|
||||||
struct efx_nic *efx = channel->efx;
|
struct efx_nic *efx = channel->efx;
|
||||||
const char *type;
|
const char *type;
|
||||||
|
@ -1004,7 +985,7 @@ int efx_set_channels(struct efx_nic *efx)
|
||||||
return netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);
|
return netif_set_real_num_rx_queues(efx->net_dev, efx->n_rx_channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool efx_default_channel_want_txqs(struct efx_channel *channel)
|
static bool efx_default_channel_want_txqs(struct efx_channel *channel)
|
||||||
{
|
{
|
||||||
return channel->channel - channel->efx->tx_channel_offset <
|
return channel->channel - channel->efx->tx_channel_offset <
|
||||||
channel->efx->n_tx_channels;
|
channel->efx->n_tx_channels;
|
||||||
|
@ -1362,3 +1343,26 @@ void efx_fini_napi(struct efx_nic *efx)
|
||||||
efx_for_each_channel(channel, efx)
|
efx_for_each_channel(channel, efx)
|
||||||
efx_fini_napi_channel(channel);
|
efx_fini_napi_channel(channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***************
|
||||||
|
* Housekeeping
|
||||||
|
***************/
|
||||||
|
|
||||||
|
static int efx_channel_dummy_op_int(struct efx_channel *channel)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void efx_channel_dummy_op_void(struct efx_channel *channel)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct efx_channel_type efx_default_channel_type = {
|
||||||
|
.pre_probe = efx_channel_dummy_op_int,
|
||||||
|
.post_remove = efx_channel_dummy_op_void,
|
||||||
|
.get_name = efx_get_channel_name,
|
||||||
|
.copy = efx_copy_channel,
|
||||||
|
.want_txqs = efx_default_channel_want_txqs,
|
||||||
|
.keep_eventq = false,
|
||||||
|
.want_pio = true,
|
||||||
|
};
|
||||||
|
|
|
@ -32,16 +32,13 @@ void efx_fini_eventq(struct efx_channel *channel);
|
||||||
void efx_remove_eventq(struct efx_channel *channel);
|
void efx_remove_eventq(struct efx_channel *channel);
|
||||||
|
|
||||||
int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
|
int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
|
||||||
void efx_get_channel_name(struct efx_channel *channel, char *buf, size_t len);
|
|
||||||
void efx_set_channel_names(struct efx_nic *efx);
|
void efx_set_channel_names(struct efx_nic *efx);
|
||||||
int efx_init_channels(struct efx_nic *efx);
|
int efx_init_channels(struct efx_nic *efx);
|
||||||
int efx_probe_channels(struct efx_nic *efx);
|
int efx_probe_channels(struct efx_nic *efx);
|
||||||
int efx_set_channels(struct efx_nic *efx);
|
int efx_set_channels(struct efx_nic *efx);
|
||||||
bool efx_default_channel_want_txqs(struct efx_channel *channel);
|
|
||||||
void efx_remove_channel(struct efx_channel *channel);
|
void efx_remove_channel(struct efx_channel *channel);
|
||||||
void efx_remove_channels(struct efx_nic *efx);
|
void efx_remove_channels(struct efx_nic *efx);
|
||||||
void efx_fini_channels(struct efx_nic *efx);
|
void efx_fini_channels(struct efx_nic *efx);
|
||||||
struct efx_channel *efx_copy_channel(const struct efx_channel *old_channel);
|
|
||||||
void efx_start_channels(struct efx_nic *efx);
|
void efx_start_channels(struct efx_nic *efx);
|
||||||
void efx_stop_channels(struct efx_nic *efx);
|
void efx_stop_channels(struct efx_nic *efx);
|
||||||
|
|
||||||
|
@ -50,7 +47,6 @@ void efx_init_napi(struct efx_nic *efx);
|
||||||
void efx_fini_napi_channel(struct efx_channel *channel);
|
void efx_fini_napi_channel(struct efx_channel *channel);
|
||||||
void efx_fini_napi(struct efx_nic *efx);
|
void efx_fini_napi(struct efx_nic *efx);
|
||||||
|
|
||||||
int efx_channel_dummy_op_int(struct efx_channel *channel);
|
|
||||||
void efx_channel_dummy_op_void(struct efx_channel *channel);
|
void efx_channel_dummy_op_void(struct efx_channel *channel);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -51,8 +51,8 @@ static unsigned int efx_monitor_interval = 1 * HZ;
|
||||||
/* Default stats update time */
|
/* Default stats update time */
|
||||||
#define STATS_PERIOD_MS_DEFAULT 1000
|
#define STATS_PERIOD_MS_DEFAULT 1000
|
||||||
|
|
||||||
const unsigned int efx_reset_type_max = RESET_TYPE_MAX;
|
static const unsigned int efx_reset_type_max = RESET_TYPE_MAX;
|
||||||
const char *const efx_reset_type_names[] = {
|
static const char *const efx_reset_type_names[] = {
|
||||||
[RESET_TYPE_INVISIBLE] = "INVISIBLE",
|
[RESET_TYPE_INVISIBLE] = "INVISIBLE",
|
||||||
[RESET_TYPE_ALL] = "ALL",
|
[RESET_TYPE_ALL] = "ALL",
|
||||||
[RESET_TYPE_RECOVER_OR_ALL] = "RECOVER_OR_ALL",
|
[RESET_TYPE_RECOVER_OR_ALL] = "RECOVER_OR_ALL",
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "bitfield.h"
|
#include "bitfield.h"
|
||||||
#include "efx.h"
|
#include "efx.h"
|
||||||
#include "rx_common.h"
|
#include "rx_common.h"
|
||||||
|
#include "tx_common.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "farch_regs.h"
|
#include "farch_regs.h"
|
||||||
#include "sriov.h"
|
#include "sriov.h"
|
||||||
|
|
|
@ -612,11 +612,6 @@ extern const unsigned int efx_loopback_mode_max;
|
||||||
#define LOOPBACK_MODE(efx) \
|
#define LOOPBACK_MODE(efx) \
|
||||||
STRING_TABLE_LOOKUP((efx)->loopback_mode, efx_loopback_mode)
|
STRING_TABLE_LOOKUP((efx)->loopback_mode, efx_loopback_mode)
|
||||||
|
|
||||||
extern const char *const efx_reset_type_names[];
|
|
||||||
extern const unsigned int efx_reset_type_max;
|
|
||||||
#define RESET_TYPE(type) \
|
|
||||||
STRING_TABLE_LOOKUP(type, efx_reset_type)
|
|
||||||
|
|
||||||
enum efx_int_mode {
|
enum efx_int_mode {
|
||||||
/* Be careful if altering to correct macro below */
|
/* Be careful if altering to correct macro below */
|
||||||
EFX_INT_MODE_MSIX = 0,
|
EFX_INT_MODE_MSIX = 0,
|
||||||
|
|
Loading…
Reference in New Issue