1. 16 3月, 2017 5 次提交
  2. 10 3月, 2017 6 次提交
  3. 03 3月, 2017 1 次提交
  4. 25 2月, 2017 1 次提交
  5. 03 2月, 2017 1 次提交
    • A
      xgene_enet: remove bogus forward declarations · 1f3d6209
      Arnd Bergmann 提交于
      The device match tables for both the xgene_enet driver and its phy driver
      have forward declarations that declare an array without a length, leading
      to a clang warning when they are not followed by an actual defitinition:
      
      drivers/net/ethernet/apm/xgene/../../../phy/mdio-xgene.h:135:34: warning: tentative array definition assumed to have one element
      drivers/net/ethernet/apm/xgene/xgene_enet_main.c:33:36: warning: tentative array definition assumed to have one element
      
      The declarations for the mdio driver are even in a header file, so they
      cause duplicate definitions of the tables for each file that includes
      them.
      
      This removes all four forward declarations and moves the actual
      definitions up a little, so they are in front of their first user. For
      the OF match tables, this means having to remove the #ifdef around them,
      and passing the actual structure into of_match_device(). This has no
      effect on the generated object code though, as the of_match_device
      function has an empty stub that does not evaluate its argument, and
      the symbol gets dropped either way.
      
      Fixes: 43b3cf66 ("drivers: net: phy: xgene: Add MDIO driver")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f3d6209
  6. 31 1月, 2017 1 次提交
  7. 09 1月, 2017 2 次提交
  8. 09 12月, 2016 3 次提交
  9. 04 12月, 2016 8 次提交
  10. 02 11月, 2016 2 次提交
  11. 13 10月, 2016 1 次提交
    • J
      net: deprecate eth_change_mtu, remove usage · a52ad514
      Jarod Wilson 提交于
      With centralized MTU checking, there's nothing productive done by
      eth_change_mtu that isn't already done in dev_set_mtu, so mark it as
      deprecated and remove all usage of it in the kernel. All callers have been
      audited for calls to alloc_etherdev* or ether_setup directly, which means
      they all have a valid dev->min_mtu and dev->max_mtu. Now eth_change_mtu
      prints out a netdev_warn about being deprecated, for the benefit of
      out-of-tree drivers that might be utilizing it.
      
      Of note, dvb_net.c actually had dev->mtu = 4096, while using
      eth_change_mtu, meaning that if you ever tried changing it's mtu, you
      couldn't set it above 1500 anymore. It's now getting dev->max_mtu also set
      to 4096 to remedy that.
      
      v2: fix up lantiq_etop, missed breakage due to drive not compiling on x86
      
      CC: netdev@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a52ad514
  12. 12 10月, 2016 1 次提交
  13. 23 9月, 2016 1 次提交
  14. 13 9月, 2016 2 次提交
  15. 02 9月, 2016 1 次提交
    • A
      net: xgene: fix backward compatibility fix · ba3d0dda
      Arnd Bergmann 提交于
      A bugfix for backward compatibility handling introduced undefined
      behavior for the case that of_parse_phandle() does not return
      a valid entry, as "gcc -Wmaybe-unused" reports:
      
      drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_phy_connect':
      drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:776:6: error: 'phy_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_mdio_config':
      drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:776:6: error: 'phy_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      We can work around this by removing the check for zero "np", as
      of_phy_connect() will correctly handle a NULL argument so we fall
      back into the normal error handling case.
      
      Note that I had previously fixed another bug that resulted in the
      exact same warning, but this is a different problem that was
      introduced after my original fix.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 03377e38 ("drivers: net: xgene: Fix backward compatibility")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba3d0dda
  16. 29 8月, 2016 1 次提交
    • A
      net/xgene: fix error handling during reset · f9dc7074
      Arnd Bergmann 提交于
      The newly added reset logic uses helper functions for the MMIO that
      may fail. However, when the read operation fails, we end up writing
      back uninitialized data to the register, as gcc warns:
      
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c: In function 'xgene_enet_link_state':
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:213:2: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:209:6: note: 'data' was declared here
        u32 data;
      
      We already print a warning to the console log if that happens,
      the best alternative that I can see is skip the rest of the reset
      sequence if the register value cannot be read: Most likely the
      write would fail as well, and if it succeeded, worse things could
      happen.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 3eb7cb9d ("drivers: net: xgene: XFI PCS reset when link is down")
      Cc: Fushen Chen <fchen@apm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9dc7074
  17. 14 8月, 2016 3 次提交