From patchwork Wed Oct 25 17:32:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13436491 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 E9FC41C683 for ; Wed, 25 Oct 2023 17:34:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="CKAQEC1k" Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 203FC18D for ; Wed, 25 Oct 2023 10:34:34 -0700 (PDT) Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-58686e94ad7so13865eaf.3 for ; Wed, 25 Oct 2023 10:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1698255273; x=1698860073; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=YplGgIi+ncY99CV9VZJneqdX4D4fS66pXzqEMeT9MKQ=; b=CKAQEC1k8zrVAfTxhhdmpS1V0IWZ2ch256B847i+sUZf/rSNtwp/YWN57QMOMSp/Tm eHl7ysKPaG7R1hYimD1rWLLQeCYwPXAi8LFye1GO52EIqP5lR054tDGf4V6TpYAqD+vW XLJ8zSv4tvCYe70+J2fuW0JLNtFG9LJzGuvHE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698255273; x=1698860073; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YplGgIi+ncY99CV9VZJneqdX4D4fS66pXzqEMeT9MKQ=; b=WUEiehUMeDunkQanxC6ifBvcQAyne4EpAA8Y+jcQtB1+iJzq5ASksLwxNn7YbCIjuM elAf8KXt6D64zXRMiipGWYl3r1mK96aPxfm0ygy3/dF8/b2riwugdFeVFti/hYi9L5jD K9ZZpbMGhojqQuGmSVEE3QHt1WSxo5yEwzvlteSTy4s0z4TrSEm1rQ43Mm52wavmURQm Je1gCbV4J831ImhVht6U6NJgAWzJL/Ks8DAOVzbp+MWLufqYbA16qIJ6ypMuw4SVBROH oUUJ6yvs5mVG85paSIdFN4gu3DYc4rtuDtX9ZFewyTDVgGmlJG/WXGIQu/XL1LQQwZf+ L1Zw== X-Gm-Message-State: AOJu0YyX8hmBcL8hZogGxPInuZAb8lH9Q/qfKg9zEV9rAo/vVnuMHGX4 Zm6R2QUB8kuQATE/F8/RKNBEaPMZZZqEK48RaIM4iB5BxxjUJ2ZAMg+NPzxlCm1QKMR0D2IDBG9 yqS4q3i+ZPNJhAVSI0t2WPpea5KxxTjoXLLo+H0XZNn1/zZM4ZE8S4Kt8rXN7lV/M09cZU50rg0 hZdKcRDr9tdUJy X-Google-Smtp-Source: AGHT+IEGl+0aGCz1gUfiI2B0otlPHbEoUUap/6c5hmaDqPXoEdzS2zEF35EObkwjX8fiy0u78CCQxA== X-Received: by 2002:a05:6359:6109:b0:168:e859:61f with SMTP id rz9-20020a056359610900b00168e859061fmr7105453rwb.27.1698255272711; Wed, 25 Oct 2023 10:34:32 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id bp37-20020a05620a45a500b00767dcf6f4adsm4332384qkb.51.2023.10.25.10.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:34:31 -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 0/5] WAKE_FILTER for Broadcom PHY (v2) Date: Wed, 25 Oct 2023 10:32:55 -0700 Message-Id: <20231025173300.1776832-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) 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(-)