1. 21 Apr, 2021 33 commits
  2. 20 Apr, 2021 7 commits
    • Radu Pirea (NXP OSS)'s avatar
      phy: nxp-c45-tja11xx: fix phase offset calculation · 6b3a6310
      Radu Pirea (NXP OSS) authored
      Fix phase offset calculation.
      Signed-off-by: default avatarRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6b3a6310
    • Michael Walle's avatar
      net: enetc: automatically select IERB module · 1b8caefa
      Michael Walle authored
      Now that enetc supports flow control we have to make sure the settings in
      the IERB are correct. Therefore, we actually depend on the enetc-ierb
      module. Previously it was possible that this module was disabled while the
      enetc was enabled. Fix it by automatically select the enetc-ierb module.
      
      Fixes: e7d48e5f ("net: enetc: add a mini driver for the Integrated Endpoint Register Block")
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Acked-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b8caefa
    • Eric Dumazet's avatar
      virtio-net: restrict build_skb() use to some arches · f5d7872a
      Eric Dumazet authored
      build_skb() is supposed to be followed by
      skb_reserve(skb, NET_IP_ALIGN), so that IP headers are word-aligned.
      (Best practice is to reserve NET_IP_ALIGN+NET_SKB_PAD, but the NET_SKB_PAD
      part is only a performance optimization if tunnel encaps are added.)
      
      Unfortunately virtio_net has not provisioned this reserve.
      We can only use build_skb() for arches where NET_IP_ALIGN == 0
      
      We might refine this later, with enough testing.
      
      Fixes: fb32856b ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: virtualization@lists.linux-foundation.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5d7872a
    • Loic Poulain's avatar
      net: wwan: Fix bit ops double shift · b8c55ce2
      Loic Poulain authored
      bit operation helpers such as test_bit, clear_bit, etc take bit
      position as parameter and not value. Current usage causes double
      shift => BIT(BIT(0)). Fix that in wwan_core and mhi_wwan_ctrl.
      
      Fixes: 9a44c1cc ("net: Add a WWAN subsystem")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8c55ce2
    • David S. Miller's avatar
      Merge branch 'dsa-tag-override' · ebbcac3d
      David S. Miller authored
      Tobias Waldekranz says:
      
      ====================
      net: dsa: Allow default tag protocol to be overridden from DT
      
      This is a continuation of the work started in this patch:
      https://lore.kernel.org/netdev/20210323102326.3677940-1-tobias@waldekranz.com/
      
      In addition to the mv88e6xxx support to dynamically change the
      protocol, it is now possible to override the protocol from the device
      tree. This means that when a board vendor finds an incompatibility,
      they can specify a working protocol in the DT, and users will not have
      to worry about it.
      
      Some background information:
      
      In a system using an NXP T1023 SoC connected to a 6390X switch, we
      noticed that TO_CPU frames where not reaching the CPU. This only
      happened on hardware port 8. Looking at the DSA master interface
      (dpaa-ethernet) we could see that an Rx error counter was bumped at
      the same rate. The logs indicated a parser error.
      
      It just so happens that a TO_CPU coming in on device 0, port 8, will
      result in the first two bytes of the DSA tag being one of:
      
      00 40
      00 44
      00 46
      
      My guess was that since these values looked like 802.3 length fields,
      the controller's parser would signal an error if the frame length did
      not match what was in the header.
      
      This was later confirmed using two different workarounds provided by
      Vladimir. Unfortunately these either bypass or ignore the hardware
      parser and thus robs working combinations of the ability to do RSS and
      other nifty things. It was therefore decided to go with the option of
      a DT override.
      
      v1 -> v2:
        - Fail if the device does not support changing protocols instead of
          falling back to the default. (Andrew)
        - Only call change_tag_protocol on CPU ports. (Andrew/Vladimir)
        - Only allow changing the protocol on chips that have at least
          "undocumented" level of support for EDSA. (Andrew).
        - List the supported protocols in the binding documentation. I opted
          for only listing the protocols that I have tested. As more people
          test their drivers, they can add them. (Rob)
      
      v2 -> v3:
        - Rename "dsa,tag-protocol" -> "dsa-tag-protocol". (Rob)
        - Some cleanups to 4/5. (Vladimir)
        - Add a comment detailing how tree/driver agreement on the tag
          protocol is enforced. (Vladimir).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ebbcac3d
    • Tobias Waldekranz's avatar
      dt-bindings: net: dsa: Document dsa-tag-protocol property · eb78cace
      Tobias Waldekranz authored
      The 'dsa-tag-protocol' is used to force a switch tree to use a
      particular tag protocol, typically because the Ethernet controller
      that it is connected to is not compatible with the default one.
      Signed-off-by: default avatarTobias Waldekranz <tobias@waldekranz.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb78cace
    • Tobias Waldekranz's avatar
      net: dsa: Allow default tag protocol to be overridden from DT · deff7107
      Tobias Waldekranz authored
      Some combinations of tag protocols and Ethernet controllers are
      incompatible, and it is hard for the driver to keep track of these.
      
      Therefore, allow the device tree author (typically the board vendor)
      to inform the driver of this fact by selecting an alternate protocol
      that is known to work.
      Signed-off-by: default avatarTobias Waldekranz <tobias@waldekranz.com>
      Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      deff7107