1. 09 4月, 2019 2 次提交
    • Y
      RDMA/hns: Bugfix for SCC hem free · 00fb67ec
      Yangyang Li 提交于
      The method of hem free for SCC context is different from qp context.
      
      In the current version, if free SCC hem during the execution of qp free,
      there may be smmu error as below:
      
       arm-smmu-v3 arm-smmu-v3.1.auto: event 0x10 received:
       arm-smmu-v3 arm-smmu-v3.1.auto:  0x00007d0000000010
       arm-smmu-v3 arm-smmu-v3.1.auto:  0x000012000000017c
       arm-smmu-v3 arm-smmu-v3.1.auto:  0x00000000000009e0
       arm-smmu-v3 arm-smmu-v3.1.auto:  0x0000000000000000
      
      As SCC context is still used by hardware after qp free, we can solve this
      problem by removing SCC hem free from hns_roce_qp_free.
      
      Fixes: 6a157f7d ("RDMA/hns: Add SCC context allocation support for hip08")
      Signed-off-by: NYangyang Li <liyangyang20@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      00fb67ec
    • L
      RDMA/hns: Fix bug that caused srq creation to fail · 4772e03d
      Lijun Ou 提交于
      Due to the incorrect use of the seg and obj information, the position of
      the mtt is calculated incorrectly, and the free space of the page is not
      enough to store the entire mtt, resulting in access to the next page. This
      patch fixes this problem.
      
       Unable to handle kernel paging request at virtual address ffff00006e3cd000
       ...
       Call trace:
        hns_roce_write_mtt+0x154/0x2f0 [hns_roce]
        hns_roce_buf_write_mtt+0xa8/0xd8 [hns_roce]
        hns_roce_create_srq+0x74c/0x808 [hns_roce]
        ib_create_srq+0x28/0xc8
      
      Fixes: 0203b14c ("RDMA/hns: Unify the calculation for hem index in hip08")
      Signed-off-by: Nchenglang <chenglang@huawei.com>
      Signed-off-by: NLijun Ou <oulijun@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      4772e03d
  2. 05 3月, 2019 1 次提交
  3. 23 2月, 2019 1 次提交
  4. 20 2月, 2019 2 次提交
    • Y
      RDMA/hns: Bugfix for set hem of SCC · 6ac16e40
      Yangyang Li 提交于
      The method of set hem for scc context is different from other contexts. It
      should notify the hardware with the detailed idx in bt0 for scc, while for
      other contexts, it only need to notify the bt step and the hardware will
      calculate the idx.
      
      Here fixes the following error when unloading the hip08 driver:
      
      [  123.570768] {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 0
      [  123.579023] {1}[Hardware Error]: event severity: recoverable
      [  123.584670] {1}[Hardware Error]:  Error 0, type: recoverable
      [  123.590317] {1}[Hardware Error]:   section_type: PCIe error
      [  123.595877] {1}[Hardware Error]:   version: 4.0
      [  123.600395] {1}[Hardware Error]:   command: 0x0006, status: 0x0010
      [  123.606562] {1}[Hardware Error]:   device_id: 0000:7d:00.0
      [  123.612034] {1}[Hardware Error]:   slot: 0
      [  123.616120] {1}[Hardware Error]:   secondary_bus: 0x00
      [  123.621245] {1}[Hardware Error]:   vendor_id: 0x19e5, device_id: 0xa222
      [  123.627847] {1}[Hardware Error]:   class_code: 000002
      [  123.632977] hns3 0000:7d:00.0: aer_status: 0x00000000, aer_mask: 0x00000000
      [  123.639928] hns3 0000:7d:00.0: aer_layer=Transaction Layer, aer_agent=Receiver ID
      [  123.647400] hns3 0000:7d:00.0: aer_uncor_severity: 0x00000000
      [  123.653136] hns3 0000:7d:00.0: PCI error detected, state(=1)!!
      [  123.658959] hns3 0000:7d:00.0: ROCEE uncorrected RAS error identified
      [  123.665395] hns3 0000:7d:00.0: ROCEE RAS AXI rresp error
      [  123.670713] hns3 0000:7d:00.0: requesting reset due to PCI error
      [  123.676715] hns3 0000:7d:00.0: received reset event , reset type is 5
      [  123.683147] hns3 0000:7d:00.0: AER: Device recovery successful
      [  123.688978] hns3 0000:7d:00.0: PF Reset requested
      [  123.693684] hns3 0000:7d:00.0: PF failed(=-5) to send mailbox message to VF
      [  123.700633] hns3 0000:7d:00.0: inform reset to vf(1) failded -5!
      
      Fixes: 6a157f7d ("RDMA/hns: Add SCC context allocation support for hip08")
      Signed-off-by: NYangyang Li <liyangyang20@huawei.com>
      Reviewed-by: NYixian Liu <liuyixian@huawei.com>
      Reviewed-by: NLijun Ou <oulijun@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      6ac16e40
    • L
      RDMA/hns: Modify qp&cq&pd specification according to UM · 3e394f94
      Lijun Ou 提交于
      Accroding to hip08's limitation, qp&cq specification is 1M, mtpt
      specification 1M in kernel space.
      Signed-off-by: NYangyang Li <liyangyang20@huawei.com>
      Signed-off-by: NLijun Ou <oulijun@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      3e394f94
  5. 16 2月, 2019 1 次提交
  6. 15 2月, 2019 5 次提交
  7. 14 2月, 2019 1 次提交
  8. 12 2月, 2019 1 次提交
  9. 09 2月, 2019 1 次提交
  10. 05 2月, 2019 4 次提交
    • W
      RDMA/hns: Fix the chip hanging caused by sending doorbell during reset · d3743fa9
      Wei Hu (Xavier) 提交于
      On hi08 chip, There is a possibility of chip hanging when sending doorbell
      during reset. We can fix it by prohibiting doorbell during reset.
      
      Fixes: 2d407888 ("RDMA/hns: Add support for processing send wr and receive wr")
      Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      d3743fa9
    • W
      RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset · 6a04aed6
      Wei Hu (Xavier) 提交于
      On hi08 chip, There is a possibility of chip hanging and some errors when
      sending mailbox & doorbell during reset.  We can fix it by prohibiting
      mailbox and doorbell during reset and reset occurred to ensure that
      hardware can work normally.
      
      Fixes: a04ff739 ("RDMA/hns: Add command queue support for hip08 RoCE driver")
      Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      6a04aed6
    • W
      RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs · d061effc
      Wei Hu (Xavier) 提交于
      In the reset process, the hns3 NIC driver notifies the RoCE driver to
      perform reset related processing by calling the .reset_notify() interface
      registered by the RoCE driver in hip08 SoC.
      
      In the current version, if a reset occurs simultaneously during the
      execution of rmmod or insmod ko, there may be Oops error as below:
      
       Internal error: Oops: 86000007 [#1] PREEMPT SMP
       Modules linked in: hns_roce(O) hns3(O) hclge(O) hnae3(O) [last unloaded: hns_roce_hw_v2]
       CPU: 0 PID: 14 Comm: kworker/0:1 Tainted: G           O      4.19.0-ge00d540 #1
       Hardware name: Huawei Technologies Co., Ltd.
       Workqueue: events hclge_reset_service_task [hclge]
       pstate: 60c00009 (nZCv daif +PAN +UAO)
       pc : 0xffff00000100b0b8
       lr : 0xffff00000100aea0
       sp : ffff000009afbab0
       x29: ffff000009afbab0 x28: 0000000000000800
       x27: 0000000000007ff0 x26: ffff80002f90c004
       x25: 00000000000007ff x24: ffff000008f97000
       x23: ffff80003efee0a8 x22: 0000000000001000
       x21: ffff80002f917ff0 x20: ffff8000286ea070
       x19: 0000000000000800 x18: 0000000000000400
       x17: 00000000c4d3225d x16: 00000000000021b8
       x15: 0000000000000400 x14: 0000000000000400
       x13: 0000000000000000 x12: ffff80003fac6e30
       x11: 0000800036303000 x10: 0000000000000001
       x9 : 0000000000000000 x8 : ffff80003016d000
       x7 : 0000000000000000 x6 : 000000000000003f
       x5 : 0000000000000040 x4 : 0000000000000000
       x3 : 0000000000000004 x2 : 00000000000007ff
       x1 : 0000000000000000 x0 : 0000000000000000
       Process kworker/0:1 (pid: 14, stack limit = 0x00000000af8f0ad9)
       Call trace:
        0xffff00000100b0b8
        0xffff00000100b3a0
        hns_roce_init+0x624/0xc88 [hns_roce]
        0xffff000001002df8
        0xffff000001006960
        hclge_notify_roce_client+0x74/0xe0 [hclge]
        hclge_reset_service_task+0xa58/0xbc0 [hclge]
        process_one_work+0x1e4/0x458
        worker_thread+0x40/0x450
        kthread+0x12c/0x130
        ret_from_fork+0x10/0x18
       Code: bad PC value
      
      In the reset process, we will release the resources firstly, and after the
      hardware reset is completed, we will reapply resources and reconfigure the
      hardware.
      
      We can solve this problem by modifying both the NIC and the RoCE
      driver. We can modify the concurrent processing in the NIC driver to avoid
      calling the .reset_notify and .uninit_instance ops at the same time. And
      we need to modify the RoCE driver to record the reset stage and the
      driver's init/uninit state, and check the state in the .reset_notify,
      .init_instance. and uninit_instance functions to avoid NULL pointer
      operation.
      
      Fixes: cb7a94c9 ("RDMA/hns: Add reset process for RoCE in hip08")
      Signed-off-by: NWei Hu (Xavier) <xavier.huwei@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      d061effc
    • Y
      RDMA/hns: Make some function static · c3c668e7
      YueHaibing 提交于
      Fixes the following sparse warnings:
      
      drivers/infiniband/hw/hns/hns_roce_hw_v2.c:5822:5: warning:
       symbol 'hns_roce_v2_query_srq' was not declared. Should it be static?
      drivers/infiniband/hw/hns/hns_roce_srq.c:158:6: warning:
       symbol 'hns_roce_srq_free' was not declared. Should it be static?
      drivers/infiniband/hw/hns/hns_roce_srq.c:81:5: warning:
       symbol 'hns_roce_srq_alloc' was not declared. Should it be static?
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      c3c668e7
  11. 01 2月, 2019 1 次提交
  12. 31 1月, 2019 1 次提交
  13. 26 1月, 2019 2 次提交
  14. 25 1月, 2019 3 次提交
  15. 22 1月, 2019 1 次提交
  16. 19 1月, 2019 2 次提交
  17. 15 1月, 2019 1 次提交
  18. 11 1月, 2019 4 次提交
  19. 08 1月, 2019 5 次提交
  20. 20 12月, 2018 1 次提交