1. 12 12月, 2022 3 次提交
  2. 09 12月, 2022 8 次提交
    • O
      !321 net: hns3: fix the HCLGE_OPC_WOL_CFG opcode id for wol and fix the... · 4741bc65
      openeuler-ci-bot 提交于
      !321 net: hns3: fix the HCLGE_OPC_WOL_CFG opcode id for wol and fix the incorrect way to obtain parameters.
      
      Merge Pull Request from: @svishen 
       
      (1)The driver should use the supported parameter got from firmware, not from user, to validate the wol mode.
      (2)fix the HCLGE_OPC_WOL_CFG opcode id for wol.
      
      issue:
      https://gitee.com/openeuler/kernel/issues/I65FSF 
       
      Link:https://gitee.com/openeuler/kernel/pulls/321 
      Reviewed-by: Yue Haibing <yuehaibing@huawei.com> 
      Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> 
      Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> 
      4741bc65
    • H
      net: hns3: fix the HCLGE_OPC_WOL_CFG opcode id for wol · 987f422a
      Hao Lan 提交于
      driver inclusion
      category: bugfix
      bugzilla: https://gitee.com/openeuler/kernel/issues/I65FSF
      CVE: NA
      
      ----------------------------------------------------------------------
      
      Fix the HCLGE_OPC_WOL_CFG opcode id for wol.
      
      Fixes: c3c5f044 ("net: hns3: support wake on lan configuration and query")
      Signed-off-by: NHao Lan <lanhao@huawei.com>
      Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
      987f422a
    • H
      net: hns3: fix getting supported parameter from driver in hclge_set_wol · c92b8f62
      Hao Lan 提交于
      driver inclusion
      category: bugfix
      bugzilla: https://gitee.com/openeuler/kernel/issues/I65FSF
      CVE: NA
      
      ----------------------------------------------------------------------
      
      The driver should use the supported parameter got from firmware,
      not from user,to validate the wol mode.
      
      Fixes: c3c5f044 ("net: hns3: support wake on lan configuration and query")
      Signed-off-by: NHao Lan <lanhao@huawei.com>
      Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
      c92b8f62
    • O
      !318 net: hns3: This series bugfix for the HNS3 ethernet driver. · 20ca80a7
      openeuler-ci-bot 提交于
      Merge Pull Request from: @svishen 
       
      This series includes some bugfix for the HNS3 ethernet driver.
      Patch 1# fix incorrect hw rss hash type of rx packet.
      Fixes: 79664077 ("net: hns3: support RXD advanced layout")
      Fixes: 232fc64b ("net: hns3: Add HW RSS hash information to RX skb")
      Fixes: ea485867 ("net: hns3: handle the BD info on the last BD of the packet")
      
      Patch 2# fix return value check bug of rx copybreak.
      Fixes: e74a726d ("net: hns3: refactor hns3_nic_reuse_page()")
      Fixes: 99f6b5fb ("net: hns3: use bounce buffer when rx page can not be reused")
      
      Patch 3# net: hns3: fix setting incorrect phy link ksettings
      for firmware in resetting process
      Fixes: f5f2b3e4 ("net: hns3: add support for imp-controlled PHYs")
      Fixes: c5ef83cb ("net: hns3: fix for phy_addr error in hclge_mac_mdio_config")
      Fixes: 2312e050 ("net: hns3: Fix for deadlock problem occurring when unregistering ae_algo")
      
      
      issue:
      https://gitee.com/openeuler/kernel/issues/I65DT5
      
      
      Test:
      before
      ```
      [root@localhost bin]# ethtool --reset enp53s0f0 all
      ETHTOOL_RESET 0xffffffff
      [150074.537297][T753377] hns3 0000:35:00.0 enp53s0f0: Setting reset type 6
      [150074.539476][T753377] hns3 0000:35:00.0: received reset event, reset type is 6
      Components reset:     0xffffffff[150074.542900][T753350] hns3 0000:35:00.0: global reset requested
      
      [150074.546063][    C3] hns3 0000:35:00.0: global reset interrupt
      [150074.548914][    C3] hns3 0000:35:00.1: global reset interrupt
      [150074.552496][T753303] hns3 0000:35:00.1 enp53s0f1: link down
      [root@localhost bin]# [150074.665230][T753303] hns3 0000:35:00.1: prepare wait ok
      [150074.850640][T753350] hns3 0000:35:00.0: cleaned 0, need to clean 1
      [150074.854640][T753350] hns3 0000:35:00.0: get link status cmd failed -52
      [150074.857504][T753350] hns3 0000:35:00.0: failed to get phy link ksetting, ret = -16.
      [150074.875240][T753350] hns3 0000:35:00.0 enp53s0f0: link down
      [150074.985282][T753350] hns3 0000:35:00.0: prepare wait ok
      [150075.093602][T753350] hns3 0000:35:00.0: In reset process RoCE client uninit.
      [150075.101975][T753303] hns3 0000:35:00.1: In reset process RoCE client uninit.
      [150075.436311][T753303] hns3 0000:35:00.1: Func clear success after reset.
      [150075.438800][T753303] hns3 0000:35:00.1: Func clear success after reset.
      [150075.441592][T753303] hns3 0000:35:00.1: Func clear success after reset.
      [150075.443786][T753303] hns3 0000:35:00.1: Func clear success after reset.
      [150075.446365][T753303] hns3 0000:35:00.1: Func clear success after reset.
      [150075.447419][T753350] hns3 0000:35:00.0: Func clear success after reset.
      [150075.451091][T753350] hns3 0000:35:00.0: Func clear success after reset.
      [150075.453474][T753350] hns3 0000:35:00.0: Func clear success after reset.
      [150075.455644][T753350] hns3 0000:35:00.0: Func clear success after reset.
      [150075.458244][T753350] hns3 0000:35:00.0: Func clear success after reset.
      [150076.100055][T753303] hns3 0000:35:00.1: The firmware version is 3.10.3.3
      [150076.176640][T753303] hns3 0000:35:00.1: failed to set phy link ksettings, ret = -22.
      [150076.180219][T753303] hns3 0000:35:00.1: failed to init tp port, ret = -22
      [150076.184130][T753303] hns3 0000:35:00.1: re-schedule reset task(1)
      [150076.331566][T753350] hns3 0000:35:00.0: The firmware version is 3.10.3.3
      [150076.389714][T753350] hns3 0000:35:00.0: failed to set phy link ksettings, ret = -22.
      [150076.392443][T753350] hns3 0000:35:00.0: failed to init tp port, ret = -22
      [150076.395624][T753350] hns3 0000:35:00.0: re-schedule reset task(1)
      [150076.505410][T753350] hns3 0000:35:00.0: prepare wait ok
      [150076.505447][T753303] hns3 0000:35:00.1: prepare wait ok
      [150076.505595][T753303] hns3 0000:35:00.1: In reset process RoCE client uninit.
      [150076.507203][T753350] hns3 0000:35:00.0: In reset process RoCE client uninit.
      [150076.613321][T753303] hns3 0000:35:00.1 enp53s0f1: already uninitialized
      [150076.616410][T753303] hns3 0000:35:00.1: The firmware version is 3.10.3.3
      [150076.672797][T753303] hns3 0000:35:00.1: failed to set phy link ksettings, ret = -22.
      [150076.675727][T753303] hns3 0000:35:00.1: failed to init tp port, ret = -22
      [150076.679115][T753303] hns3 0000:35:00.1: re-schedule reset task(2)
      [150076.680281][T753350] hns3 0000:35:00.0 enp53s0f0: already uninitialized
      [150076.685248][T753350] hns3 0000:35:00.0: The firmware version is 3.10.3.3
      [150076.741248][T753350] hns3 0000:35:00.0: failed to set phy link ksettings, ret = -22.
      [150076.743891][T753350] hns3 0000:35:00.0: failed to init tp port, ret = -22
      [150076.746731][T753350] hns3 0000:35:00.0: re-schedule reset task(2)
      [150076.853335][T753303] hns3 0000:35:00.1: prepare wait ok
      [150076.855171][T753303] hns3 0000:35:00.1: In reset process RoCE client uninit.
      [150076.857620][T753350] hns3 0000:35:00.0: prepare wait ok
      [150076.857773][T753350] hns3 0000:35:00.0: In reset process RoCE client uninit.
      [150076.965700][T753303] hns3 0000:35:00.1 enp53s0f1: already uninitialized
      [150076.969398][T753303] hns3 0000:35:00.1: The firmware version is 3.10.3.3
      [150077.028455][T753303] hns3 0000:35:00.1: failed to set phy link ksettings, ret = -22.
      [150077.031628][T753303] hns3 0000:35:00.1: failed to init tp port, ret = -22
      [150077.034743][T753303] hns3 0000:35:00.1: re-schedule reset task(3)
      [150077.034959][T753350] hns3 0000:35:00.0 enp53s0f0: already uninitialized
      [150077.040503][T753350] hns3 0000:35:00.0: The firmware version is 3.10.3.3
      [150077.097388][T753350] hns3 0000:35:00.0: failed to set phy link ksettings, ret = -22.
      [150077.099911][T753350] hns3 0000:35:00.0: failed to init tp port, ret = -22
      [150077.102682][T753350] hns3 0000:35:00.0: re-schedule reset task(3)
      [150077.209423][T753303] hns3 0000:35:00.1: prepare wait ok
      [150077.211246][T753303] hns3 0000:35:00.1: In reset process RoCE client uninit.
      [150077.213324][T753350] hns3 0000:35:00.0: prepare wait ok
      [150077.213405][T753350] hns3 0000:35:00.0: In reset process RoCE client uninit.
      [150077.321889][T753350] hns3 0000:35:00.0 enp53s0f0: already uninitialized
      [150077.326240][T753350] hns3 0000:35:00.0: The firmware version is 3.10.3.3
      [150077.380433][T753350] hns3 0000:35:00.0: failed to set phy link ksettings, ret = -22.
      [150077.383371][T753350] hns3 0000:35:00.0: failed to init tp port, ret = -22
      [150077.386465][T753350] hns3 0000:35:00.0: re-schedule reset task(4)
      [150077.386647][T753303] hns3 0000:35:00.1 enp53s0f1: already uninitialized
      [150077.391998][T753303] hns3 0000:35:00.1: The firmware version is 3.10.3.3
      [150077.448488][T753303] hns3 0000:35:00.1: failed to set phy link ksettings, ret = -22.
      [150077.451611][T753303] hns3 0000:35:00.1: failed to init tp port, ret = -22
      [150077.454382][T753303] hns3 0000:35:00.1: re-schedule reset task(4)
      [150077.561306][T753303] hns3 0000:35:00.1: prepare wait ok
      [150077.561349][T753350] hns3 0000:35:00.0: prepare wait ok
      [150077.561519][T753350] hns3 0000:35:00.0: In reset process RoCE client uninit.
      [150077.563110][T753303] hns3 0000:35:00.1: In reset process RoCE client uninit.
      [150077.670158][T753350] hns3 0000:35:00.0 enp53s0f0: already uninitialized
      [150077.674054][T753350] hns3 0000:35:00.0: The firmware version is 3.10.3.3
      [150077.728474][T753350] hns3 0000:35:00.0: failed to set phy link ksettings, ret = -22.
      [150077.731156][T753350] hns3 0000:35:00.0: failed to init tp port, ret = -22
      [150077.733575][T753350] hns3 0000:35:00.0: re-schedule reset task(5)
      [150077.733778][T753303] hns3 0000:35:00.1 enp53s0f1: already uninitialized
      [150077.738889][T753303] hns3 0000:35:00.1: The firmware version is 3.10.3.3
      [150077.792638][T753303] hns3 0000:35:00.1: failed to set phy link ksettings, ret = -22.
      [150077.795669][T753303] hns3 0000:35:00.1: failed to init tp port, ret = -22
      [150077.798354][T753303] hns3 0000:35:00.1: re-schedule reset task(5)
      [150077.905835][T753350] hns3 0000:35:00.0: prepare wait ok
      [150077.907645][T753350] hns3 0000:35:00.0: In reset process RoCE client uninit.
      [150077.909440][T753303] hns3 0000:35:00.1: prepare wait ok
      [150077.911198][T753303] hns3 0000:35:00.1: In reset process RoCE client uninit.
      [150078.018590][T753350] hns3 0000:35:00.0 enp53s0f0: already uninitialized
      [150078.022734][T753350] hns3 0000:35:00.0: The firmware version is 3.10.3.3
      [150078.076269][T753350] hns3 0000:35:00.0: failed to set phy link ksettings, ret = -22.
      [150078.079143][T753350] hns3 0000:35:00.0: failed to init tp port, ret = -22
      [150078.081812][T753350] hns3 0000:35:00.0: Reset fail!
      [150078.081957][T753303] hns3 0000:35:00.1 enp53s0f1: already uninitialized
      [150078.083730][T753350] hns3 0000:35:00.0: dump reset info:
      [150078.083730][T753350] PF reset count: 0
      [150078.083730][T753350] FLR reset count: 0
      [150078.083730][T753350] GLOBAL reset count: 1
      [150078.083730][T753350] IMP reset count: 0
      [150078.083730][T753350] reset done count: 0
      [150078.083730][T753350] HW reset done count: 6
      [150078.083730][T753350] reset count: 6
      [150078.083730][T753350] reset fail count: 5
      [150078.083730][T753350] vector0 interrupt enable status: 0x1
      [150078.083730][T753350] reset interrupt source: 0x0
      [150078.083730][T753350] reset interrupt status: 0x0
      [150078.083730][T753350] RAS interrupt status: 0x0
      [150078.083730][T753350] hardware reset status: 0x0
      [150078.083730][T753350] handshake status: 0x10080
      [150078.083730][T753350] function reset status: 0x0
      [150078.083730][T753350] hdev state: 0x802b2
      [150078.086765][T753303] hns3 0000:35:00.1: The firmware version is 3.10.3.3
      [150078.160671][T753303] hns3 0000:35:00.1: failed to set phy link ksettings, ret = -22.
      [150078.163837][T753303] hns3 0000:35:00.1: failed to init tp port, ret = -22
      [150078.166346][T753303] hns3 0000:35:00.1: Reset fail!
      [150078.168266][T753303] hns3 0000:35:00.1: dump reset info:
      [150078.168266][T753303] PF reset count: 0
      [150078.168266][T753303] FLR reset count: 0
      [150078.168266][T753303] GLOBAL reset count: 1
      [150078.168266][T753303] IMP reset count: 0
      [150078.168266][T753303] reset done count: 0
      [150078.168266][T753303] HW reset done count: 6
      [150078.168266][T753303] reset count: 6
      [150078.168266][T753303] reset fail count: 5
      [150078.168266][T753303] vector0 interrupt enable status: 0x1
      [150078.168266][T753303] reset interrupt source: 0x0
      [150078.168266][T753303] reset interrupt status: 0x0
      [150078.168266][T753303] RAS interrupt status: 0x0
      [150078.168266][T753303] hardware reset status: 0x0
      [150078.168266][T753303] handshake status: 0x10080
      [150078.168266][T753303] function reset status: 0x0
      [150078.168266][T753303] hdev state: 0x802b2
      
      [root@localhost bin]# ip a
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
          inet6 ::1/128 scope host
             valid_lft forever preferred_lft forever
      2: enp65s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
          link/ether e0:00:84:56:4e:38 brd ff:ff:ff:ff:ff:ff
          inet 192.168.60.11/24 scope global enp65s0f0
             valid_lft forever preferred_lft forever
      4: enp65s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
          link/ether e0:00:84:56:4e:39 brd ff:ff:ff:ff:ff:ff
      372: enp53s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
          link/ether ce:04:7a:b4:9a:b1 brd ff:ff:ff:ff:ff:ff
      373: enp53s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
          link/ether 42:2f:aa:f3:50:e5 brd ff:ff:ff:ff:ff:ff
      [root@localhost bin]#
      ```
      after
      
      ```
      [root@localhost pll]# ethtool --reset enp53s0f1 all
      ETHTOOL_RESET 0xffffffff
      [20652.651629][ T2931] hns3 0000:35:00.1 enp53s0f1: Setting reset type 6
      Components reset:     0xffffffff
      [root@localhost pll]# [20662.722669][    C1] hns3 0000:35:00.1: triggering reset in reset timer
      [20662.725095][    C1] hns3 0000:35:00.1: received reset event, reset type is 6
      [20662.728231][ T2880] hns3 0000:35:00.1: global reset requested
      [20662.730430][    C1] hns3 0000:35:00.0: global reset interrupt
      [20662.732888][    C1] hns3 0000:35:00.1: global reset interrupt
      [20662.733803][ T2923] hns3 0000:35:00.0 enp53s0f0: link down
      [20662.846863][ T2923] hns3 0000:35:00.0: prepare wait ok
      [20663.028936][ T2880] hns3 0000:35:00.1: cleaned 0, need to clean 1
      [20663.031251][ T2880] hns3 0000:35:00.1: get link status cmd failed -52
      [20663.039432][ T2880] hns3 0000:35:00.1 enp53s0f1: link down
      [20663.147103][ T2880] hns3 0000:35:00.1: prepare wait ok
      [20663.312845][ T2880] hns3 0000:35:00.1: The firmware version is 3.10.3.3
      [20664.260637][ T2880] hns3 0000:35:00.1: phc initializes ok!
      [20664.404095][ T2880] hns3 0000:35:00.1: Reset done, hclge driver initialization finished.
      [20664.536803][ T2923] hns3 0000:35:00.0: The firmware version is 3.10.3.3
      [20665.484856][ T2923] hns3 0000:35:00.0: phc initializes ok!
      [20665.628249][ T2923] hns3 0000:35:00.0: Reset done, hclge driver initialization finished.
      [20665.875837][ T2923] hns3 0000:35:00.0 enp53s0f0: link up
      [20665.881068][ T2880] hns3 0000:35:00.1 enp53s0f1: link up
      ```
       
       
      Link:https://gitee.com/openeuler/kernel/pulls/318 
      Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> 
      Reviewed-by: Yue Haibing <yuehaibing@huawei.com> 
      Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> 
      20ca80a7
    • O
      !307 arch: mach: add support for 16dv300 series soc. · 4f772737
      openeuler-ci-bot 提交于
      Merge Pull Request from: @mist_tao 
       
      As a new-generation smart HD IP camera SOC, Hi3516DV300 
      integrates the new-generation ISP, H.265 video compression encoder, 
      and high-performance NNIE engine. Hi3516DV300 leads the industry 
      in terms of low bit rate, high image quality, intelligent processing and analysis, 
      and low power consumption. The soc can be used in the development of face recognition terminals, 
      face payment terminals, and security terminals. 
      
      This patchset mainly provide common capabilities for 16dv300 series soc.
      1、Add support for 16dv300 machine, including clk driver,defconfig, etc.
      2、Add MEIG vendor id to usb serial driver options.
      3、Add I2C_M_STOP flag support for hix5hd2 driver.
       
       
      Link:https://gitee.com/openeuler/kernel/pulls/307 
      Reviewed-by: Xie XiuQi <xiexiuqi@huawei.com> 
      Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com> 
      4f772737
    • G
      net: hns3: fix setting incorrect phy link ksettings for firmware in resetting process · 20c27ab8
      Guangbin Huang 提交于
      mainline inclusion
      from mainline-v6.1-rc6
      commit 510d7b6a
      category: bugfix
      bugzilla: https://gitee.com/openeuler/kernel/issues/I65DT5
      CVE: NA
      
      Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=510d7b6ae842e59ee00d57e5f07ac15131b6d899
      
      ----------------------------------------------------------------------
      
      Currently, if driver is in phy-imp(phy controlled by imp firmware) mode, as
      driver did not update phy link ksettings after initialization process or
      not update advertising when getting phy link ksettings from firmware, it
      may set incorrect phy link ksettings for firmware in resetting process.
      So fix it.
      
      Fixes: f5f2b3e4 ("net: hns3: add support for imp-controlled PHYs")
      Fixes: c5ef83cb ("net: hns3: fix for phy_addr error in hclge_mac_mdio_config")
      Fixes: 2312e050 ("net: hns3: Fix for deadlock problem occurring when unregistering ae_algo")
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NHao Lan <lanhao@huawei.com>
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
      20c27ab8
    • J
      net: hns3: fix return value check bug of rx copybreak · 9853e2f6
      Jie Wang 提交于
      mainline inclusion
      from mainline-v6.1-rc6
      commit 29df7c69
      category: bugfix
      bugzilla: https://gitee.com/openeuler/kernel/issues/I65DT5
      CVE: NA
      
      Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=29df7c695ed67a8fa32bb7805bad8fe2a76c1f88
      
      ----------------------------------------------------------------------
      
      The refactoring of rx copybreak modifies the original return logic, which
      will make this feature unavailable. So this patch fixes the return logic of
      rx copybreak.
      
      Fixes: e74a726d ("net: hns3: refactor hns3_nic_reuse_page()")
      Fixes: 99f6b5fb ("net: hns3: use bounce buffer when rx page can not be reused")
      Signed-off-by: NJie Wang <wangjie125@huawei.com>
      Signed-off-by: NHao Lan <lanhao@huawei.com>
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
      9853e2f6
    • J
      net: hns3: fix incorrect hw rss hash type of rx packet · eaed3909
      Jian Shen 提交于
      mainline inclusion
      from mainline-v6.1-rc6
      commit a56cad69
      category: bugfix
      bugzilla: https://gitee.com/openeuler/kernel/issues/I65DT5
      CVE: NA
      
      Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a56cad694767ebdb7d80f27ffc239db46fff64de
      
      ----------------------------------------------------------------------
      
      Currently, the HNS3 driver reports the rss hash type
      of each packet based on the rss hash tuples set. It
      always reports PKT_HASH_TYPE_L4, without checking the
      type of current packet. It's incorrect.
      Fixes it by reporting it base on the packet type.
      
      Fixes: 79664077 ("net: hns3: support RXD advanced layout")
      Fixes: 232fc64b ("net: hns3: Add HW RSS hash information to RX skb")
      Fixes: ea485867 ("net: hns3: handle the BD info on the last BD of the packet")
      Signed-off-by: NJian Shen <shenjian15@huawei.com>
      Signed-off-by: NHao Lan <lanhao@huawei.com>
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
      eaed3909
  3. 08 12月, 2022 29 次提交