Skip to content
  1. Jan 10, 2020
  2. Jan 09, 2020
  3. Jan 08, 2020
  4. Jan 07, 2020
    • David S. Miller's avatar
      Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 5528e0d7
      David S. Miller authored
      
      
      Jeff Kirsher says:
      
      ====================
      1GbE Intel Wired LAN Driver Updates 2020-01-06
      
      This series contains updates to igc to add basic support for
      timestamping.
      
      Vinicius adds basic support for timestamping and enables ptp4l/phc2sys
      to work with i225 devices.  Initially, adds the ability to read and
      adjust the PHC clock.  Patches 2 & 3 enable and retrieve hardware
      timestamps.  Patch 4 implements the ethtool ioctl that ptp4l uses to
      check what timestamping methods are supported.  Lastly, added support to
      do timestamping using the "Start of Packet" signal from the PHY, which
      is now supported in i225 devices.
      
      While i225 does support multiple PTP domains, with multiple timestamping
      registers, we currently only support one PTP domain and use only one of
      the timestamping registers for implementation purposes.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5528e0d7
    • David S. Miller's avatar
      Merge branch 'Unique-mv88e6xxx-IRQ-names' · 1b935183
      David S. Miller authored
      
      
      Andrew Lunn says:
      
      ====================
      Unique mv88e6xxx IRQ names
      
      There are a few boards which have multiple mv88e6xxx switches. With
      such boards, it can be hard to determine which interrupts belong to
      which switches. Make the interrupt names unique by including the
      device name in the interrupt name. For the SERDES interrupt, also
      include the port number. As a result of these patches ZII devel C
      looks like:
      
       50:          0  gpio-vf610  27 Level     mv88e6xxx-0.1:00
       54:          0  mv88e6xxx-g1   3 Edge      mv88e6xxx-0.1:00-g1-atu-prob
       56:          0  mv88e6xxx-g1   5 Edge      mv88e6xxx-0.1:00-g1-vtu-prob
       58:          0  mv88e6xxx-g1   7 Edge      mv88e6xxx-0.1:00-g2
       61:          0  mv88e6xxx-g2   1 Edge      !mdio-mux!mdio@1!switch@0!mdio:01
       62:          0  mv88e6xxx-g2   2 Edge      !mdio-mux!mdio@1!switch@0!mdio:02
       63:          0  mv88e6xxx-g2   3 Edge      !mdio-mux!mdio@1!switch@0!mdio:03
       64:          0  mv88e6xxx-g2   4 Edge      !mdio-mux!mdio@1!switch@0!mdio:04
       70:          0  mv88e6xxx-g2  10 Edge      mv88e6xxx-0.1:00-serdes-10
       75:          0  mv88e6xxx-g2  15 Edge      mv88e6xxx-0.1:00-watchdog
       76:          5  gpio-vf610  26 Level     mv88e6xxx-0.2:00
       80:          0  mv88e6xxx-g1   3 Edge      mv88e6xxx-0.2:00-g1-atu-prob
       82:          0  mv88e6xxx-g1   5 Edge      mv88e6xxx-0.2:00-g1-vtu-prob
       84:          4  mv88e6xxx-g1   7 Edge      mv88e6xxx-0.2:00-g2
       87:          2  mv88e6xxx-g2   1 Edge      !mdio-mux!mdio@2!switch@0!mdio:01
       88:          0  mv88e6xxx-g2   2 Edge      !mdio-mux!mdio@2!switch@0!mdio:02
       89:          0  mv88e6xxx-g2   3 Edge      !mdio-mux!mdio@2!switch@0!mdio:03
       90:          0  mv88e6xxx-g2   4 Edge      !mdio-mux!mdio@2!switch@0!mdio:04
       95:          3  mv88e6xxx-g2   9 Edge      mv88e6xxx-0.2:00-serdes-9
       96:          0  mv88e6xxx-g2  10 Edge      mv88e6xxx-0.2:00-serdes-10
      101:          0  mv88e6xxx-g2  15 Edge      mv88e6xxx-0.2:00-watchdog
      
      Interrupt names like !mdio-mux!mdio@2!switch@0!mdio:01 are created by
      phylib for the integrated PHYs. The mv88e6xxx driver does not
      determine these names.
      ====================
      
      Tested-by: default avatarChris Healy <cphealy@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b935183
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Unique ATU and VTU IRQ names · 8ddf0b56
      Andrew Lunn authored
      
      
      Dynamically generate a unique interrupt name for the VTU and ATU,
      based on the device name.
      
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ddf0b56
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Unique g2 IRQ name · 06acd114
      Andrew Lunn authored
      
      
      Dynamically generate a unique g2 interrupt name, based on the
      device name.
      
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      06acd114
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Unique watchdog IRQ name · 8b4db289
      Andrew Lunn authored
      
      
      Dynamically generate a unique watchdog interrupt name, based on the
      device name.
      
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b4db289
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Unique SERDES interrupt names · e6f2f6b8
      Andrew Lunn authored
      
      
      Dynamically generate a unique SERDES interrupt name, based on the
      device name and the port the SERDES is for. For example:
      
       95:          3  mv88e6xxx-g2   9 Edge      mv88e6xxx-0.2:00-serdes-9
       96:          0  mv88e6xxx-g2  10 Edge      mv88e6xxx-0.2:00-serdes-10
      
      The 0.2:00 indicates the switch and -9 indicates port 9.
      
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6f2f6b8
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Unique IRQ name · 3095383a
      Andrew Lunn authored
      
      
      Dynamically generate a unique switch interrupt name, based on the
      device name.
      
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3095383a
    • Vinicius Costa Gomes's avatar
      igc: Use Start of Packet signal from PHY for timestamping · a299df35
      Vinicius Costa Gomes authored
      
      
      For better accuracy, i225 is able to do timestamping using the Start of
      Packet signal from the PHY.
      
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a299df35
    • Vinicius Costa Gomes's avatar
      igc: Add support for ethtool GET_TS_INFO command · 60dbede0
      Vinicius Costa Gomes authored
      
      
      This command allows igc to report what types of timestamping are
      supported. ptp4l uses this to detect if the hardware supports
      timestamping.
      
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      60dbede0
    • Vinicius Costa Gomes's avatar
      igc: Add support for TX timestamping · 2c344ae2
      Vinicius Costa Gomes authored
      
      
      This adds support for timestamping packets being transmitted.
      
      Based on the code from i210. The basic differences is that i225 has 4
      registers to store the transmit timestamps (i210 has one). Right now,
      we only support retrieving from one register, support for using the
      other registers will be added later.
      
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2c344ae2
    • Vinicius Costa Gomes's avatar
      igc: Add support for RX timestamping · 81b05520
      Vinicius Costa Gomes authored
      
      
      This adds support for timestamping received packets.
      
      It is based on the i210, as many features of i225 work the same way.
      The main difference from i210 is that i225 has support for choosing
      the timer register to use when timestamping packets. Right now, we
      only support using timer 0. The other difference is that i225 stores
      two timestamps in the receive descriptor, right now, we only retrieve
      one.
      
      Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      81b05520
    • David S. Miller's avatar
      Merge branch 'ethtool-allow-nesting-of-begin-and-complete-callbacks' · 50d31037
      David S. Miller authored
      
      
      Michal Kubecek says:
      
      ====================
      ethtool: allow nesting of begin() and complete() callbacks
      
      The ethtool ioctl interface used to guarantee that ethtool_ops callbacks
      were always called in a block between calls to ->begin() and ->complete()
      (if these are defined) and that this whole block was executed with RTNL
      lock held:
      
      	rtnl_lock();
      	ops->begin();
      	/* other ethtool_ops calls */
      	ops->complete();
      	rtnl_unlock();
      
      This prevented any nesting or crossing of the begin-complete blocks.
      However, this is no longer guaranteed even for ioctl interface as at least
      ethtool_phys_id() releases RTNL lock while waiting for a timer. With the
      introduction of netlink ethtool interface, the begin-complete pairs are
      naturally nested e.g. when a request triggers a netlink notification.
      
      Fortunately, only minority of networking drivers implements begin() and
      complete() callbacks and most of those that do, fall into three groups:
      
        - wrappers for pm_runtime_get_sync() and pm_runtime_put()
        - wrappers for clk_prepare_enable() and clk_disable_unprepare()
        - begin() checks netif_running() (fails if false), no complete()
      
      First two have their own refcounting, third is safe w.r.t. nesting of the
      blocks.
      
      Only three in-tree networking drivers need an update to deal with nesting
      of begin() and complete() calls: via-velocity and epic100 perform resume
      and suspend on their own and wil6210 completely serializes the calls using
      its own mutex (which would lead to a deadlock if a request request
      triggered a netlink notification). The series addresses these problems.
      
      changes between v1 and v2:
        - fix inverted condition in epic100 ethtool_begin() (thanks to Andrew
          Lunn)
      ====================
      
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50d31037
    • Michal Kubecek's avatar
      epic100: allow nesting of ethtool_ops begin() and complete() · 4ac0ac84
      Michal Kubecek authored
      
      
      Unlike most networking drivers using begin() and complete() ethtool_ops
      callbacks to resume a device which is down and suspend it again when done,
      epic100 does not use standard refcounted infrastructure but sets device
      sleep state directly.
      
      With the introduction of netlink ethtool interface, we may have nested
      begin-complete blocks so that inner complete() would put the device back to
      sleep for the rest of the outer block.
      
      To avoid rewriting an old and not very actively developed driver, just add
      a nesting counter and only perform resume and suspend on the outermost
      level.
      
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ac0ac84
    • Michal Kubecek's avatar
      via-velocity: allow nesting of ethtool_ops begin() and complete() · 71f711a4
      Michal Kubecek authored
      
      
      Unlike most networking drivers using begin() and complete() ethtool_ops
      callbacks to resume a device which is down and suspend it again when done,
      via-velocity does not use standard refcounted infrastructure but sets
      device sleep state directly.
      
      With the introduction of netlink ethtool interface, we may have nested
      begin-complete blocks so that inner complete() would put the device back to
      sleep for the rest of the outer block.
      
      To avoid rewriting an old and not very actively developed driver, just add
      a nesting counter and only perform resume and suspend on the outermost
      level.
      
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71f711a4
    • Michal Kubecek's avatar
      wil6210: get rid of begin() and complete() ethtool_ops · a69faa09
      Michal Kubecek authored
      
      
      The wil6210 driver locks a mutex in begin() ethtool_ops callback and
      unlocks it in complete() so that all ethtool requests are serialized. This
      is not going to work correctly with netlink interface; e.g. when ioctl
      triggers a netlink notification, netlink code would call begin() again
      while the mutex taken by ioctl code is still held by the same task.
      
      Let's get rid of the begin() and complete() callbacks and move the mutex
      locking into the remaining ethtool_ops handlers except get_drvinfo which
      only copies strings that are not changing so that there is no need for
      serialization.
      
      Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a69faa09
    • David Ahern's avatar
      fcnal-test: Fix vrf argument in local tcp tests · 17aa23ee
      David Ahern authored
      
      
      The recent MD5 tests added duplicate configuration in the default VRF.
      This change exposed a bug in existing tests designed to verify no
      connection when client and server are not in the same domain. The
      server should be running bound to the vrf device with the client run
      in the default VRF (the -2 option is meant for validating connection
      data). Fix the option for both tests.
      
      While technically this is a bug in previous releases, the tests are
      properly failing since the default VRF does not have any routing
      configuration so there really is no need to backport to prior releases.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      17aa23ee