1. 04 5月, 2019 1 次提交
    • J
      net: hns3: add support for multiple media type · 88d10bd6
      Jian Shen 提交于
      Previously, we can only identify copper and fiber type, the
      supported link modes of port information are always showing
      SR type. This patch adds support for multiple media types,
      include SR, LR CR, KR. Driver needs to query the media type
      from firmware periodicly, and updates the port information.
      
      The new port information looks like this:
      Settings for eth0:
              Supported ports: [ FIBRE ]
              Supported link modes:   25000baseCR/Full
                                      25000baseSR/Full
                                      1000baseX/Full
                                      10000baseCR/Full
                                      10000baseSR/Full
                                      10000baseLR/Full
              Supported pause frame use: Symmetric
              Supports auto-negotiation: No
              Supported FEC modes: None BaseR
              Advertised link modes:  Not reported
              Advertised pause frame use: No
              Advertised auto-negotiation: No
              Advertised FEC modes: Not reported
              Speed: 10000Mb/s
              Duplex: Full
              Port: FIBRE
              PHYAD: 0
              Transceiver: internal
              Auto-negotiation: off
              Current message level: 0x00000036 (54)
                                     probe link ifdown ifup
              Link detected: yes
      
      In order to be compatible with old firmware which only support
      sfp speed, we remained using the same query command, and kept
      the former logic.
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NPeng Li <lipeng321@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88d10bd6
  2. 20 4月, 2019 1 次提交
  3. 05 4月, 2019 2 次提交
  4. 25 2月, 2019 1 次提交
  5. 22 2月, 2019 1 次提交
  6. 31 1月, 2019 2 次提交
  7. 27 1月, 2019 1 次提交
  8. 24 1月, 2019 1 次提交
  9. 07 12月, 2018 1 次提交
  10. 08 11月, 2018 1 次提交
  11. 13 10月, 2018 1 次提交
  12. 11 10月, 2018 2 次提交
  13. 02 10月, 2018 2 次提交
  14. 30 9月, 2018 1 次提交
    • D
      hns3: Fix the build. · d4017665
      David S. Miller 提交于
      drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c: In function ‘hns3_self_test’:
      drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c:278:15: error: ‘HNS3_SELF_TEST_TYPE_NUM’ undeclared (first use in this function); did you mean ‘HNS3_SELF_TEST_TPYE_NUM’?
        int st_param[HNS3_SELF_TEST_TYPE_NUM][2];
                     ^~~~~~~~~~~~~~~~~~~~~~~
                     HNS3_SELF_TEST_TPYE_NUM
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4017665
  15. 29 9月, 2018 3 次提交
  16. 22 9月, 2018 3 次提交
  17. 20 9月, 2018 1 次提交
  18. 04 9月, 2018 5 次提交
  19. 15 8月, 2018 1 次提交
  20. 21 7月, 2018 1 次提交
  21. 07 7月, 2018 1 次提交
    • Y
      net: hns3: Fix warning bug when doing lp selftest · d7099d15
      Yunsheng Lin 提交于
      The napi_alloc_skb is excepted to be called under the
      non-preemptible code path when it is called by hns3_clean_rx_ring
      during loopback selftest, otherwise the below warning will be
      logged:
      
      [   92.420780] BUG: using smp_processor_id() in preemptible
      [00000000] code: ethtool/1873
      <SNIP>
      [   92.463202]  check_preemption_disabled+0xf8/0x100
      [   92.467893]  debug_smp_processor_id+0x1c/0x28
      [   92.472239]  __napi_alloc_skb+0x30/0x130
      [   92.476158]  hns3_clean_rx_ring+0x118/0x5f0 [hns3]
      [   92.480941]  hns3_self_test+0x32c/0x4d0 [hns3]
      [   92.485375]  ethtool_self_test+0xdc/0x1e8
      [   92.489372]  dev_ethtool+0x1020/0x1da8
      [   92.493109]  dev_ioctl+0x188/0x3a0
      [   92.496499]  sock_do_ioctl+0xf4/0x208
      [   92.500148]  sock_ioctl+0x228/0x3e8
      [   92.503626]  do_vfs_ioctl+0xc4/0x880
      [   92.507189]  SyS_ioctl+0x94/0xa8
      [   92.510404]  el0_svc_naked+0x30/0x34
      
      This patch fix it by disabling preemption when calling
      hns3_clean_rx_ring during loopback selftest.
      
      Fixes: c39c4d98 ("net: hns3: Add mac loopback selftest support in hns3 driver")
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NPeng Li <lipeng321@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d7099d15
  22. 02 6月, 2018 1 次提交
  23. 29 5月, 2018 1 次提交
  24. 11 5月, 2018 1 次提交
  25. 27 3月, 2018 2 次提交
  26. 23 3月, 2018 2 次提交