Skip to content

Commit 33d005b

Browse files
committed
Merge branch 'a-pile-of-sfc-deadcode'
Dr. David Alan Gilbert says: ==================== A pile of sfc deadcode This is a collection of deadcode removal in the sfc drivers; the split is vaguely where I found them in the tree, with some left over. This has been build tested and booted on an x86 VM, but I fon't have the hardware to test; however it's all full function removal. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> ==================== Link: https://patch.msgid.link/20241102151625.39535-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 84bfbfb + d3e8007 commit 33d005b

File tree

19 files changed

+0
-199
lines changed

19 files changed

+0
-199
lines changed

drivers/net/ethernet/sfc/efx.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,6 @@ unsigned int efx_usecs_to_ticks(struct efx_nic *efx, unsigned int usecs)
418418
return usecs * 1000 / efx->timer_quantum_ns;
419419
}
420420

421-
unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks)
422-
{
423-
/* We must round up when converting ticks to microseconds
424-
* because we round down when converting the other way.
425-
*/
426-
return DIV_ROUND_UP(ticks * efx->timer_quantum_ns, 1000);
427-
}
428-
429421
/* Set interrupt moderation parameters */
430422
int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
431423
unsigned int rx_usecs, bool rx_adaptive,

drivers/net/ethernet/sfc/efx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ extern const struct ethtool_ops efx_ethtool_ops;
168168

169169
/* Global */
170170
unsigned int efx_usecs_to_ticks(struct efx_nic *efx, unsigned int usecs);
171-
unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks);
172171
int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
173172
unsigned int rx_usecs, bool rx_adaptive,
174173
bool rx_may_override_tx);

drivers/net/ethernet/sfc/efx_common.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -635,22 +635,6 @@ int __efx_reconfigure_port(struct efx_nic *efx)
635635
return rc;
636636
}
637637

638-
/* Reinitialise the MAC to pick up new PHY settings, even if the port is
639-
* disabled.
640-
*/
641-
int efx_reconfigure_port(struct efx_nic *efx)
642-
{
643-
int rc;
644-
645-
EFX_ASSERT_RESET_SERIALISED(efx);
646-
647-
mutex_lock(&efx->mac_lock);
648-
rc = __efx_reconfigure_port(efx);
649-
mutex_unlock(&efx->mac_lock);
650-
651-
return rc;
652-
}
653-
654638
/**************************************************************************
655639
*
656640
* Device reset and suspend

drivers/net/ethernet/sfc/efx_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ void efx_destroy_reset_workqueue(void);
4040
void efx_start_monitor(struct efx_nic *efx);
4141

4242
int __efx_reconfigure_port(struct efx_nic *efx);
43-
int efx_reconfigure_port(struct efx_nic *efx);
4443

4544
#define EFX_ASSERT_RESET_SERIALISED(efx) \
4645
do { \

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,

0 commit comments

Comments
 (0)