* [PATCH 1/1] net: macb: restore cmp registers on resume path
@ 2021-04-02 12:42 Claudiu Beznea
2021-04-02 13:38 ` Nicolas Ferre
2021-04-02 21:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Claudiu Beznea @ 2021-04-02 12:42 UTC (permalink / raw)
To: nicolas.ferre, davem, kuba; +Cc: netdev, linux-kernel, Claudiu Beznea
Restore CMP screener registers on resume path.
Fixes: c1e85c6ce57ef ("net: macb: save/restore the remaining registers and features")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
drivers/net/ethernet/cadence/macb_main.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index f56f3dbbc015..ffd56a23f8b0 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3269,6 +3269,9 @@ static void gem_prog_cmp_regs(struct macb *bp, struct ethtool_rx_flow_spec *fs)
bool cmp_b = false;
bool cmp_c = false;
+ if (!macb_is_gem(bp))
+ return;
+
tp4sp_v = &(fs->h_u.tcp_ip4_spec);
tp4sp_m = &(fs->m_u.tcp_ip4_spec);
@@ -3637,6 +3640,7 @@ static void macb_restore_features(struct macb *bp)
{
struct net_device *netdev = bp->dev;
netdev_features_t features = netdev->features;
+ struct ethtool_rx_fs_item *item;
/* TX checksum offload */
macb_set_txcsum_feature(bp, features);
@@ -3645,6 +3649,9 @@ static void macb_restore_features(struct macb *bp)
macb_set_rxcsum_feature(bp, features);
/* RX Flow Filters */
+ list_for_each_entry(item, &bp->rx_fs_list.list, list)
+ gem_prog_cmp_regs(bp, &item->fs);
+
macb_set_rxflow_feature(bp, features);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] net: macb: restore cmp registers on resume path
2021-04-02 12:42 [PATCH 1/1] net: macb: restore cmp registers on resume path Claudiu Beznea
@ 2021-04-02 13:38 ` Nicolas Ferre
2021-04-02 21:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2021-04-02 13:38 UTC (permalink / raw)
To: Claudiu Beznea, davem, kuba; +Cc: netdev, linux-kernel
On 02/04/2021 at 14:42, Claudiu Beznea wrote:
> Restore CMP screener registers on resume path.
>
> Fixes: c1e85c6ce57ef ("net: macb: save/restore the remaining registers and features")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks for this fix Claudiu. Best regards,
Nicolas
> ---
> drivers/net/ethernet/cadence/macb_main.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index f56f3dbbc015..ffd56a23f8b0 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -3269,6 +3269,9 @@ static void gem_prog_cmp_regs(struct macb *bp, struct ethtool_rx_flow_spec *fs)
> bool cmp_b = false;
> bool cmp_c = false;
>
> + if (!macb_is_gem(bp))
> + return;
> +
> tp4sp_v = &(fs->h_u.tcp_ip4_spec);
> tp4sp_m = &(fs->m_u.tcp_ip4_spec);
>
> @@ -3637,6 +3640,7 @@ static void macb_restore_features(struct macb *bp)
> {
> struct net_device *netdev = bp->dev;
> netdev_features_t features = netdev->features;
> + struct ethtool_rx_fs_item *item;
>
> /* TX checksum offload */
> macb_set_txcsum_feature(bp, features);
> @@ -3645,6 +3649,9 @@ static void macb_restore_features(struct macb *bp)
> macb_set_rxcsum_feature(bp, features);
>
> /* RX Flow Filters */
> + list_for_each_entry(item, &bp->rx_fs_list.list, list)
> + gem_prog_cmp_regs(bp, &item->fs);
> +
> macb_set_rxflow_feature(bp, features);
> }
>
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] net: macb: restore cmp registers on resume path
2021-04-02 12:42 [PATCH 1/1] net: macb: restore cmp registers on resume path Claudiu Beznea
2021-04-02 13:38 ` Nicolas Ferre
@ 2021-04-02 21:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-02 21:40 UTC (permalink / raw)
To: Claudiu Beznea; +Cc: nicolas.ferre, davem, kuba, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Fri, 2 Apr 2021 15:42:53 +0300 you wrote:
> Restore CMP screener registers on resume path.
>
> Fixes: c1e85c6ce57ef ("net: macb: save/restore the remaining registers and features")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
> drivers/net/ethernet/cadence/macb_main.c | 7 +++++++
> 1 file changed, 7 insertions(+)
Here is the summary with links:
- [1/1] net: macb: restore cmp registers on resume path
https://git.kernel.org/netdev/net/c/a14d273ba159
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-02 21:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 12:42 [PATCH 1/1] net: macb: restore cmp registers on resume path Claudiu Beznea
2021-04-02 13:38 ` Nicolas Ferre
2021-04-02 21:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).