Skip to content

Commit cc4914d

Browse files
Dr. David Alan Gilbertkuba-moo
authored andcommitted
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 5a6681e ("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>
1 parent 84bfbfb commit cc4914d

File tree

7 files changed

+0
-58
lines changed

7 files changed

+0
-58
lines changed

drivers/net/ethernet/sfc/falcon/efx.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,14 +1886,6 @@ unsigned int ef4_usecs_to_ticks(struct ef4_nic *efx, unsigned int usecs)
18861886
return usecs * 1000 / efx->timer_quantum_ns;
18871887
}
18881888

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-
18971889
/* Set interrupt moderation parameters */
18981890
int ef4_init_irq_moderation(struct ef4_nic *efx, unsigned int tx_usecs,
18991891
unsigned int rx_usecs, bool rx_adaptive,

drivers/net/ethernet/sfc/falcon/efx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ int ef4_try_recovery(struct ef4_nic *efx);
198198
/* Global */
199199
void ef4_schedule_reset(struct ef4_nic *efx, enum reset_type type);
200200
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);
202201
int ef4_init_irq_moderation(struct ef4_nic *efx, unsigned int tx_usecs,
203202
unsigned int rx_usecs, bool rx_adaptive,
204203
bool rx_may_override_tx);

drivers/net/ethernet/sfc/falcon/farch.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,28 +1631,6 @@ void ef4_farch_rx_push_indir_table(struct ef4_nic *efx)
16311631
}
16321632
}
16331633

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-
16561634
u32 ef4_farch_fpga_ver(struct ef4_nic *efx)
16571635
{
16581636
ef4_oword_t altera_build;

drivers/net/ethernet/sfc/falcon/nic.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -511,14 +511,3 @@ void ef4_nic_update_stats(const struct ef4_hw_stat_desc *desc, size_t count,
511511
}
512512
}
513513
}
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-
}

drivers/net/ethernet/sfc/falcon/nic.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,6 @@ void ef4_farch_finish_flr(struct ef4_nic *efx);
477477
void falcon_start_nic_stats(struct ef4_nic *efx);
478478
void falcon_stop_nic_stats(struct ef4_nic *efx);
479479
int falcon_reset_xaui(struct ef4_nic *efx);
480-
void ef4_farch_dimension_resources(struct ef4_nic *efx, unsigned sram_lim_qw);
481480
void ef4_farch_init_common(struct ef4_nic *efx);
482481
void ef4_farch_rx_push_indir_table(struct ef4_nic *efx);
483482

@@ -502,10 +501,6 @@ size_t ef4_nic_describe_stats(const struct ef4_hw_stat_desc *desc, size_t count,
502501
void ef4_nic_update_stats(const struct ef4_hw_stat_desc *desc, size_t count,
503502
const unsigned long *mask, u64 *stats,
504503
const void *dma_buf, bool accumulate);
505-
void ef4_nic_fix_nodesc_drop_stat(struct ef4_nic *efx, u64 *stat);
506-
507-
#define EF4_MAX_FLUSH_TIME 5000
508-
509504
void ef4_farch_generate_event(struct ef4_nic *efx, unsigned int evq,
510505
ef4_qword_t *event);
511506

drivers/net/ethernet/sfc/falcon/tx.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ static inline u8 *ef4_tx_get_copy_buffer(struct ef4_tx_queue *tx_queue,
4040
return (u8 *)page_buf->addr + offset;
4141
}
4242

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-
5143
static void ef4_dequeue_buffer(struct ef4_tx_queue *tx_queue,
5244
struct ef4_tx_buffer *buffer,
5345
unsigned int *pkts_compl,

drivers/net/ethernet/sfc/falcon/tx.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
unsigned int ef4_tx_limit_len(struct ef4_tx_queue *tx_queue,
1616
dma_addr_t dma_addr, unsigned int len);
1717

18-
u8 *ef4_tx_get_copy_buffer_limited(struct ef4_tx_queue *tx_queue,
19-
struct ef4_tx_buffer *buffer, size_t len);
20-
2118
int ef4_enqueue_skb_tso(struct ef4_tx_queue *tx_queue, struct sk_buff *skb,
2219
bool *data_mapped);
2320

0 commit comments

Comments
 (0)