From patchwork Thu Oct 26 22:45:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13437991 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 A39058BFD for ; Thu, 26 Oct 2023 22:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="DdBKAfVB" Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33C531BC for ; Thu, 26 Oct 2023 15:55:37 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1c87a85332bso12708075ad.2 for ; Thu, 26 Oct 2023 15:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1698360936; x=1698965736; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=//dKD4KvqTBXzSCDx8Qvfzi+xyEtiP4i2DsPcGJUks8=; b=DdBKAfVBnHXa+ImPjM1yFQ8ta6Ev6D+LJL1xMoXNNW8lsRPzq4AE9FFW6eiB5Izp0f XMMH8mw/qU3dURFa5Y7Pq0aTUOZv/h/PLEDwwCmyBGq67H0nn94BvAj8FO2Bm6tdHZNr GcAlap46PoAm3XRu+PYi15F61z31pI6set/5w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698360936; x=1698965736; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=//dKD4KvqTBXzSCDx8Qvfzi+xyEtiP4i2DsPcGJUks8=; b=aRgsoE9G0Zg9C2YtyaQHVo1X/Bh3vak/4GbGJubVZtzDQbjn/BgU01rrkdTDUQC+ol hBERvzs3AOcSF6iyOehZg6pWrlI5C129yf+fCNgN5HxzlZWa8vpshgodSd6D8bcsjU52 TE9J68EfriOfD0Lm5JKy2A/GKmhmcHAmedewfVt1XCD+LmDlixSH0zV2tzKH1776RlmY eoEuMmwUhw3oi+ksNab5PTp7ygZ9LD8wKjcg+iOTV2qWXlcW9dP7IqCBZG1nTGnZNkq6 g55oBMYgPCODOFuQDAUzEtKtLbP+DrsPbRmGAzqd+C1MY3pSCBYQoQKdbRW3HN20yFo0 CFwQ== X-Gm-Message-State: AOJu0YxCptTNE3CDkOevmuytyV5V/Qh6mLK2EC6rIG45RWakfQOSytp6 n7HPbb+OrQsJ21IOaqaohx3+aEs4vzvJRwFG8cnaKLC60g8BTpBxcSkv99JwsnEK72ixGKBOYdF AOtxGrAEQNPSZg8Txl07Uxhe0nZPcCAb842yOWPksMK0L44nFwug0kCSOoVgoGUcg55TLrsO/X1 q7FX9ed5oNhSyE X-Google-Smtp-Source: AGHT+IHbAbE0uvWV6QoIzGblKzN/iCV2i/8YEfc8RxoVyM3TQ5O/rl5wiLqo0kVYxsFR9Nq8Z8Lsjg== X-Received: by 2002:a17:903:2a8f:b0:1cc:118d:980b with SMTP id lv15-20020a1709032a8f00b001cc118d980bmr1154917plb.51.1698360936002; Thu, 26 Oct 2023 15:55:36 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id o1-20020a170902d4c100b001c9b5b63e36sm206295plg.32.2023.10.26.15.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 15:55:35 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , Doug Berger , Broadcom internal kernel review list , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Russell King , Vladimir Oltean , Tariq Toukan , Gal Pressman , Willem de Bruijn , Daniil Tatianin , Simon Horman , Justin Chen , Ratheesh Kannoth , Joe Damato , Vincent Mailhol , Jiri Pirko , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next v2 0/5] WAKE_FILTER for Broadcom PHY (v2) Date: Thu, 26 Oct 2023 15:45:04 -0700 Message-Id: <20231026224509.112353-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org This is a re-submission of the series that was submitted before: https://lore.kernel.org/all/20230516231713.2882879-1-florian.fainelli@broadcom.com/ A number of things have changed: - there is proper fallback between the PHY and the MAC now, whereas before we would abort right away due to -EOPNOTSUPP - added support for programming the Ethernet type for matching - fixed reporting of masks via ethtool - added proper validation of RX_CLS_LOC_ANY/RX_CLS_LOC_FIRST and location - addressed feedback given by Andrew by validating that we have at least one RX_CLS_FLOW_WAKE filter programmed to allow enabling WAKE_FILTER via ethtool, otherwise we will not wake-up from WAKE_FILTER - use a PHY register as a scratchpad to accurately report whether a custom filter was installed, before that we would falsely report WAKE_UCAST/BCAST/MCAST but not WAKE_FILTER upon cold boot - corrected commit message to be accurate (MAC address did not match the IPv4 address in the example) Changes in v2: - corrected sparse annotationes for h_proto (Vincent) - added 2 spaces for commands in commit messages (Vincent) - added hunk in patch 5 back into patch 4 (self) Florian Fainelli (5): net: ethtool: Make RXNFC walking code accept a callback net: ethtool: Add validation for WAKE_FILTER net: phy: Add pluming for ethtool_{get,set}_rxnfc net: phy: broadcom: Add support for WAKE_FILTER net: bcmgenet: Interrogate PHY for WAKE_FILTER programming .../net/ethernet/broadcom/genet/bcmgenet.c | 16 ++ drivers/net/phy/bcm-phy-lib.c | 205 +++++++++++++++++- drivers/net/phy/bcm-phy-lib.h | 5 + drivers/net/phy/broadcom.c | 2 + drivers/net/phy/phy.c | 19 ++ include/linux/phy.h | 8 + net/ethtool/common.c | 96 +++++++- net/ethtool/common.h | 3 + net/ethtool/ioctl.c | 3 + net/ethtool/wol.c | 3 + 10 files changed, 350 insertions(+), 10 deletions(-)