Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2058857pxb; Mon, 12 Apr 2021 13:13:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLSBfPDBur9+GU7vwrFThSYY66x7C6/nK50SuHJwZMJj/j6jRYSkTTMckwuOHNf9rMxkVf X-Received: by 2002:a17:902:bc89:b029:e9:2cd7:382e with SMTP id bb9-20020a170902bc89b02900e92cd7382emr27724369plb.68.1618258420259; Mon, 12 Apr 2021 13:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618258420; cv=none; d=google.com; s=arc-20160816; b=Cv4PnkpPtSt4hQGaPHbm0dCfOlSNq2FgKyq8ENrjZzyXFt/h2K8ojEaf1VyFh69FBt jm2Vair6on6jwBxXqycLud+hHock/G21qcYACHe5Bt/59VjuYcM8b6MZPYQbpVi4hMOz HulBdwBUw0e5qG7BtP5n+/0lRRs/7gBY/mPTVcv6MB2prQalf4P06tcRqnn5bDqC/QtB FrSb9jdCFEye4t69UdBhHBI/vcXpZFJVuHdV+gd2iJht6fvTCUr4PlYSPD/QUWItlimc rEpG2Ly21Ecw+DJpbPrcLNgAWXu7/D2KjNxP5CK/CDiu1xQxtZFDGDYWvaW2uZjK+d3W Wb4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VzFKBRFtiY+xQYuD/olrt4exuGaq+gcHdwhwq/yPMMo=; b=uFNcs9ArtJpohh/QnqbS1vqLaoyj6aAhCET/Q243upryM5sHYmUQUpwkxRXyoPqU0K cSYVJP6HeXTivdEZeMIQGQbW4H/btKyzN6l+c1QYt3PDimnKAb7UKomEIpyjW/NlhXAU HMvYyQDUukUVOvJ0CHmHi2Z3P215TGEltKlj38yRx3t3kIoIK5FnTXPEA1tO72kVO/Qj p8WNrn3EUvJBv61HPonrK/Lv92OaRXvb89Rxmqvtorc3iCy+/Skqx8dr26ORhuUUCNOa Vyuo6rAq7eB/C+d6hCu8z26pVswXMmor5gYYHhUlM+X67GC0AIwwEwI8WzwphmYdTrlA rRNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x8rlijiP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b33si14412492pgl.564.2021.04.12.13.13.27; Mon, 12 Apr 2021 13:13:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x8rlijiP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238637AbhDLIyQ (ORCPT + 99 others); Mon, 12 Apr 2021 04:54:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:39972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238335AbhDLItc (ORCPT ); Mon, 12 Apr 2021 04:49:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6C25760241; Mon, 12 Apr 2021 08:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217316; bh=gDAOYvPVC5TcVGbP+NRv9e4f8c0w2Jn7OE3syidisZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x8rlijiP+kaMcvZSQGK0t+0WcLN9cl3z22fhM4XNwmVZyU9P7NW1qsh0xRy0UlAcV 6Uzk3WfPJA+o3qGeCAOepM91pI8EB8qOGxPMUPvsbfkRYY9fjEIe3+Qyilg4j4DOms 5JvXrTZTmvmCSz+fFNmN5iv2lGwyFyyIm1j0O5PQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Claudiu Beznea , Nicolas Ferre , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 081/111] net: macb: restore cmp registers on resume path Date: Mon, 12 Apr 2021 10:40:59 +0200 Message-Id: <20210412084006.966404694@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084004.200986670@linuxfoundation.org> References: <20210412084004.200986670@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Claudiu Beznea [ Upstream commit a14d273ba15968495896a38b7b3399dba66d0270 ] Restore CMP screener registers on resume path. Fixes: c1e85c6ce57ef ("net: macb: save/restore the remaining registers and features") Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 3f74416bb874..bdef5b3dd848 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -2915,6 +2915,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); @@ -3286,6 +3289,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); @@ -3294,6 +3298,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.30.2