diff options
author | Alex Maftei (amaftei) <amaftei@solarflare.com> | 2020-01-08 16:10:45 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-08 13:28:02 -0800 |
commit | b194045114c234f73a6c3831fbcde0f4161bddf0 (patch) | |
tree | 3146220aa663c772ff3967517a7de27bc38d26fc /drivers/net/ethernet/sfc/efx_common.h | |
parent | e1253f391042e34de66faf7d499595c00f99a076 (diff) | |
download | kernel_replicant_linux-b194045114c234f73a6c3831fbcde0f4161bddf0.tar.gz kernel_replicant_linux-b194045114c234f73a6c3831fbcde0f4161bddf0.tar.bz2 kernel_replicant_linux-b194045114c234f73a6c3831fbcde0f4161bddf0.zip |
sfc: further preparation for code split
Added more arguments for a couple of functions.
Also moved a function to the common header.
Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx_common.h')
-rw-r--r-- | drivers/net/ethernet/sfc/efx_common.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/efx_common.h b/drivers/net/ethernet/sfc/efx_common.h index cb690d01adbc..c602e5257088 100644 --- a/drivers/net/ethernet/sfc/efx_common.h +++ b/drivers/net/ethernet/sfc/efx_common.h @@ -11,8 +11,9 @@ #ifndef EFX_COMMON_H #define EFX_COMMON_H -int efx_init_io(struct efx_nic *efx); -void efx_fini_io(struct efx_nic *efx); +int efx_init_io(struct efx_nic *efx, int bar, dma_addr_t dma_mask, + unsigned int mem_map_size); +void efx_fini_io(struct efx_nic *efx, int bar); int efx_init_struct(struct efx_nic *efx, struct pci_dev *pci_dev, struct net_device *net_dev); void efx_fini_struct(struct efx_nic *efx); @@ -44,7 +45,15 @@ int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok); int efx_reset(struct efx_nic *efx, enum reset_type method); void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); -int efx_check_disabled(struct efx_nic *efx); +static inline int efx_check_disabled(struct efx_nic *efx) +{ + if (efx->state == STATE_DISABLED || efx->state == STATE_RECOVERY) { + netif_err(efx, drv, efx->net_dev, + "device is disabled due to earlier errors\n"); + return -EIO; + } + return 0; +} void efx_mac_reconfigure(struct efx_nic *efx); void efx_link_status_changed(struct efx_nic *efx); |