diff options
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10.c')
| -rw-r--r-- | drivers/net/ethernet/sfc/ef10.c | 20 | 
1 files changed, 18 insertions, 2 deletions
| diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index da6886dcac37..c3f35da1b82a 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -1747,6 +1747,22 @@ static size_t efx_ef10_describe_stats(struct efx_nic *efx, u8 *names)  				      mask, names);  } +static void efx_ef10_get_fec_stats(struct efx_nic *efx, +				   struct ethtool_fec_stats *fec_stats) +{ +	DECLARE_BITMAP(mask, EF10_STAT_COUNT); +	struct efx_ef10_nic_data *nic_data = efx->nic_data; +	u64 *stats = nic_data->stats; + +	efx_ef10_get_stat_mask(efx, mask); +	if (test_bit(EF10_STAT_fec_corrected_errors, mask)) +		fec_stats->corrected_blocks.total = +			stats[EF10_STAT_fec_corrected_errors]; +	if (test_bit(EF10_STAT_fec_uncorrected_errors, mask)) +		fec_stats->uncorrectable_blocks.total = +			stats[EF10_STAT_fec_uncorrected_errors]; +} +  static size_t efx_ef10_update_stats_common(struct efx_nic *efx, u64 *full_stats,  					   struct rtnl_link_stats64 *core_stats)  { @@ -2928,8 +2944,7 @@ efx_ef10_handle_tx_event(struct efx_channel *channel, efx_qword_t *event)  	/* Get the transmit queue */  	tx_ev_q_label = EFX_QWORD_FIELD(*event, ESF_DZ_TX_QLABEL); -	tx_queue = efx_channel_get_tx_queue(channel, -					    tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL); +	tx_queue = channel->tx_queue + (tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL);  	if (!tx_queue->timestamping) {  		/* Transmit completion */ @@ -4122,6 +4137,7 @@ const struct efx_nic_type efx_hunt_a0_nic_type = {  	.get_wol = efx_ef10_get_wol,  	.set_wol = efx_ef10_set_wol,  	.resume_wol = efx_port_dummy_op_void, +	.get_fec_stats = efx_ef10_get_fec_stats,  	.test_chip = efx_ef10_test_chip,  	.test_nvram = efx_mcdi_nvram_test_all,  	.mcdi_request = efx_ef10_mcdi_request, | 
