1. 27 Jun, 2019 35 commits
  2. 26 Jun, 2019 5 commits
    • David S. Miller's avatar
      Merge branch 'macb-build-fixes' · 8b89d8da
      David S. Miller authored
      Palmer Dabbelt says:
      
      ====================
      net: macb: Fix compilation on systems without COMMON_CLK, v2
      
      Our patch to add support for the FU540-C000 broke compilation on at
      least powerpc allyesconfig, which was found as part of the linux-next
      build regression tests.  This must have somehow slipped through the
      cracks, as the patch has been reverted in linux-next for a while now.
      This patch applies on top of the offending commit, which is the only one
      I've even tried it on as I'm not sure how this subsystem makes it to
      Linus.
      
      This patch set fixes the issue by adding a dependency of COMMON_CLK to
      the MACB Kconfig entry, which avoids the build failure by disabling MACB
      on systems where it wouldn't compile.  All known users of MACB have
      COMMON_CLK, so this shouldn't cause any issues.  This is a significantly
      simpler approach than disabling just the FU540-C000 support.
      
      I've also included a second patch to indicate this is a driver for a
      Cadence device that was originally written by an engineer at Atmel.  The
      only relation is that I stumbled across it when writing the first patch.
      
      Changes since v1 <20190624061603.1704-1-palmer@sifive.com>:
      
      * Disable MACB on systems without COMMON_CLK, instead of just disabling
        the FU540-C000 support on these systems.
      * Update the commit message to reflect the driver was written by Atmel.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b89d8da
    • Palmer Dabbelt's avatar
      net: macb: Kconfig: Rename Atmel to Cadence · 302a7cad
      Palmer Dabbelt authored
      The help text makes it look like NET_VENDOR_CADENCE enables support for
      Atmel devices, when in reality it's a driver written by Atmel that
      supports Cadence devices.  This may confuse users that have this device
      on a non-Atmel SoC.
      
      The fix is just s/Atmel/Cadence/, but I did go and re-wrap the Kconfig
      help text as that change caused it to go over 80 characters.
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      302a7cad
    • Palmer Dabbelt's avatar
      net: macb: Kconfig: Make MACB depend on COMMON_CLK · c536a9aa
      Palmer Dabbelt authored
      commit c218ad55 ("macb: Add support for SiFive FU540-C000") added a
      dependency on the common clock framework to the macb driver, but didn't
      express that dependency in Kconfig.  As a result macb now fails to
      compile on systems without COMMON_CLK, which specifically causes a build
      failure on powerpc allyesconfig.
      
      This patch adds the dependency, which results in the macb driver no
      longer being selectable on systems without the common clock framework.
      All known systems that have this device already support the common clock
      framework, so this should not cause trouble for any uses.  Supporting
      both the FU540-C000 and systems without COMMON_CLK is quite ugly.
      
      I've build tested this on powerpc allyesconfig and RISC-V defconfig
      (which selects MACB), but I have not even booted the resulting kernels.
      
      Fixes: c218ad55 ("macb: Add support for SiFive FU540-C000")
      Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c536a9aa
    • Dave Taht's avatar
      Allow 0.0.0.0/8 as a valid address range · 96125bf9
      Dave Taht authored
      The longstanding prohibition against using 0.0.0.0/8 dates back
      to two issues with the early internet.
      
      There was an interoperability problem with BSD 4.2 in 1984, fixed in
      BSD 4.3 in 1986. BSD 4.2 has long since been retired.
      
      Secondly, addresses of the form 0.x.y.z were initially defined only as
      a source address in an ICMP datagram, indicating "node number x.y.z on
      this IPv4 network", by nodes that know their address on their local
      network, but do not yet know their network prefix, in RFC0792 (page
      19).  This usage of 0.x.y.z was later repealed in RFC1122 (section
      3.2.2.7), because the original ICMP-based mechanism for learning the
      network prefix was unworkable on many networks such as Ethernet (which
      have longer addresses that would not fit into the 24 "node number"
      bits).  Modern networks use reverse ARP (RFC0903) or BOOTP (RFC0951)
      or DHCP (RFC2131) to find their full 32-bit address and CIDR netmask
      (and other parameters such as default gateways). 0.x.y.z has had
      16,777,215 addresses in 0.0.0.0/8 space left unused and reserved for
      future use, since 1989.
      
      This patch allows for these 16m new IPv4 addresses to appear within
      a box or on the wire. Layer 2 switches don't care.
      
      0.0.0.0/32 is still prohibited, of course.
      Signed-off-by: default avatarDave Taht <dave.taht@gmail.com>
      Signed-off-by: default avatarJohn Gilmore <gnu@toad.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96125bf9
    • David Ahern's avatar
      rtnetlink: skip metrics loop for dst_default_metrics · c22a133a
      David Ahern authored
      dst_default_metrics has all of the metrics initialized to 0, so nothing
      will be added to the skb in rtnetlink_put_metrics. Avoid the loop if
      metrics is from dst_default_metrics.
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c22a133a