1. 03 10月, 2020 3 次提交
  2. 02 10月, 2020 14 次提交
    • A
      lib8390: Use netif_msg_init to initialize msg_enable bits · 360f8987
      Armin Wolf 提交于
      Use netif_msg_init() to process param settings
      and use only the proper initialized value of
      ei_local->msg_level for later processing;
      Signed-off-by: NArmin Wolf <W_Armin@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      360f8987
    • W
      net: phy: realtek: Modify 2.5G PHY name to RTL8226 · 7a333af6
      Willy Liu 提交于
      Realtek single-chip Ethernet PHY solutions can be separated as below:
      10M/100Mbps: RTL8201X
      1Gbps: RTL8211X
      2.5Gbps: RTL8226/RTL8221X
      RTL8226 is the first version for realtek that compatible 2.5Gbps single PHY.
      Since RTL8226 is single port only, realtek changes its name to RTL8221B from
      the second version.
      PHY ID for RTL8226 is 0x001cc800 and RTL8226B/RTL8221B is 0x001cc840.
      
      RTL8125 is not a single PHY solution, it integrates PHY/MAC/PCIE bus
      controller and embedded memory.
      Signed-off-by: NWilly Liu <willy.liu@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a333af6
    • J
      caif_virtio: Remove redundant initialization of variable err · f1638a4c
      Jing Xiangfeng 提交于
      After commit a8c7687b ("caif_virtio: Check that vringh_config is not
      null"), the variable err is being initialized with '-EINVAL' that is
      meaningless. So remove it.
      Signed-off-by: NJing Xiangfeng <jingxiangfeng@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1638a4c
    • Y
      net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c · 000fe268
      Ye Bin 提交于
      Fix follow warnings:
      [net/core/net-sysfs.c:1161]: (warning) %u in format string (no. 1)
      	requires 'unsigned int' but the argument type is 'int'.
      [net/core/net-sysfs.c:1162]: (warning) %u in format string (no. 1)
      	requires 'unsigned int' but the argument type is 'int'.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NYe Bin <yebin10@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      000fe268
    • Y
      pktgen: Fix inconsistent of format with argument type in pktgen.c · 32be425b
      Ye Bin 提交于
      Fix follow warnings:
      [net/core/pktgen.c:925]: (warning) %u in format string (no. 1)
      	requires 'unsigned int' but the argument type is 'signed int'.
      [net/core/pktgen.c:942]: (warning) %u in format string (no. 1)
      	requires 'unsigned int' but the argument type is 'signed int'.
      [net/core/pktgen.c:962]: (warning) %u in format string (no. 1)
      	requires 'unsigned int' but the argument type is 'signed int'.
      [net/core/pktgen.c:984]: (warning) %u in format string (no. 1)
      	requires 'unsigned int' but the argument type is 'signed int'.
      [net/core/pktgen.c:1149]: (warning) %d in format string (no. 1)
      	requires 'int' but the argument type is 'unsigned int'.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NYe Bin <yebin10@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32be425b
    • X
      drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values · 8306266c
      Xie He 提交于
      The fr_hard_header function is used to prepend the header to skbs before
      transmission. It is used in 3 situations:
      1) When a control packet is generated internally in this driver;
      2) When a user sends an skb on an Ethernet-emulating PVC device;
      3) When a user sends an skb on a normal PVC device.
      
      These 3 situations need to be handled differently by fr_hard_header.
      Different headers should be prepended to the skb in different situations.
      
      Currently fr_hard_header distinguishes these 3 situations using
      skb->protocol. For situation 1 and 2, a special skb->protocol value
      will be assigned before calling fr_hard_header, so that it can recognize
      these 2 situations. All skb->protocol values other than these special ones
      are treated by fr_hard_header as situation 3.
      
      However, it is possible that in situation 3, the user sends an skb with
      one of the special skb->protocol values. In this case, fr_hard_header
      would incorrectly treat it as situation 1 or 2.
      
      This patch tries to solve this issue by using skb->dev instead of
      skb->protocol to distinguish between these 3 situations. For situation
      1, skb->dev would be NULL; for situation 2, skb->dev->type would be
      ARPHRD_ETHER; and for situation 3, skb->dev->type would be ARPHRD_DLCI.
      
      This way fr_hard_header would be able to distinguish these 3 situations
      correctly regardless what skb->protocol value the user tries to use in
      situation 3.
      
      Cc: Krzysztof Halasa <khc@pm.waw.pl>
      Signed-off-by: NXie He <xie.he.0141@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8306266c
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · 23a1f682
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2020-10-01
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      We've added 90 non-merge commits during the last 8 day(s) which contain
      a total of 103 files changed, 7662 insertions(+), 1894 deletions(-).
      
      Note that once bpf(/net) tree gets merged into net-next, there will be a small
      merge conflict in tools/lib/bpf/btf.c between commit 12450081 ("libbpf: Fix
      native endian assumption when parsing BTF") from the bpf tree and the commit
      3289959b ("libbpf: Support BTF loading and raw data output in both endianness")
      from the bpf-next tree. Correct resolution would be to stick with bpf-next, it
      should look like:
      
        [...]
              /* check BTF magic */
              if (fread(&magic, 1, sizeof(magic), f) < sizeof(magic)) {
                      err = -EIO;
                      goto err_out;
              }
              if (magic != BTF_MAGIC && magic != bswap_16(BTF_MAGIC)) {
                      /* definitely not a raw BTF */
                      err = -EPROTO;
                      goto err_out;
              }
      
              /* get file size */
        [...]
      
      The main changes are:
      
      1) Add bpf_snprintf_btf() and bpf_seq_printf_btf() helpers to support displaying
         BTF-based kernel data structures out of BPF programs, from Alan Maguire.
      
      2) Speed up RCU tasks trace grace periods by a factor of 50 & fix a few race
         conditions exposed by it. It was discussed to take these via BPF and
         networking tree to get better testing exposure, from Paul E. McKenney.
      
      3) Support multi-attach for freplace programs, needed for incremental attachment
         of multiple XDP progs using libxdp dispatcher model, from Toke Høiland-Jørgensen.
      
      4) libbpf support for appending new BTF types at the end of BTF object, allowing
         intrusive changes of prog's BTF (useful for future linking), from Andrii Nakryiko.
      
      5) Several BPF helper improvements e.g. avoid atomic op in cookie generator and add
         a redirect helper into neighboring subsys, from Daniel Borkmann.
      
      6) Allow map updates on sockmaps from bpf_iter context in order to migrate sockmaps
         from one to another, from Lorenz Bauer.
      
      7) Fix 32 bit to 64 bit assignment from latest alu32 bounds tracking which caused
         a verifier issue due to type downgrade to scalar, from John Fastabend.
      
      8) Follow-up on tail-call support in BPF subprogs which optimizes x64 JIT prologue
         and epilogue sections, from Maciej Fijalkowski.
      
      9) Add an option to perf RB map to improve sharing of event entries by avoiding remove-
         on-close behavior. Also, add BPF_PROG_TEST_RUN for raw_tracepoint, from Song Liu.
      
      10) Fix a crash in AF_XDP's socket_release when memory allocation for UMEMs fails,
          from Magnus Karlsson.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23a1f682
    • D
      Merge branch 'net-ravb-Add-support-for-explicit-internal-clock-delay-c · 7c89d9d9
      David S. Miller 提交于
      onfiguration'
      
      Geert Uytterhoeven says:
      
      ====================
      net/ravb: Add support for explicit internal clock delay configuration
      
      Some Renesas EtherAVB variants support internal clock delay
      configuration, which can add larger delays than the delays that are
      typically supported by the PHY (using an "rgmii-*id" PHY mode, and/or
      "[rt]xc-skew-ps" properties).
      
      Historically, the EtherAVB driver configured these delays based on the
      "rgmii-*id" PHY mode.  This caused issues with PHY drivers that
      implement PHY internal delays properly[1].  Hence a backwards-compatible
      workaround was added by masking the PHY mode[2].
      
      This patch series implements the next step of the plan outlined in [3],
      and adds proper support for explicit configuration of the MAC internal
      clock delays using new "[rt]x-internal-delay-ps" properties.  If none of
      these properties is present, the driver falls back to the old handling.
      
      This can be considered the MAC counterpart of commit 9150069b
      ("dt-bindings: net: Add tx and rx internal delays"), which applies to
      the PHY.  Note that unlike commit 92252eec ("net: phy: Add a
      helper to return the index for of the internal delay"), no helpers are
      provided to parse the DT properties, as so far there is a single user
      only, which supports only zero or a single fixed value.  Of course such
      helpers can be added later, when the need arises, or when deemed useful
      otherwise.
      
      This series consists of 3 parts:
        1. DT binding updates documenting the new properties, for both the
           generic ethernet-controller and the EtherAVB-specific bindings,
        2. Conversion to json-schema of the Renesas EtherAVB DT bindings.
           Technically, the conversion is independent of all of the above.
           I included it in this series, as it shows how all sanity checks on
           "[rt]x-internal-delay-ps" values are implemented as DT binding
           checks,
        3. EtherAVB driver update implementing support for the new properties.
      
      Given Rob has provided his acks for the DT binding updates, all of this
      can be merged through net-next.
      
      Changes compared to v3[4]:
        - Add Reviewed-by,
        - Drop the DT updates, as they will be merged through renesas-devel and
          arm-soc, and have a hard dependency on this series.
      
      Changes compared to v2[5]:
        - Update recently added board DTS files,
        - Add Reviewed-by.
      
      Changes compared to v1[6]:
        - Added "[PATCH 1/7] dt-bindings: net: ethernet-controller: Add
          internal delay properties",
        - Replace "renesas,[rt]xc-delay-ps" by "[rt]x-internal-delay-ps",
        - Incorporated EtherAVB DT binding conversion to json-schema,
        - Add Reviewed-by.
      
      Impacted, tested:
        - Salvator-X(S) with R-Car H3 ES1.0 and ES2.0, M3-W, and M3-N.
      
      Not impacted, tested:
        - Ebisu with R-Car E3.
      
      Impacted, not tested:
        - Salvator-X(S) with other SoC variants,
        - ULCB with R-Car H3/M3-W/M3-N variants,
        - V3MSK and Eagle with R-Car V3M,
        - Draak with R-Car V3H,
        - HiHope RZ/G2[MN] with RZ/G2M or RZ/G2N,
        - Beacon EmbeddedWorks RZ/G2M Development Kit.
      
      To ease testing, I have pushed this series and the DT updates to the
      topic/ravb-internal-clock-delays-v4 branch of my renesas-drivers
      repository at
      git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.
      
      Thanks for applying!
      
      References:
        [1] Commit bcf3440c ("net: phy: micrel: add phy-mode support
            for the KSZ9031 PHY")
        [2] Commit 9b23203c ("ravb: Mask PHY mode to avoid inserting
            delays twice").
            https://lore.kernel.org/r/20200529122540.31368-1-geert+renesas@glider.be/
        [3] https://lore.kernel.org/r/CAMuHMdU+MR-2tr3-pH55G0GqPG9HwH3XUd=8HZxprFDMGQeWUw@mail.gmail.com/
        [4] https://lore.kernel.org/linux-devicetree/20200819134344.27813-1-geert+renesas@glider.be/
        [5] https://lore.kernel.org/linux-devicetree/20200706143529.18306-1-geert+renesas@glider.be/
        [6] https://lore.kernel.org/linux-devicetree/20200619191554.24942-1-geert+renesas@glider.be/
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c89d9d9
    • G
      ravb: Add support for explicit internal clock delay configuration · a6f51f2e
      Geert Uytterhoeven 提交于
      Some EtherAVB variants support internal clock delay configuration, which
      can add larger delays than the delays that are typically supported by
      the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps"
      properties).
      
      Historically, the EtherAVB driver configured these delays based on the
      "rgmii-*id" PHY mode.  This caused issues with PHY drivers that
      implement PHY internal delays properly[1].  Hence a backwards-compatible
      workaround was added by masking the PHY mode[2].
      
      Add proper support for explicit configuration of the MAC internal clock
      delays using the new "[rt]x-internal-delay-ps" properties.
      Fall back to the old handling if none of these properties is present.
      
      [1] Commit bcf3440c ("net: phy: micrel: add phy-mode support for
          the KSZ9031 PHY")
      [2] Commit 9b23203c ("ravb: Mask PHY mode to avoid inserting
          delays twice").
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6f51f2e
    • G
      ravb: Split delay handling in parsing and applying · ce19a9eb
      Geert Uytterhoeven 提交于
      Currently, full delay handling is done in both the probe and resume
      paths.  Split it in two parts, so the resume path doesn't have to redo
      the parsing part over and over again.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce19a9eb
    • G
      dt-bindings: net: renesas,etheravb: Convert to json-schema · d7adf633
      Geert Uytterhoeven 提交于
      Convert the Renesas Ethernet AVB (EthernetAVB-IF) Device Tree binding
      documentation to json-schema.
      
      Add missing properties.
      Update the example to match reality.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d7adf633
    • G
      dt-bindings: net: renesas,ravb: Document internal clock delay properties · 57197b66
      Geert Uytterhoeven 提交于
      Some EtherAVB variants support internal clock delay configuration, which
      can add larger delays than the delays that are typically supported by
      the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps"
      properties).
      
      Add properties for configuring the internal MAC delays.
      These properties are mandatory, even when specified as zero, to
      distinguish between old and new DTBs.
      
      Update the (bogus) example accordingly.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NSergei Shtylyov <sergei.shtylyov@gmail.com>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      57197b66
    • G
      dt-bindings: net: ethernet-controller: Add internal delay properties · 0024bad1
      Geert Uytterhoeven 提交于
      Internal Receive and Transmit Clock Delays are a common setting for
      RGMII capable devices.
      
      While these delays are typically applied by the PHY, some MACs support
      configuring internal clock delay settings, too.  Hence add standardized
      properties to configure this.
      
      This is the MAC counterpart of commit 9150069b ("dt-bindings:
      net: Add tx and rx internal delays"), which applies to the PHY.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0024bad1
    • D
      Merge tag 'mlx5-updates-2020-09-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 87d5034d
      David S. Miller 提交于
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2020-09-30
      
      Updates and cleanups for mlx5 driver:
      
      1) From Ariel, Dan Carpenter and Gostavo, Fixes to the previous
         mlx5 Connection track series.
      
      2) From Yevgeny, trivial cleanups for Software steering
      
      3) From Hamdan, Support for Flow source hint in software steering and
         E-Switch
      
      4) From Parav and Sunil, Small and trivial E-Switch updates and
         cleanups in preparation for mlx5 Sub-functions support
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      87d5034d
  3. 01 10月, 2020 23 次提交