1. 16 May, 2018 7 commits
  2. 15 May, 2018 21 commits
  3. 14 May, 2018 12 commits
    • Arjun Vynipadath's avatar
      cxgb4: do not fail vf instatiation in slave mode · 7cfac881
      Arjun Vynipadath authored
      We no longer require a check for cxgb4 to be MASTER
      when configuring SRIOV, It was required when we had
      module parameter to instantiate vf.
      Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
      Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cfac881
    • Petr Machata's avatar
      mlxsw: spectrum_span: Support LAG under mirror-to-gretap · 55c0211d
      Petr Machata authored
      When resolving a path that the packet will take after being encapsulated
      in mirror-to-gretap scenarios, one of the devices en route could be a
      LAG. In that case, mirror to first up slave that corresponds to a front
      panel port.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55c0211d
    • Hernán Gonzalez's avatar
      net: ethernet: ti: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) · bde4c563
      Hernán Gonzalez authored
      Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).
      
      drivers/net/ethernet/ti/cpts.c:567:9-16: WARNING: ERR_CAST can be used with cpts->refclk
      Generated by: scripts/coccinelle/api/err_cast.cocci
      Signed-off-by: default avatarHernán Gonzalez <hernan@vanguardiasur.com.ar>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bde4c563
    • Marcelo Ricardo Leitner's avatar
      sched: cls: enable verbose logging · 81c7288b
      Marcelo Ricardo Leitner authored
      Currently, when the rule is not to be exclusively executed by the
      hardware, extack is not passed along and offloading failures don't
      get logged. The idea was that hardware failures are okay because the
      rule will get executed in software then and this way it doesn't confuse
      unware users.
      
      But this is not helpful in case one needs to understand why a certain
      rule failed to get offloaded. Considering it may have been a temporary
      failure, like resources exceeded or so, reproducing it later and knowing
      that it is triggering the same reason may be challenging.
      
      The ultimate goal is to improve Open vSwitch debuggability when using
      flower offloading.
      
      This patch adds a new flag to enable verbose logging. With the flag set,
      extack will be passed to the driver, which will be able to log the
      error. As the operation itself probably won't fail (not because of this,
      at least), current iproute will already log it as a Warning.
      
      The flag is generic, so it can be reused later. No need to restrict it
      just for HW offloading. The command line will follow the syntax that
      tc-ebpf already uses, tc ... [ verbose ] ... , and extend its meaning.
      
      For example:
      # ./tc qdisc add dev p7p1 ingress
      # ./tc filter add dev p7p1 parent ffff: protocol ip prio 1 \
      	flower verbose \
      	src_mac ed:13:db:00:00:00 dst_mac 01:80:c2:00:00:d0 \
      	src_ip 56.0.0.0 dst_ip 55.0.0.0 action drop
      Warning: TC offload is disabled on net device.
      # echo $?
      0
      # ./tc filter add dev p7p1 parent ffff: protocol ip prio 1 \
      	flower \
      	src_mac ff:13:db:00:00:00 dst_mac 01:80:c2:00:00:d0 \
      	src_ip 56.0.0.0 dst_ip 55.0.0.0 action drop
      # echo $?
      0
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81c7288b
    • David S. Miller's avatar
      Merge branch 'stmmac-dwmac-sun8i-Support-R40' · 4def4783
      David S. Miller authored
      Chen-Yu Tsai says:
      
      ====================
      net: stmmac: dwmac-sun8i: Support R40
      
      This is a resend of the patches for net-next split out from my R40
      Ethernet support v2 series, as requested by David Miller. The arm-soc
      bits will follow, once I rework the A64 system controller compatible.
      
      Patches 1, 2, and 3 clean up the dwmac-sun8i binding.
      
      Patch 4 adds device tree binding for Allwinner R40's Ethernet
      controller.
      
      Patch 5 converts regmap access of the syscon region in the dwmac-sun8i
      driver to regmap_field, in anticipation of different field widths on
      the R40.
      
      Patch 6 introduces custom plumbing in the dwmac-sun8i driver to fetch
      a regmap from another device, by looking up said device via a phandle,
      then getting the regmap associated with that device.
      
      Patch 7 adds support for different or absent TX/RX delay chain ranges
      to the dwmac-sun8i driver.
      
      Patch 8 adds support for the R40's ethernet controller.
      
      Excerpt from original cover letter:
      
      Changes since v1:
      
        - Default to fetching regmap from device pointed to by syscon phandle,
          and falling back to syscon API if that fails.
      
        - Dropped .syscon_from_dev field in device data as a result of the
          previous change.
      
        - Added a large comment block explaining the first change.
      
        - Simplified description of syscon property in sun8i-dwmac binding.
      
        - Regmap now only exposes the EMAC/GMAC register, but retains the
          offset within its address space.
      
        - Added patches for A64, which reuse the same sun8i-dwmac changes.
      
      This series adds support for the DWMAC based Ethernet controller found
      on the Allwinner R40 SoC. The controller is either a DWMAC clone or
      DWMAC core with its registers rearranged. This is already supported by
      the dwmac-sun8i driver. The glue layer control registers, unlike other
      sun8i family SoCs, is not in the system controller region, but in the
      clock control unit, like with the older A20 and A31 SoCs.
      
      While we reuse the bindings for dwmac-sun8i using a syscon phandle
      reference, we need some custom plumbing for the clock driver to export
      a regmap that only allows access to the GMAC register to the dwmac-sun8i
      driver. An alternative would be to allow drivers to register custom
      syscon devices with their own regmap and locking.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4def4783
    • Chen-Yu Tsai's avatar
      net: stmmac: dwmac-sun8i: Add support for GMAC on Allwinner R40 SoC · 9bf5085a
      Chen-Yu Tsai authored
      The Allwinner R40 SoC has the EMAC controller supported by dwmac-sun8i.
      It is named "GMAC", while EMAC refers to the 10/100 Mbps Ethernet
      controller supported by sun4i-emac. The controller is the same, but
      the R40 has the glue layer controls in the clock control unit (CCU),
      with a reduced RX delay chain, and no TX delay chain.
      
      This patch adds support for it using the framework laid out by previous
      patches to map the differences.
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9bf5085a
    • Chen-Yu Tsai's avatar
      net: stmmac: dwmac-sun8i: Support different ranges for TX/RX delay chains · 7b270b72
      Chen-Yu Tsai authored
      On the R40 SoC, the RX delay chain only has a range of 0~7 (hundred
      picoseconds), instead of 0~31. Also the TX delay chain is completely
      absent.
      
      This patch adds support for different ranges by adding per-compatible
      maximum values in the variant data. A maximum of 0 indicates that the
      delay chain is not supported or absent.
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b270b72
    • Chen-Yu Tsai's avatar
      net: stmmac: dwmac-sun8i: Allow getting syscon regmap from external device · 49a06cae
      Chen-Yu Tsai authored
      On the Allwinner R40 SoC, the "GMAC clock" register is in the CCU
      address space. Using a standard syscon to access it provides no
      coordination with the CCU driver for register access. Neither does
      it prevent this and other drivers from accessing other, maybe critical,
      clock control registers. On other SoCs, the register is in the "system
      control" address space, which might also contain controls for mapping
      SRAM to devices or the CPU. This hardware has the same issues.
      
      Instead, for these types of setups, we let the device containing the
      control register create a regmap tied to it. We can then get the device
      from the existing syscon phandle, and retrieve the regmap with
      dev_get_regmap().
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49a06cae
    • Chen-Yu Tsai's avatar
      net: stmmac: dwmac-sun8i: Use regmap_field for syscon register access · 25ae15fb
      Chen-Yu Tsai authored
      On the Allwinner R40, the "GMAC clock" register is located in the CCU
      block, at a different register address than the other SoCs that have
      it in the "system control" block.
      
      This patch converts the use of regmap to regmap_field for mapping and
      accessing the syscon register, so we can have the register address in
      the variants data, and not in the actual register manipulation code.
      
      This patch only converts regmap_read() and regmap_write() calls to
      regmap_field_read() and regmap_field_write() calls. There are some
      places where it might make sense to switch to regmap_field_update_bits(),
      but this is not done here to keep the patch simple.
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25ae15fb
    • Chen-Yu Tsai's avatar
      dt-bindings: net: dwmac-sun8i: Add binding for GMAC on Allwinner R40 SoC · eef8811d
      Chen-Yu Tsai authored
      The Allwinner R40 SoC has the EMAC controller supported by dwmac-sun8i.
      It is named "GMAC", while EMAC refers to the 10/100 Mbps Ethernet
      controller supported by sun4i-emac. The controller is the same, but
      the R40 has the glue layer controls in the clock control unit (CCU),
      with a reduced RX delay chain, and no TX delay chain.
      
      This patch adds the R40 specific bits to the dwmac-sun8i binding.
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eef8811d
    • Chen-Yu Tsai's avatar
      dt-bindings: net: dwmac-sun8i: simplify description of syscon property · a6fe692e
      Chen-Yu Tsai authored
      The syscon property is used to point to the device that holds the glue
      layer control register known as the "EMAC (or GMAC) clock register".
      
      We do not need to explicitly list what compatible strings are needed, as
      this information is readily available in the user manuals. Also the
      "syscon" device type is more of an implementation detail. There are many
      ways to access a register not in a device's address range, the syscon
      interface being the most generic and unrestricted one.
      
      Simplify the description so that it says what it is supposed to
      describe.
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6fe692e
    • Chen-Yu Tsai's avatar
      dt-bindings: net: dwmac-sun8i: Sort syscon compatibles by alphabetical order · 9ed3fec3
      Chen-Yu Tsai authored
      The A83T syscon compatible was appended to the syscon compatibles list,
      instead of inserted in to preserve the ordering.
      
      Move it to the proper place to keep the list sorted.
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ed3fec3