1. 13 Apr, 2021 30 commits
  2. 12 Apr, 2021 10 commits
    • Adam Ford's avatar
      net: ethernet: ravb: Enable optional refclk · 8ef7adc6
      Adam Ford authored
      For devices that use a programmable clock for the AVB reference clock,
      the driver may need to enable them.  Add code to find the optional clock
      and enable it when available.
      Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ef7adc6
    • Adam Ford's avatar
      dt-bindings: net: renesas,etheravb: Add additional clocks · 6f43735b
      Adam Ford authored
      The AVB driver assumes there is an external crystal, but it could
      be clocked by other means.  In order to enable a programmable
      clock, it needs to be added to the clocks list and enabled in the
      driver.  Since there currently only one clock, there is no
      clock-names list either.
      
      Update bindings to add the additional optional clock, and explicitly
      name both of them.
      Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarSergei Shtylyov <sergei.shtylyov@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f43735b
    • David S. Miller's avatar
      Merge branch 'enetc-ptp' · d27139c5
      David S. Miller authored
      Yangbo Lu says:
      
      ====================
      enetc: support PTP Sync packet one-step timestamping
      
      This patch-set is to add support for PTP Sync packet one-step timestamping.
      Since ENETC single-step register has to be configured dynamically per
      packet for correctionField offeset and UDP checksum update, current
      one-step timestamping packet has to be sent only when the last one
      completes transmitting on hardware. So, on the TX, this patch handles
      one-step timestamping packet as below:
      
      - Trasmit packet immediately if no other one in transfer, or queue to
        skb queue if there is already one in transfer.
        The test_and_set_bit_lock() is used here to lock and check state.
      - Start a work when complete transfer on hardware, to release the bit
        lock and to send one skb in skb queue if has.
      
      Changes for v2:
      	- Rebased.
      	- Fixed issues from patchwork checks.
      	- netif_tx_lock for one-step timestamping packet sending.
      Changes for v3:
      	- Used system workqueue.
      	- Set bit lock when transmitted one-step packet, and scheduled
      	  work when completed. The worker cleared the bit lock, and
      	  transmitted one skb in skb queue if has, instead of a loop.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d27139c5
    • Yangbo Lu's avatar
      enetc: support PTP Sync packet one-step timestamping · 7294380c
      Yangbo Lu authored
      This patch is to add support for PTP Sync packet one-step timestamping.
      Since ENETC single-step register has to be configured dynamically per
      packet for correctionField offeset and UDP checksum update, current
      one-step timestamping packet has to be sent only when the last one
      completes transmitting on hardware. So, on the TX, this patch handles
      one-step timestamping packet as below:
      
      - Trasmit packet immediately if no other one in transfer, or queue to
        skb queue if there is already one in transfer.
        The test_and_set_bit_lock() is used here to lock and check state.
      - Start a work when complete transfer on hardware, to release the bit
        lock and to send one skb in skb queue if has.
      
      And the configuration for one-step timestamping on ENETC before
      transmitting is,
      
      - Set one-step timestamping flag in extension BD.
      - Write 30 bits current timestamp in tstamp field of extension BD.
      - Update PTP Sync packet originTimestamp field with current timestamp.
      - Configure single-step register for correctionField offeset and UDP
        checksum update.
      Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
      Reviewed-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7294380c
    • Yangbo Lu's avatar
      enetc: mark TX timestamp type per skb · f768e751
      Yangbo Lu authored
      Mark TX timestamp type per skb on skb->cb[0], instead of
      global variable for all skbs. This is a preparation for
      one step timestamp support.
      
      For one-step timestamping enablement, there will be both
      one-step and two-step PTP messages to transfer. And a skb
      queue is needed for one-step PTP messages making sure
      start to send current message only after the last one
      completed on hardware. (ENETC single-step register has to
      be dynamically configured per message.) So, marking TX
      timestamp type per skb is required.
      Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
      Reviewed-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f768e751
    • David S. Miller's avatar
      Merge branch 'ibmvnic-errors' · 8043edee
      David S. Miller authored
      Lijun Pan says:
      
      ====================
      ibmvnic: improve error printing
      
      Patch 1 prints reset reason as a string.
      Patch 2 prints adapter state as a string.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8043edee
    • Lijun Pan's avatar
      ibmvnic: print adapter state as a string · 0666ef7f
      Lijun Pan authored
      The adapter state can be added or deleted over different versions
      of the source code. Print a string instead of a number.
      Signed-off-by: default avatarLijun Pan <lijunp213@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0666ef7f
    • Lijun Pan's avatar
      ibmvnic: print reset reason as a string · caee7bf5
      Lijun Pan authored
      The reset reason can be added or deleted over different versions
      of the source code. Print a string instead of a number.
      Signed-off-by: default avatarLijun Pan <lijunp213@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      caee7bf5
    • Lijun Pan's avatar
      ibmvnic: clean up the remaining debugfs data structures · c82eaa40
      Lijun Pan authored
      Commit e704f043 ("ibmvnic: Remove debugfs support") did not
      clean up everything. Remove the remaining code.
      Signed-off-by: default avatarLijun Pan <lijunp213@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c82eaa40
    • David S. Miller's avatar
      Merge branch 'netns-sysctl-isolation' · 645b34a7
      David S. Miller authored
      Jonathon Reinhart says:
      
      ====================
      Ensuring net sysctl isolation
      
      This patchset is the result of an audit of /proc/sys/net to prove that
      it is safe to be mouted read-write in a container when a net namespace
      is in use. See [1].
      
      The first commit adds code to detect sysctls which are not netns-safe,
      and can "leak" changes to other net namespaces.
      
      My manual audit found, and the above feature confirmed, that there are
      two nf_conntrack sysctls which are in fact not netns-safe.
      
      I considered sending the latter to netfilter-devel, but I think it's
      better to have both together on net-next: Adding only the former causes
      undesirable warnings in the kernel log.
      
      [1]: https://github.com/opencontainers/runc/issues/2826
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      645b34a7