1. 30 Apr, 2020 30 commits
  2. 29 Apr, 2020 10 commits
    • David S. Miller's avatar
      Merge branch 'net-bcmgenet-add-support-for-Wake-on-Filter' · 9e9f6e72
      David S. Miller authored
      Doug Berger says:
      
      ====================
      net: bcmgenet: add support for Wake on Filter
      
      Changes in v2:
      	Corrected Signed-off-by for commit 3/7.
      
      This commit set adds support for waking from 'standby' using a
      Rx Network Flow Classification filter specified with ethtool.
      
      The first two commits are bug fixes that should be applied to the
      stable branches, but are included in this patch set to reduce merge
      conflicts that might occur if not applied before the other commits
      in this set.
      
      The next commit consolidates WoL clock managment as a part of the
      overall WoL configuration.
      
      The next commit restores a set of functions that were removed from
      the driver just prior to the 4.9 kernel release.
      
      The following commit relocates the functions in the file to prevent
      the need for additional forward declarations.
      
      Next, support for the Rx Network Flow Classification interface of
      ethtool is added.
      
      Finally, support for the WAKE_FILTER wol method is added.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e9f6e72
    • Doug Berger's avatar
      net: bcmgenet: add WAKE_FILTER support · f50932cc
      Doug Berger authored
      This commit enables support for the WAKE_FILTER method of Wake on
      LAN for the GENET driver. The method can be enabled by adding 'f'
      to the interface 'wol' setting specified by ethtool.
      
      Rx network flow rules can be specified using ethtool. Rules that
      define a flow-type with the RX_CLS_FLOW_WAKE action (i.e. -2) can
      wake the system from the 'standby' power state when the WAKE_FILTER
      WoL method is enabled.
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f50932cc
    • Doug Berger's avatar
      net: bcmgenet: add support for ethtool rxnfc flows · 3e370952
      Doug Berger authored
      This commit enables driver support for ethtool commands of this form:
      ethtool -N|-U|--config-nfc|--config-ntuple devname
          flow-type ether|ip4
          [src xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]]
          [dst xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]] [proto N [m N]]
          [src-ip x.x.x.x [m x.x.x.x]] [dst-ip x.x.x.x [m x.x.x.x]] [tos N [m N]]
          [l4proto N [m N]] [src-port N [m N]] [dst-port N [m N]] [spi N [m N]]
          [l4data N [m N]] [vlan-etype N [m N]] [vlan N [m N]]
          [dst-mac xx:yy:zz:aa:bb:cc [m xx:yy:zz:aa:bb:cc]] [action 0] [loc N] |
          delete N
      
      Since there is only one Rx Ring in this implementation action 0 behaves no
      differently from not specifying a rule.
      
      The rules can be seen with ethtool commands of this form:
      ethtool -n|-u|--show-nfc|--show-ntuple devname [rule N]
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e370952
    • Doug Berger's avatar
      net: bcmgenet: code movement · 854295d0
      Doug Berger authored
      The Hardware Filter Block code will be used by ethtool functions
      when defining flow types so this commit moves the functions in the
      file to prevent the need for prototype declarations.
      
      This is broken out to facilitate review.
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      854295d0
    • Doug Berger's avatar
      Revert "net: bcmgenet: remove unused function in bcmgenet.c" · 14da1510
      Doug Berger authored
      This reverts commit e2072600.
      
      This commit restores the previous implementation of Hardware Filter
      Block functions to the file for use in subsequent commits.
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14da1510
    • Doug Berger's avatar
      net: bcmgenet: move clk_wol management to bcmgenet_wol · 1a1d5106
      Doug Berger authored
      The GENET_POWER_WOL_MAGIC power up and power down code configures
      the device for WoL when suspending and disables the WoL logic when
      resuming. It makes sense that this code should also manage the WoL
      clocking.
      
      This commit consolidates the logic and moves it earlier in the
      resume sequence.
      
      Since the clock is now only enabled if WoL is successfully entered
      the wol_active flag is introduced to track that state to keep the
      clock enables and disables balanced in case a suspend is aborted.
      The MPD_EN hardware bit can't be used because it can be cleared
      when the MAC is reset by a deep sleep.
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1a1d5106
    • Doug Berger's avatar
      net: bcmgenet: Fix WoL with password after deep sleep · 6f768905
      Doug Berger authored
      Broadcom STB chips support a deep sleep mode where all register contents
      are lost. Because we were stashing the MagicPacket password into some of
      these registers a suspend into that deep sleep then a resumption would
      not lead to being able to wake-up from MagicPacket with password again.
      
      Fix this by keeping a software copy of the password and program it
      during suspend.
      
      Fixes: c51de7f3 ("net: bcmgenet: add Wake-on-LAN support code")
      Suggested-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f768905
    • Doug Berger's avatar
      net: bcmgenet: set Rx mode before starting netif · 72f96347
      Doug Berger authored
      This commit explicitly calls the bcmgenet_set_rx_mode() function when
      the network interface is started. This function is normally called by
      ndo_set_rx_mode when the flags are changed, but apparently not when
      the driver is suspended and resumed.
      
      This change ensures that address filtering or promiscuous mode are
      properly restored by the driver after the MAC may have been reset.
      
      Fixes: b6e978e5 ("net: bcmgenet: add suspend/resume callbacks")
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72f96347
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 323e395f
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for nf-next:
      
      1) Add IPS_HW_OFFLOAD status bit, from Bodong Wang.
      
      2) Remove 128-bit limit on the set element data area, rise it
         to 64 bytes.
      
      3) Report EOPNOTSUPP for unsupported NAT types and flags.
      
      4) Set up nft_nat flags from the control plane path.
      
      5) Add helper functions to set up the nf_nat_range2 structure.
      
      6) Add netmap support for nft_nat.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      323e395f
    • David S. Miller's avatar
      Merge branch 'net-smc-preparations-for-SMC-R-link-failover' · 7263d72b
      David S. Miller authored
      Karsten Graul says:
      
      ====================
      net/smc: preparations for SMC-R link failover
      
      This patch series prepares the SMC code for the implementation of SMC-R link
      failover capabilities which are still missing to reach full compliance with
      RFC 7609.
      The code changes are separated into 65 patches which together form the new
      functionality. I tried to create meaningful patches which allow to follow the
      implementation.
      
      Question: how to handle the remaining 52 patches? All of them are needed for
      link failover to work and should make it into the same merge window.
      Can I send them all together?
      
      The SMC-R implementation will transparently make use of the link failover
      feature when matching RoCE devices are available, no special setup is required.
      All RoCE devices with the same PNET ID as the TCP device (hardware-defined or
      user-defined via the smc_pnet tool) are candidates to get used to form a link
      in a link group. When at least 2 RoCE devices are available on both
      communication endpoints then a symmetric link group is formed, meaning the link
      group has 2 independent links. If one RoCE device goes down then all connections
      on this link are moved to the surviving link. Upon recovery of the failing
      device or availability of a new one, the symmetric link group will be restored.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7263d72b