1. 30 Aug, 2019 38 commits
  2. 29 Aug, 2019 2 commits
    • David S. Miller's avatar
      Merge branch 'net-hns3-add-some-cleanups-and-optimizations' · 73a1dd8c
      David S. Miller authored
      Huazhong Tan says:
      
      ====================
      net: hns3: add some cleanups and optimizations
      
      This patch-set includes cleanups, optimizations and bugfix for
      the HNS3 ethernet controller driver.
      
      [patch 01/12] adds code optimization for debugfs command "dump reg".
      
      [patch 02/12] fixes magic number issues.
      
      [patch 03/12] modifies some parameters about hclge_dbg_dump_tm_map().
      
      [patch 04/12] removes some unused parameters.
      
      [patch 05/12] refactors some logs to make them more readable.
      
      [patch 06/12] makes some resusable codes into functions.
      
      [patch 07/12] fixes some type errors.
      
      [patch 08/12] reduces the waiting time for per TQP reset.
      
      [patch 09/12] implements .process_hw_error for hns3 client.
      
      [patch 10/12] adds phy selftest for HNS3 driver.
      
      [patch 11/12] adds checking for reset interrupt status when reset fails.
      
      [patch 12/12] prevents SSU loopback when running ethtool -t.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      73a1dd8c
    • Yufeng Mo's avatar
      net: hns3: not allow SSU loopback while execute ethtool -t dev · dd2956ea
      Yufeng Mo authored
      The current loopback mode is to add 0x1F to the SMAC address
      as the DMAC address and enable the promiscuous mode.
      However, if the VF address is the same as the DMAC address,
      the loopback test fails.
      
      Loopback can be enabled in three places: SSU, MAC, and serdes.
      By default, SSU loopback is enabled, so if the SMAC and the DMAC
      are the same, the packets are looped back in the SSU. If SSU loopback
      is disabled, packets can reach MAC even if SMAC is the same as DMAC.
      
      Therefore, this patch disables the SSU loopback before the loopback
      test. In this way, the SMAC and DMAC can be the same, and the
      promiscuous mode does not need to be enabled. And this is not
      valid in version 0x20.
      
      This patch also uses a macro to replace 0x1F.
      
      Fixes: c39c4d98 ("net: hns3: Add mac loopback selftest support in hns3 driver")
      Signed-off-by: default avatarYufeng Mo <moyufeng@huawei.com>
      Reviewed-by: default avatarPeng Li <lipeng321@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dd2956ea