1. 25 7月, 2020 38 次提交
  2. 24 7月, 2020 2 次提交
    • D
      vrf: Handle CONFIG_SYSCTL not set · 1b6687e3
      David Ahern 提交于
      Randy reported compile failure when CONFIG_SYSCTL is not set/enabled:
      
      ERROR: modpost: "sysctl_vals" [drivers/net/vrf.ko] undefined!
      
      Fix by splitting out the sysctl init and cleanup into helpers that
      can be set to do nothing when CONFIG_SYSCTL is disabled. In addition,
      move vrf_strict_mode and vrf_strict_mode_change to above
      vrf_shared_table_handler (code move only) and wrap all of it
      in the ifdef CONFIG_SYSCTL.
      
      Update the strict mode tests to check for the existence of the
      /proc/sys entry.
      
      Fixes: 33306f1a ("vrf: add sysctl parameter for strict mode")
      Cc: Andrea Mayer <andrea.mayer@uniroma2.it>
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NDavid Ahern <dsahern@kernel.org>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b6687e3
    • P
      ice: add 1G SGMII PHY type · c2b35226
      Paul M Stillwell Jr 提交于
      There isn't a case for 1G SGMII in ice_get_media_type() so add
      the handling for it.
      
      Also handle the special case where some direct attach
      cables may report that they support 1G SGMII, but
      that is erroneous since SGMII is supposed to be a
      backplane media type (between a MAC and a PHY). If
      the driver doesn't handle this special case then a
      user could see the 'Port' in ethtool change from
      'Direct attach Copper' to 'Backplane' when they have
      forced the speed to 1G, but the cable hasn't changed.
      
      Lastly, change ice_aq_get_phy_caps() to save the
      module_type info if the function was called with
      ICE_AQC_REPORT_TOPO_CAP. This call uses the media
      information to populate the module_type. If no
      media is present then the values in module_type
      will be 0.
      Signed-off-by: NPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      c2b35226