Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sfc: Remove falcon deadcode

ef4_farch_dimension_resources(), ef4_nic_fix_nodesc_drop_stat(),
ef4_ticks_to_usecs() and ef4_tx_get_copy_buffer_limited() were
copied over from efx_ equivalents in 2016 but never used by
commit 5a6681e22c14 ("sfc: separate out SFC4000 ("Falcon") support into new
sfc-falcon driver")

EF4_MAX_FLUSH_TIME is also unused.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Link: https://patch.msgid.link/20241102151625.39535-2-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dr. David Alan Gilbert and committed by
Jakub Kicinski
cc4914d9 84bfbfbb

-58
-8
drivers/net/ethernet/sfc/falcon/efx.c
··· 1886 1886 return usecs * 1000 / efx->timer_quantum_ns; 1887 1887 } 1888 1888 1889 - unsigned int ef4_ticks_to_usecs(struct ef4_nic *efx, unsigned int ticks) 1890 - { 1891 - /* We must round up when converting ticks to microseconds 1892 - * because we round down when converting the other way. 1893 - */ 1894 - return DIV_ROUND_UP(ticks * efx->timer_quantum_ns, 1000); 1895 - } 1896 - 1897 1889 /* Set interrupt moderation parameters */ 1898 1890 int ef4_init_irq_moderation(struct ef4_nic *efx, unsigned int tx_usecs, 1899 1891 unsigned int rx_usecs, bool rx_adaptive,
-1
drivers/net/ethernet/sfc/falcon/efx.h
··· 198 198 /* Global */ 199 199 void ef4_schedule_reset(struct ef4_nic *efx, enum reset_type type); 200 200 unsigned int ef4_usecs_to_ticks(struct ef4_nic *efx, unsigned int usecs); 201 - unsigned int ef4_ticks_to_usecs(struct ef4_nic *efx, unsigned int ticks); 202 201 int ef4_init_irq_moderation(struct ef4_nic *efx, unsigned int tx_usecs, 203 202 unsigned int rx_usecs, bool rx_adaptive, 204 203 bool rx_may_override_tx);
-22
drivers/net/ethernet/sfc/falcon/farch.c
··· 1631 1631 } 1632 1632 } 1633 1633 1634 - /* Looks at available SRAM resources and works out how many queues we 1635 - * can support, and where things like descriptor caches should live. 1636 - * 1637 - * SRAM is split up as follows: 1638 - * 0 buftbl entries for channels 1639 - * efx->vf_buftbl_base buftbl entries for SR-IOV 1640 - * efx->rx_dc_base RX descriptor caches 1641 - * efx->tx_dc_base TX descriptor caches 1642 - */ 1643 - void ef4_farch_dimension_resources(struct ef4_nic *efx, unsigned sram_lim_qw) 1644 - { 1645 - unsigned vi_count; 1646 - 1647 - /* Account for the buffer table entries backing the datapath channels 1648 - * and the descriptor caches for those channels. 1649 - */ 1650 - vi_count = max(efx->n_channels, efx->n_tx_channels * EF4_TXQ_TYPES); 1651 - 1652 - efx->tx_dc_base = sram_lim_qw - vi_count * TX_DC_ENTRIES; 1653 - efx->rx_dc_base = efx->tx_dc_base - vi_count * RX_DC_ENTRIES; 1654 - } 1655 - 1656 1634 u32 ef4_farch_fpga_ver(struct ef4_nic *efx) 1657 1635 { 1658 1636 ef4_oword_t altera_build;
-11
drivers/net/ethernet/sfc/falcon/nic.c
··· 511 511 } 512 512 } 513 513 } 514 - 515 - void ef4_nic_fix_nodesc_drop_stat(struct ef4_nic *efx, u64 *rx_nodesc_drops) 516 - { 517 - /* if down, or this is the first update after coming up */ 518 - if (!(efx->net_dev->flags & IFF_UP) || !efx->rx_nodesc_drops_prev_state) 519 - efx->rx_nodesc_drops_while_down += 520 - *rx_nodesc_drops - efx->rx_nodesc_drops_total; 521 - efx->rx_nodesc_drops_total = *rx_nodesc_drops; 522 - efx->rx_nodesc_drops_prev_state = !!(efx->net_dev->flags & IFF_UP); 523 - *rx_nodesc_drops -= efx->rx_nodesc_drops_while_down; 524 - }
-5
drivers/net/ethernet/sfc/falcon/nic.h
··· 477 477 void falcon_start_nic_stats(struct ef4_nic *efx); 478 478 void falcon_stop_nic_stats(struct ef4_nic *efx); 479 479 int falcon_reset_xaui(struct ef4_nic *efx); 480 - void ef4_farch_dimension_resources(struct ef4_nic *efx, unsigned sram_lim_qw); 481 480 void ef4_farch_init_common(struct ef4_nic *efx); 482 481 void ef4_farch_rx_push_indir_table(struct ef4_nic *efx); 483 482 ··· 501 502 void ef4_nic_update_stats(const struct ef4_hw_stat_desc *desc, size_t count, 502 503 const unsigned long *mask, u64 *stats, 503 504 const void *dma_buf, bool accumulate); 504 - void ef4_nic_fix_nodesc_drop_stat(struct ef4_nic *efx, u64 *stat); 505 - 506 - #define EF4_MAX_FLUSH_TIME 5000 507 - 508 505 void ef4_farch_generate_event(struct ef4_nic *efx, unsigned int evq, 509 506 ef4_qword_t *event); 510 507
-8
drivers/net/ethernet/sfc/falcon/tx.c
··· 40 40 return (u8 *)page_buf->addr + offset; 41 41 } 42 42 43 - u8 *ef4_tx_get_copy_buffer_limited(struct ef4_tx_queue *tx_queue, 44 - struct ef4_tx_buffer *buffer, size_t len) 45 - { 46 - if (len > EF4_TX_CB_SIZE) 47 - return NULL; 48 - return ef4_tx_get_copy_buffer(tx_queue, buffer); 49 - } 50 - 51 43 static void ef4_dequeue_buffer(struct ef4_tx_queue *tx_queue, 52 44 struct ef4_tx_buffer *buffer, 53 45 unsigned int *pkts_compl,
-3
drivers/net/ethernet/sfc/falcon/tx.h
··· 15 15 unsigned int ef4_tx_limit_len(struct ef4_tx_queue *tx_queue, 16 16 dma_addr_t dma_addr, unsigned int len); 17 17 18 - u8 *ef4_tx_get_copy_buffer_limited(struct ef4_tx_queue *tx_queue, 19 - struct ef4_tx_buffer *buffer, size_t len); 20 - 21 18 int ef4_enqueue_skb_tso(struct ef4_tx_queue *tx_queue, struct sk_buff *skb, 22 19 bool *data_mapped); 23 20