From nobody Sun Nov 24 19:48:53 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F000D13C3F2; Sat, 2 Nov 2024 15:16:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730560595; cv=none; b=Qhwzc3d504MIMXtkFzgdaVptrMJwNEa0JWkNz+Gf/maUBy8AF6NnB+5dtfxWomDOWa2uP0A7vJIDyCh7vcCE3geJrXZkVLGQOhju0hy4XZBnMA+aeUVtsVH+eH/SyT/tkcSBsmrTJajZ09HWzFpBDOK3OJ+fXO9buQ6JRrT/GRs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730560595; c=relaxed/simple; bh=JRd71z6CUMYCvugCsAT5+pDVaAsOQB1Rkz1mIIy1W6o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Itmld+cTOJd9MY1nh9L/JzGoEUt/7928yH1lPSMI8dfnwxM6WREU0JLaRLE5PesJ1WERIq+e3QK5txYc7m+cZhAztfCPH7/cJHVeaEH70kzTgcPKs9560SNljJslQhh8eQkJvPnorXqOaB6yHnSLRVG0C1AVjSQsl4hQvFzUWHI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=WgYBclwb; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="WgYBclwb" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=B0hFXMIsdTaqRLf4YssnEZtCdXxr4gtqyM7yHXkLYng=; b=WgYBclwbAYKhX75i Aa96WGE45oI6HzQIOom2R4xrLwKcEXRy++3vXrF/ZnYawNRH+nGC/vIkmjax4A1w+3NH782UDydXM LxNsGimeBT5xsRjsG0RqirSjbPuiho8NG8b08Ud9fRBNjdpOSsDop4JpCOGCh/P3mmF9kH8ygoIvB vP16bGplRH1VTHIMxFSdKTpK4oXAkNT5n4P/pW33ALkHN46oh3JqvHV5zsf37IMKTD2EmPtKGgKG2 b2sQWlr0bW26wqSmOUZtZerk0b0cV+FN+s/twRW7VrB7ugonPJnO3uDfv4kJm+RCFCcFZF+zpxqFk PXXyAP5WC/ocHZ8aAA==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t7FrX-00F6WZ-1V; Sat, 02 Nov 2024 15:16:27 +0000 From: linux@treblig.org To: ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-net-drivers@amd.com, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH net-next 1/4] sfc: Remove falcon deadcode Date: Sat, 2 Nov 2024 15:16:22 +0000 Message-ID: <20241102151625.39535-2-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241102151625.39535-1-linux@treblig.org> References: <20241102151625.39535-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" 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 Acked-by: Martin Habets --- drivers/net/ethernet/sfc/falcon/efx.c | 8 -------- drivers/net/ethernet/sfc/falcon/efx.h | 1 - drivers/net/ethernet/sfc/falcon/farch.c | 22 ---------------------- drivers/net/ethernet/sfc/falcon/nic.c | 11 ----------- drivers/net/ethernet/sfc/falcon/nic.h | 5 ----- drivers/net/ethernet/sfc/falcon/tx.c | 8 -------- drivers/net/ethernet/sfc/falcon/tx.h | 3 --- 7 files changed, 58 deletions(-) diff --git a/drivers/net/ethernet/sfc/falcon/efx.c b/drivers/net/ethernet/s= fc/falcon/efx.c index 8925745f1c17..b07f7e4e2877 100644 --- a/drivers/net/ethernet/sfc/falcon/efx.c +++ b/drivers/net/ethernet/sfc/falcon/efx.c @@ -1886,14 +1886,6 @@ unsigned int ef4_usecs_to_ticks(struct ef4_nic *efx,= unsigned int usecs) return usecs * 1000 / efx->timer_quantum_ns; } =20 -unsigned int ef4_ticks_to_usecs(struct ef4_nic *efx, unsigned int ticks) -{ - /* We must round up when converting ticks to microseconds - * because we round down when converting the other way. - */ - return DIV_ROUND_UP(ticks * efx->timer_quantum_ns, 1000); -} - /* Set interrupt moderation parameters */ int ef4_init_irq_moderation(struct ef4_nic *efx, unsigned int tx_usecs, unsigned int rx_usecs, bool rx_adaptive, diff --git a/drivers/net/ethernet/sfc/falcon/efx.h b/drivers/net/ethernet/s= fc/falcon/efx.h index d3b4646545fa..52508f2c8cb2 100644 --- a/drivers/net/ethernet/sfc/falcon/efx.h +++ b/drivers/net/ethernet/sfc/falcon/efx.h @@ -198,7 +198,6 @@ int ef4_try_recovery(struct ef4_nic *efx); /* Global */ void ef4_schedule_reset(struct ef4_nic *efx, enum reset_type type); unsigned int ef4_usecs_to_ticks(struct ef4_nic *efx, unsigned int usecs); -unsigned int ef4_ticks_to_usecs(struct ef4_nic *efx, unsigned int ticks); int ef4_init_irq_moderation(struct ef4_nic *efx, unsigned int tx_usecs, unsigned int rx_usecs, bool rx_adaptive, bool rx_may_override_tx); diff --git a/drivers/net/ethernet/sfc/falcon/farch.c b/drivers/net/ethernet= /sfc/falcon/farch.c index c64623c2e80c..01017c41338e 100644 --- a/drivers/net/ethernet/sfc/falcon/farch.c +++ b/drivers/net/ethernet/sfc/falcon/farch.c @@ -1631,28 +1631,6 @@ void ef4_farch_rx_push_indir_table(struct ef4_nic *e= fx) } } =20 -/* Looks at available SRAM resources and works out how many queues we - * can support, and where things like descriptor caches should live. - * - * SRAM is split up as follows: - * 0 buftbl entries for channels - * efx->vf_buftbl_base buftbl entries for SR-IOV - * efx->rx_dc_base RX descriptor caches - * efx->tx_dc_base TX descriptor caches - */ -void ef4_farch_dimension_resources(struct ef4_nic *efx, unsigned sram_lim_= qw) -{ - unsigned vi_count; - - /* Account for the buffer table entries backing the datapath channels - * and the descriptor caches for those channels. - */ - vi_count =3D max(efx->n_channels, efx->n_tx_channels * EF4_TXQ_TYPES); - - efx->tx_dc_base =3D sram_lim_qw - vi_count * TX_DC_ENTRIES; - efx->rx_dc_base =3D efx->tx_dc_base - vi_count * RX_DC_ENTRIES; -} - u32 ef4_farch_fpga_ver(struct ef4_nic *efx) { ef4_oword_t altera_build; diff --git a/drivers/net/ethernet/sfc/falcon/nic.c b/drivers/net/ethernet/s= fc/falcon/nic.c index 78c851b5a56f..1b91992e3698 100644 --- a/drivers/net/ethernet/sfc/falcon/nic.c +++ b/drivers/net/ethernet/sfc/falcon/nic.c @@ -511,14 +511,3 @@ void ef4_nic_update_stats(const struct ef4_hw_stat_des= c *desc, size_t count, } } } - -void ef4_nic_fix_nodesc_drop_stat(struct ef4_nic *efx, u64 *rx_nodesc_drop= s) -{ - /* if down, or this is the first update after coming up */ - if (!(efx->net_dev->flags & IFF_UP) || !efx->rx_nodesc_drops_prev_state) - efx->rx_nodesc_drops_while_down +=3D - *rx_nodesc_drops - efx->rx_nodesc_drops_total; - efx->rx_nodesc_drops_total =3D *rx_nodesc_drops; - efx->rx_nodesc_drops_prev_state =3D !!(efx->net_dev->flags & IFF_UP); - *rx_nodesc_drops -=3D efx->rx_nodesc_drops_while_down; -} diff --git a/drivers/net/ethernet/sfc/falcon/nic.h b/drivers/net/ethernet/s= fc/falcon/nic.h index ada6e036fd97..ac10c12967df 100644 --- a/drivers/net/ethernet/sfc/falcon/nic.h +++ b/drivers/net/ethernet/sfc/falcon/nic.h @@ -477,7 +477,6 @@ void ef4_farch_finish_flr(struct ef4_nic *efx); void falcon_start_nic_stats(struct ef4_nic *efx); void falcon_stop_nic_stats(struct ef4_nic *efx); int falcon_reset_xaui(struct ef4_nic *efx); -void ef4_farch_dimension_resources(struct ef4_nic *efx, unsigned sram_lim_= qw); void ef4_farch_init_common(struct ef4_nic *efx); void ef4_farch_rx_push_indir_table(struct ef4_nic *efx); =20 @@ -502,10 +501,6 @@ size_t ef4_nic_describe_stats(const struct ef4_hw_stat= _desc *desc, size_t count, void ef4_nic_update_stats(const struct ef4_hw_stat_desc *desc, size_t coun= t, const unsigned long *mask, u64 *stats, const void *dma_buf, bool accumulate); -void ef4_nic_fix_nodesc_drop_stat(struct ef4_nic *efx, u64 *stat); - -#define EF4_MAX_FLUSH_TIME 5000 - void ef4_farch_generate_event(struct ef4_nic *efx, unsigned int evq, ef4_qword_t *event); =20 diff --git a/drivers/net/ethernet/sfc/falcon/tx.c b/drivers/net/ethernet/sf= c/falcon/tx.c index b9369483758c..e6e80b039ca2 100644 --- a/drivers/net/ethernet/sfc/falcon/tx.c +++ b/drivers/net/ethernet/sfc/falcon/tx.c @@ -40,14 +40,6 @@ static inline u8 *ef4_tx_get_copy_buffer(struct ef4_tx_q= ueue *tx_queue, return (u8 *)page_buf->addr + offset; } =20 -u8 *ef4_tx_get_copy_buffer_limited(struct ef4_tx_queue *tx_queue, - struct ef4_tx_buffer *buffer, size_t len) -{ - if (len > EF4_TX_CB_SIZE) - return NULL; - return ef4_tx_get_copy_buffer(tx_queue, buffer); -} - static void ef4_dequeue_buffer(struct ef4_tx_queue *tx_queue, struct ef4_tx_buffer *buffer, unsigned int *pkts_compl, diff --git a/drivers/net/ethernet/sfc/falcon/tx.h b/drivers/net/ethernet/sf= c/falcon/tx.h index 2a88c59cbbbe..868ed8a861ab 100644 --- a/drivers/net/ethernet/sfc/falcon/tx.h +++ b/drivers/net/ethernet/sfc/falcon/tx.h @@ -15,9 +15,6 @@ unsigned int ef4_tx_limit_len(struct ef4_tx_queue *tx_queue, dma_addr_t dma_addr, unsigned int len); =20 -u8 *ef4_tx_get_copy_buffer_limited(struct ef4_tx_queue *tx_queue, - struct ef4_tx_buffer *buffer, size_t len); - int ef4_enqueue_skb_tso(struct ef4_tx_queue *tx_queue, struct sk_buff *skb, bool *data_mapped); =20 --=20 2.47.0 From nobody Sun Nov 24 19:48:53 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 476DC1A7265; Sat, 2 Nov 2024 15:16:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730560596; cv=none; b=F8xFBWLEOreKHahj0F1BKMRD4AHcmOe6GNdeCGoIk5JKHGVRvbAqjXYnT30CHEgUC23aSI+PuTLKGDn3yVcTVqFwm9JbGZFOmznXyCCWavDuhsXJKdbieO+uxgOwVrZOkTF2GoIiLLFiXdFGM9CTFmOLXDAHSB7mYkSoEirGrWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730560596; c=relaxed/simple; bh=ismdhQXZqtsAzCfsgCUNETEB4Kp9hChjSPzQENdWxiE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NUIELObnW8kR02WUl104W9x72jFuCHZOxjvPIKCpzCD/rwLDnTTDyRUgcg0qfS0zxaj8RTu5Hm1tjpYd2PI+8YxzeiFTs3zPGlUZw83rVEwQa5Du4HjtwzcKn/qOhzfp4Im+n/CAkKl+citrZQbtwtvM/K9DETUdTUht3MhTHUE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=W1Pmg7SI; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="W1Pmg7SI" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=Nuv+TxgokZxTw9uZP/+ccKYFiCzIeGgDiET1ELK1MqA=; b=W1Pmg7SImM1V/5Wp R1qIoS5oxfybQusUK1Lcr/RWOfImQtM76SvHXtNpw5akxtyxfpQ98c8jK2pm3e3Rzte8652B8AMNM UBaqO6iN+oVbTXahuDv3DBOSiO640lmxVlYd0P1buf2ni6JNEhRfVcaZiI0l3YtW59nmOnL72WQuW fVx4U2xlwTousYqlM7sQB1XnCODjhl4oLqKJgq292i19f87dRrxK2W1Dmly0eU+e9brihuFEemImS A1sbLOXWweIHr6uQQ4RnXof/1LV+kAlNHfkb1D3eGPzz1758oI7+tIXac6UlkdTZPjXXdIn+cmjGU ZbEvUfUQXMs7/VnGwQ==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t7FrY-00F6WZ-19; Sat, 02 Nov 2024 15:16:28 +0000 From: linux@treblig.org To: ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-net-drivers@amd.com, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH net-next 2/4] sfc: Remove unused efx_mae_mport_vf Date: Sat, 2 Nov 2024 15:16:23 +0000 Message-ID: <20241102151625.39535-3-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241102151625.39535-1-linux@treblig.org> References: <20241102151625.39535-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" efx_mae_mport_vf() has been unused since commit 5227adff37af ("sfc: add mport lookup based on driver's mport data") Remove it. Signed-off-by: Dr. David Alan Gilbert Acked-by: Martin Habets --- drivers/net/ethernet/sfc/mae.c | 11 ----------- drivers/net/ethernet/sfc/mae.h | 1 - 2 files changed, 12 deletions(-) diff --git a/drivers/net/ethernet/sfc/mae.c b/drivers/net/ethernet/sfc/mae.c index 10709d828a63..50f097487b14 100644 --- a/drivers/net/ethernet/sfc/mae.c +++ b/drivers/net/ethernet/sfc/mae.c @@ -76,17 +76,6 @@ void efx_mae_mport_uplink(struct efx_nic *efx __always_u= nused, u32 *out) *out =3D EFX_DWORD_VAL(mport); } =20 -void efx_mae_mport_vf(struct efx_nic *efx __always_unused, u32 vf_id, u32 = *out) -{ - efx_dword_t mport; - - EFX_POPULATE_DWORD_3(mport, - MAE_MPORT_SELECTOR_TYPE, MAE_MPORT_SELECTOR_TYPE_FUNC, - MAE_MPORT_SELECTOR_FUNC_PF_ID, MAE_MPORT_SELECTOR_FUNC_PF_ID_CALLE= R, - MAE_MPORT_SELECTOR_FUNC_VF_ID, vf_id); - *out =3D EFX_DWORD_VAL(mport); -} - /* Constructs an mport selector from an mport ID, because they're not the = same */ void efx_mae_mport_mport(struct efx_nic *efx __always_unused, u32 mport_id= , u32 *out) { diff --git a/drivers/net/ethernet/sfc/mae.h b/drivers/net/ethernet/sfc/mae.h index 8df30bc4f3ba..db79912c86d8 100644 --- a/drivers/net/ethernet/sfc/mae.h +++ b/drivers/net/ethernet/sfc/mae.h @@ -23,7 +23,6 @@ int efx_mae_free_mport(struct efx_nic *efx, u32 id); =20 void efx_mae_mport_wire(struct efx_nic *efx, u32 *out); void efx_mae_mport_uplink(struct efx_nic *efx, u32 *out); -void efx_mae_mport_vf(struct efx_nic *efx, u32 vf_id, u32 *out); void efx_mae_mport_mport(struct efx_nic *efx, u32 mport_id, u32 *out); =20 int efx_mae_lookup_mport(struct efx_nic *efx, u32 selector, u32 *id); --=20 2.47.0 From nobody Sun Nov 24 19:48:53 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 476861A3042; Sat, 2 Nov 2024 15:16:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730560596; cv=none; b=B51kpwzyl2vrHN3AsAx10/Lm3fDnCewL88d1h81WEvalvVVFVkPGJZOUdugXOdPAe7ifVGuZxyTkQsW9yMVuiSmg1biXzfFV7C8409UVlhD6peHlUngfm/GiMQqU8ijBXKr+s2bJEXvmH6kdHmcvm6gzw8xU1F+NhxBzn6FfKOw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730560596; c=relaxed/simple; bh=UbSuWf/19x4OB+7U6UWVKjmJ/GhijPEV35fpBLAfWE8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PJNpH2RjC5PD3XMl7z0RFG6JDHwg9FwvAhxlu+mr3aU5GWfVe8cgBkE7x/EmkM1k6fdCuENBChgngSbbvfmryUH3dqpmfhqGTp+hsV4x5xiMtfAJKZ1X4NOHRPvR/Q796f9uVVl6TEJl5NUyxHxV+n/+MNTdurdpqiZ/zByy9dE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=RLu5GH46; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="RLu5GH46" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=dUtivoqZwwFukVSbC82sMbINKjtK80TVINmS0LRQqkE=; b=RLu5GH462blDqwHS qcUjLm/DLdD7m0rcfLbMOgSRXIMate/HAg+rwrXqQAB8ztFKyuNvT9QpfM0MnEvfu/89KahzNo3Bd FKetWzYoveUQPKgyH3KJ0Kel03J+FbwokQObdfTdeZ0O8ldFWD/oJgQ2jvjmODZurfmJkj1xi3edn +qa2KSQdFAjYugWd4g0MFPQg5IYMd/Ozt/GSvFKBSWwrZDhH99R/m56jpipsfdOgIilrx/WvqbOb2 H9Kj81BbQeAR/G00rZlxVwjp8PT4oy3EdERXdqT4u2MTT8Z1Xv17MSBELME/XVgpPs8nLbQx7uFL+ qAWWXbAe2hTgm7GWUQ==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t7FrZ-00F6WZ-0X; Sat, 02 Nov 2024 15:16:29 +0000 From: linux@treblig.org To: ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-net-drivers@amd.com, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH net-next 3/4] sfc: Remove unused mcdi functions Date: Sat, 2 Nov 2024 15:16:24 +0000 Message-ID: <20241102151625.39535-4-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241102151625.39535-1-linux@treblig.org> References: <20241102151625.39535-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" efx_mcdi_flush_rxqs(), efx_mcdi_rpc_async_quiet(), efx_mcdi_rpc_finish_quiet(), and efx_mcdi_wol_filter_get_magic() are unused. I think these are fall out from the split into Siena that happened in commit 4d49e5cd4b09 ("sfc/siena: Rename functions in mcdi headers to avoid conflicts with sfc") and commit d48523cb88e0 ("sfc: Copy shared files needed for Siena (part 2)") Remove them. Signed-off-by: Dr. David Alan Gilbert Acked-by: Martin Habets --- drivers/net/ethernet/sfc/mcdi.c | 76 --------------------------------- drivers/net/ethernet/sfc/mcdi.h | 10 ----- 2 files changed, 86 deletions(-) diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcd= i.c index 76578502226e..d461b1a6ce81 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -1051,15 +1051,6 @@ efx_mcdi_rpc_async(struct efx_nic *efx, unsigned int= cmd, cookie, false); } =20 -int efx_mcdi_rpc_async_quiet(struct efx_nic *efx, unsigned int cmd, - const efx_dword_t *inbuf, size_t inlen, - size_t outlen, efx_mcdi_async_completer *complete, - unsigned long cookie) -{ - return _efx_mcdi_rpc_async(efx, cmd, inbuf, inlen, outlen, complete, - cookie, true); -} - int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen, efx_dword_t *outbuf, size_t outlen, size_t *outlen_actual) @@ -1068,14 +1059,6 @@ int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigne= d cmd, size_t inlen, outlen_actual, false, NULL, NULL); } =20 -int efx_mcdi_rpc_finish_quiet(struct efx_nic *efx, unsigned cmd, size_t in= len, - efx_dword_t *outbuf, size_t outlen, - size_t *outlen_actual) -{ - return _efx_mcdi_rpc_finish(efx, cmd, inlen, outbuf, outlen, - outlen_actual, true, NULL, NULL); -} - void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd, size_t inlen, efx_dword_t *outbuf, size_t outlen, int rc) @@ -1982,33 +1965,6 @@ efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, = const u8 *mac, int *id_out) } =20 =20 -int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out) -{ - MCDI_DECLARE_BUF(outbuf, MC_CMD_WOL_FILTER_GET_OUT_LEN); - size_t outlen; - int rc; - - rc =3D efx_mcdi_rpc(efx, MC_CMD_WOL_FILTER_GET, NULL, 0, - outbuf, sizeof(outbuf), &outlen); - if (rc) - goto fail; - - if (outlen < MC_CMD_WOL_FILTER_GET_OUT_LEN) { - rc =3D -EIO; - goto fail; - } - - *id_out =3D (int)MCDI_DWORD(outbuf, WOL_FILTER_GET_OUT_FILTER_ID); - - return 0; - -fail: - *id_out =3D -1; - netif_err(efx, hw, efx->net_dev, "%s: failed rc=3D%d\n", __func__, rc); - return rc; -} - - int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id) { MCDI_DECLARE_BUF(inbuf, MC_CMD_WOL_FILTER_REMOVE_IN_LEN); @@ -2021,38 +1977,6 @@ int efx_mcdi_wol_filter_remove(struct efx_nic *efx, = int id) return rc; } =20 -int efx_mcdi_flush_rxqs(struct efx_nic *efx) -{ - struct efx_channel *channel; - struct efx_rx_queue *rx_queue; - MCDI_DECLARE_BUF(inbuf, - MC_CMD_FLUSH_RX_QUEUES_IN_LEN(EFX_MAX_CHANNELS)); - int rc, count; - - BUILD_BUG_ON(EFX_MAX_CHANNELS > - MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM); - - count =3D 0; - efx_for_each_channel(channel, efx) { - efx_for_each_channel_rx_queue(rx_queue, channel) { - if (rx_queue->flush_pending) { - rx_queue->flush_pending =3D false; - atomic_dec(&efx->rxq_flush_pending); - MCDI_SET_ARRAY_DWORD( - inbuf, FLUSH_RX_QUEUES_IN_QID_OFST, - count, efx_rx_queue_index(rx_queue)); - count++; - } - } - } - - rc =3D efx_mcdi_rpc(efx, MC_CMD_FLUSH_RX_QUEUES, inbuf, - MC_CMD_FLUSH_RX_QUEUES_IN_LEN(count), NULL, 0, NULL); - WARN_ON(rc < 0); - - return rc; -} - int efx_mcdi_wol_filter_reset(struct efx_nic *efx) { int rc; diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcd= i.h index ea612c619874..cdb17d7c147f 100644 --- a/drivers/net/ethernet/sfc/mcdi.h +++ b/drivers/net/ethernet/sfc/mcdi.h @@ -155,9 +155,6 @@ int efx_mcdi_rpc_start(struct efx_nic *efx, unsigned cm= d, int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen, efx_dword_t *outbuf, size_t outlen, size_t *outlen_actual); -int efx_mcdi_rpc_finish_quiet(struct efx_nic *efx, unsigned cmd, - size_t inlen, efx_dword_t *outbuf, - size_t outlen, size_t *outlen_actual); =20 typedef void efx_mcdi_async_completer(struct efx_nic *efx, unsigned long cookie, int rc, @@ -167,11 +164,6 @@ int efx_mcdi_rpc_async(struct efx_nic *efx, unsigned i= nt cmd, const efx_dword_t *inbuf, size_t inlen, size_t outlen, efx_mcdi_async_completer *complete, unsigned long cookie); -int efx_mcdi_rpc_async_quiet(struct efx_nic *efx, unsigned int cmd, - const efx_dword_t *inbuf, size_t inlen, - size_t outlen, - efx_mcdi_async_completer *complete, - unsigned long cookie); =20 void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd, size_t inlen, efx_dword_t *outbuf, @@ -410,10 +402,8 @@ int efx_mcdi_handle_assertion(struct efx_nic *efx); int efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, const u8 *mac, int *id_out); -int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out); int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id); int efx_mcdi_wol_filter_reset(struct efx_nic *efx); -int efx_mcdi_flush_rxqs(struct efx_nic *efx); void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev); void efx_mcdi_mac_start_stats(struct efx_nic *efx); void efx_mcdi_mac_stop_stats(struct efx_nic *efx); --=20 2.47.0 From nobody Sun Nov 24 19:48:53 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C36D619F409; Sat, 2 Nov 2024 15:16:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730560598; cv=none; b=NZLyOMJLdQBn5W+/uSIlE2dt52XPT6yuETneqOQtCcIDqMwB1Ng8/AS4yPmTQu2ZTycRSydrmKVGKdQSn7Z7iwaUcm7csmmSg7/FXKvKaJ/RdQneP58qqVnFr2JYOiaYHEk07J8vYLNSC0P5TKcDVwVQD590lqqQ/Dk/sepsHX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730560598; c=relaxed/simple; bh=P5HZuhcGf3cFBA+A3tV5V3VnkK+SmRrbOL72QSgrTKk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SwZZGptKnjpJlWauIbh1z4U4yn75rJ+Db6V6yMPSgD91rXlexQgUvGDXPh0uyTSoTn7CTMzyQipxOcn9M9Gp4gntmxeVqpBDSo1IWeeLwvjf/RUHrAVS0YIk7tVkSVZ1sWgVRluZJ311xIPzsyKzOd4SAWE0eNOySJzKNchQS4g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=B2sad9+f; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="B2sad9+f" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=yrQTyP91hTnzUDfr+6Z9M449GasNlZJsvCf6FX7ZLlY=; b=B2sad9+f1PHt+PgD BwJtNHQLBDsArkExCpm49vTqBbJQSdZucuFfaOHo9BkPRW7Dwpe79ZCX8hr7QGZGhvtZKavXwSAjZ ODMtfY0rvM8hqOAm5eNmRLFdSrrvupSLv8PjXgx6tt4onfZ5bs1B9UZGqHv766W6mKxauAB/QSvs8 yls05WaaOfx21ayQUZTSJtah6WcftN/I7092jqG/YuDRyMot2qXrPWmZ0YmufBZoMoVGFKulXp0HS PfnHQ2nOFjmlXt2f2DK5PwVRhl+0nwiTLsxErfHLyx5KuAFQurnEl2zgps6OazCoz3+hpJ5gzpEFG iQAlRw//GhWkONkR8Q==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1t7Fra-00F6WZ-2I; Sat, 02 Nov 2024 15:16:30 +0000 From: linux@treblig.org To: ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-net-drivers@amd.com, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH net-next 4/4] sfc: Remove more unused functions Date: Sat, 2 Nov 2024 15:16:25 +0000 Message-ID: <20241102151625.39535-5-linux@treblig.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241102151625.39535-1-linux@treblig.org> References: <20241102151625.39535-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" efx_ticks_to_usecs(), efx_reconfigure_port(), efx_ptp_get_mode(), and efx_tx_get_copy_buffer_limited() are unused. They seem to be partially due to the later splits to Siena, but some seem unused for longer. Remove them. Signed-off-by: Dr. David Alan Gilbert Acked-by: Martin Habets --- drivers/net/ethernet/sfc/efx.c | 8 -------- drivers/net/ethernet/sfc/efx.h | 1 - drivers/net/ethernet/sfc/efx_common.c | 16 ---------------- drivers/net/ethernet/sfc/efx_common.h | 1 - drivers/net/ethernet/sfc/ptp.c | 5 ----- drivers/net/ethernet/sfc/ptp.h | 1 - drivers/net/ethernet/sfc/tx.c | 8 -------- drivers/net/ethernet/sfc/tx.h | 3 --- 8 files changed, 43 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 36b3b57e2055..0382ac30d1aa 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -417,14 +417,6 @@ unsigned int efx_usecs_to_ticks(struct efx_nic *efx, u= nsigned int usecs) return usecs * 1000 / efx->timer_quantum_ns; } =20 -unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks) -{ - /* We must round up when converting ticks to microseconds - * because we round down when converting the other way. - */ - return DIV_ROUND_UP(ticks * efx->timer_quantum_ns, 1000); -} - /* Set interrupt moderation parameters */ int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs, unsigned int rx_usecs, bool rx_adaptive, diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h index 7a6cab883d66..45e191686625 100644 --- a/drivers/net/ethernet/sfc/efx.h +++ b/drivers/net/ethernet/sfc/efx.h @@ -168,7 +168,6 @@ extern const struct ethtool_ops efx_ethtool_ops; =20 /* Global */ unsigned int efx_usecs_to_ticks(struct efx_nic *efx, unsigned int usecs); -unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks); int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs, unsigned int rx_usecs, bool rx_adaptive, bool rx_may_override_tx); diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/s= fc/efx_common.c index 13cf647051af..c88ec3e24836 100644 --- a/drivers/net/ethernet/sfc/efx_common.c +++ b/drivers/net/ethernet/sfc/efx_common.c @@ -635,22 +635,6 @@ int __efx_reconfigure_port(struct efx_nic *efx) return rc; } =20 -/* Reinitialise the MAC to pick up new PHY settings, even if the port is - * disabled. - */ -int efx_reconfigure_port(struct efx_nic *efx) -{ - int rc; - - EFX_ASSERT_RESET_SERIALISED(efx); - - mutex_lock(&efx->mac_lock); - rc =3D __efx_reconfigure_port(efx); - mutex_unlock(&efx->mac_lock); - - return rc; -} - /************************************************************************** * * Device reset and suspend diff --git a/drivers/net/ethernet/sfc/efx_common.h b/drivers/net/ethernet/s= fc/efx_common.h index 2c54dac3e662..19a8ca530969 100644 --- a/drivers/net/ethernet/sfc/efx_common.h +++ b/drivers/net/ethernet/sfc/efx_common.h @@ -40,7 +40,6 @@ void efx_destroy_reset_workqueue(void); void efx_start_monitor(struct efx_nic *efx); =20 int __efx_reconfigure_port(struct efx_nic *efx); -int efx_reconfigure_port(struct efx_nic *efx); =20 #define EFX_ASSERT_RESET_SERIALISED(efx) \ do { \ diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c index aaacdcfa54ae..36bceeeb6483 100644 --- a/drivers/net/ethernet/sfc/ptp.c +++ b/drivers/net/ethernet/sfc/ptp.c @@ -1800,11 +1800,6 @@ int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *= skb) return NETDEV_TX_OK; } =20 -int efx_ptp_get_mode(struct efx_nic *efx) -{ - return efx->ptp_data->mode; -} - int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted, unsigned int new_mode) { diff --git a/drivers/net/ethernet/sfc/ptp.h b/drivers/net/ethernet/sfc/ptp.h index 6946203499ef..feab7bdd7889 100644 --- a/drivers/net/ethernet/sfc/ptp.h +++ b/drivers/net/ethernet/sfc/ptp.h @@ -26,7 +26,6 @@ int efx_ptp_get_ts_config(struct efx_nic *efx, void efx_ptp_get_ts_info(struct efx_nic *efx, struct kernel_ethtool_ts_info *ts_info); bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); -int efx_ptp_get_mode(struct efx_nic *efx); int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted, unsigned int new_mode); int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c index fe2d476028e7..6b4a343a455d 100644 --- a/drivers/net/ethernet/sfc/tx.c +++ b/drivers/net/ethernet/sfc/tx.c @@ -49,14 +49,6 @@ static inline u8 *efx_tx_get_copy_buffer(struct efx_tx_q= ueue *tx_queue, return (u8 *)page_buf->addr + offset; } =20 -u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue, - struct efx_tx_buffer *buffer, size_t len) -{ - if (len > EFX_TX_CB_SIZE) - return NULL; - return efx_tx_get_copy_buffer(tx_queue, buffer); -} - static void efx_tx_maybe_stop_queue(struct efx_tx_queue *txq1) { /* We need to consider all queues that the net core sees as one */ diff --git a/drivers/net/ethernet/sfc/tx.h b/drivers/net/ethernet/sfc/tx.h index f2c4d2f89919..f882749af8c3 100644 --- a/drivers/net/ethernet/sfc/tx.h +++ b/drivers/net/ethernet/sfc/tx.h @@ -15,9 +15,6 @@ unsigned int efx_tx_limit_len(struct efx_tx_queue *tx_queue, dma_addr_t dma_addr, unsigned int len); =20 -u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue, - struct efx_tx_buffer *buffer, size_t len); - /* What TXQ type will satisfy the checksum offloads required for this skb?= */ static inline unsigned int efx_tx_csum_type_skb(struct sk_buff *skb) { --=20 2.47.0