RE: [PATCH v4] PCI: hv: Fix a timing issue which causes kdump to fail occasionally

2020-07-27 Thread Wei Hu
> -Original Message- > From: Lorenzo Pieralisi > Sent: Monday, July 27, 2020 7:19 PM > To: Wei Hu > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > wei@kernel.org; r...@kernel.org; bhelg...@google.com; linux- > hyp...@vger.kernel.org; linux-..

[PATCH v4] PCI: hv: Fix a timing issue which causes kdump to fail occasionally

2020-07-27 Thread Wei Hu
device structures before calling hv_send_resource_allocated(). This problem only happens on Accelerated Network or SRIOV devices as only such devices currently are attached under vmbus PCI bridge. Fixes: c81992e7f4aa ("PCI: hv: Retry PCI bus D0 entry on invalid device state") Signed-off-

RE: [PATCH v3] PCI: hv: Fix a timing issue which causes kdump to fail occasionally

2020-07-23 Thread Wei Hu
c81992e7f4aa ("PCI: hv: Retry PCI bus D0 entry on invalid > > device state") > > Signed-off-by: Wei Hu > > Please carry tags and send patches -in-reply-to the previous version to allow > threading. > Do you mean to add review-by tags? If not would you please

[PATCH v3] PCI: hv: Fix a timing issue which causes kdump to fail occasionally

2020-07-17 Thread Wei Hu
dependency and making the calling sequence synchronous. Fixes: c81992e7f4aa ("PCI: hv: Retry PCI bus D0 entry on invalid device state") Signed-off-by: Wei Hu --- v2: Adding Fixes tag according to Michael Kelley's review comment. v3: Fix couple typos and reword commit message to

RE: [PATCH v2] PCI: hv: Fix a timing issue which causes kdump to fail occasionally

2020-07-17 Thread Wei Hu
> -Original Message- > From: Bjorn Helgaas > Sent: Saturday, July 18, 2020 4:11 AM > To: Wei Hu > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > wei@kernel.org; lorenzo.pieral...@arm.com; r...@kernel.org; > bhelg...@google.com; linux-hyp...@vge

[PATCH v2] PCI: hv: Fix a timing issue which causes kdump to fail occasionally

2020-07-16 Thread Wei Hu
dependence and making the calling sequence synchronous. v2: Adding Fixes tag according to Michael Kelley's review comment. Fixes: c81992e7f4aa ("PCI: hv: Retry PCI bus D0 entry on invalid device state") Signed-off-by: Wei Hu --- drivers/pci/controller/pc

[PATCH] PCI: hv: Fix a timing issue which causes kdump to fail occasionally

2020-07-16 Thread Wei Hu
dependence and making the calling sequence synchronous. Signed-off-by: Wei Hu --- drivers/pci/controller/pci-hyperv.c | 66 ++--- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index

RE: [PATCH v3 2/2] PCI: hv: Retry PCI bus D0 entry when the first attempt failed with invalid device state

2020-05-11 Thread Wei Hu
> -Original Message- > From: Lorenzo Pieralisi > Sent: Monday, May 11, 2020 7:21 PM > To: Wei Hu > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > wei@kernel.org; r...@kernel.org; bhelg...@google.com; linux- > hyp...@vger.kernel.org; linux-..

[PATCH v3 2/2] PCI: hv: Retry PCI bus D0 entry when the first attempt failed with invalid device state

2020-05-06 Thread Wei Hu
the D0 state. Signed-off-by: Wei Hu --- v2: Incorporate review comments from Michael Kelley, Dexuan Cui and Bjorn Helgaas drivers/pci/controller/pci-hyperv.c | 40 +++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pci

[PATCH v3 1/2] PCI: hv: Fix the PCI HyperV probe failure path to release resource properly

2020-05-06 Thread Wei Hu
get_pcichild_wslot(). Signed-off-by: Wei Hu --- v3: Add detailed explanation of this patch in commit log per Lorenzo Pieralisi's suggestions. drivers/pci/controller/pci-hyperv.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/driver

[PATCH v3 0/2] Fix PCI HyperV device error handling

2020-05-06 Thread Wei Hu
Michael Kelley's contribution to the commit log. Thanks, Wei Wei Hu (2): PCI: hv: Fix the PCI HyperV probe failure path to release resource properly PCI: hv: Retry PCI bus D0 entry when the first attempt failed with invalid device state drivers/pci/controller/pci-hyperv.c

RE: [PATCH v2 1/2] PCI: hv: Fix the PCI HyperV probe failure path to release resource properly

2020-05-06 Thread Wei Hu
Thanks for your email. See my comments inline. > -Original Message- > From: Lorenzo Pieralisi > Sent: Wednesday, May 6, 2020 7:10 PM > To: Wei Hu > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > wei@kernel.org; r...@kernel.org; bhelg...@goo

RE: [PATCH v2 2/2] PCI: hv: Retry PCI bus D0 entry when the first attempt failed with invalid device state

2020-05-05 Thread Wei Hu
> -Original Message- > From: Lorenzo Pieralisi > Sent: Tuesday, May 5, 2020 11:10 PM > To: Wei Hu > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > wei@kernel.org; r...@kernel.org; bhelg...@google.com; linux- > hyp...@vger.kernel.org; linux-..

RE: [PATCH v2 1/2] PCI: hv: Fix the PCI HyperV probe failure path to release resource properly

2020-05-05 Thread Wei Hu
Hi Lorenzo, Thanks for your review. Please see my comments inline. > -Original Message- > From: Lorenzo Pieralisi > Sent: Tuesday, May 5, 2020 11:03 PM > To: Wei Hu > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > wei@kernel.org; r...@kernel.org

[PATCH v2 2/2] PCI: hv: Retry PCI bus D0 entry when the first attempt failed with invalid device state

2020-04-30 Thread Wei Hu
the D0 state. Signed-off-by: Wei Hu --- v2: Incorporate review comments from Michael Kelley, Dexuan Cui and Bjorn Helgaas drivers/pci/controller/pci-hyperv.c | 40 +++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pci

[PATCH v2 1/2] PCI: hv: Fix the PCI HyperV probe failure path to release resource properly

2020-04-30 Thread Wei Hu
Some error cases in hv_pci_probe() were not handled. Fix these error paths to release the resourses and clean up the state properly. Signed-off-by: Wei Hu --- drivers/pci/controller/pci-hyperv.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH v2 0/2] Fix PCI HyperV device error handling

2020-04-30 Thread Wei Hu
This series better handles some PCI HyperV error cases in general and for kdump case. Some of review comments from previous individual patch reviews, including splitting into separate patches, have already been incorporated. Thanks, Wei Wei Hu (2): PCI: hv: Fix the PCI HyperV probe failure

RE: [PATHC v2] video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver

2019-08-28 Thread Wei Hu
> -Original Message- > From: Michael Kelley > > From: Wei Hu Sent: Tuesday, August 27, 2019 4:25 AM > > > > Without deferred IO support, hyperv_fb driver informs the host to refresh > > the entire guest frame buffer at fixed rate, e.g. at 20Hz, no mat

[PATCH v3] video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host

2019-08-27 Thread Wei Hu
o" command. v2: - Implemented fallback when version negotiation failed. - Defined full size for supported_resolution array. v3: - Corrected the synthvid major and minor version comparison problem. Signed-off-by: Iouri Tarassov Signed-off-by: Wei Hu --- drivers/video/fbd

RE: [PATCH] video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver

2019-08-21 Thread Wei Hu
Thanks Michael. See my reply inline to some of your comments. > -Original Message- > From: Michael Kelley > Sent: Monday, August 19, 2019 6:41 AM > To: Wei Hu ; rdun...@infradead.org; shc_w...@mail.ru; > > - msg.dirt.rect[0].x1 = 0; > > -

Re: [PATCH V2 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-02-03 Thread Wei Hu (Xavier)
On 2019/1/29 11:45, Jason Gunthorpe wrote: > On Tue, Jan 29, 2019 at 10:18:40AM +0800, Wei Hu (Xavier) wrote: >> >> On 2019/1/29 2:27, Jason Gunthorpe wrote: >>> On Sat, Jan 26, 2019 at 09:47:42AM +0800, Wei Hu (Xavier) wrote: >>>> On 2019/1/26 5:50, Jason G

[PATCH V4 rdma-next 0/3] RDMA/hns: Some fixes for hns RoCE driver

2019-02-03 Thread Wei Hu (Xavier)
Hi, Jason and Doug This patch series includes three bugfixes for reset related operations and are maked based on wip/jgg-for-next branch. Best Regards Xavier Wei Hu (Xavier) (3): RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs RDMA/hns: Fix the chip hanging caused by

[PATCH V4 rdma-next 3/3] RDMA/hns: Fix the chip hanging caused by sending doorbell during reset

2019-02-03 Thread 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: 2d40788825ac ("RDMA/hns: Add support for processing send wr and receive wr") Signed-off-by: Wei Hu (Xavier) --- v3->v4: Non change

[PATCH V4 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-02-03 Thread Wei Hu (Xavier)
e support for hip08 RoCE driver") Signed-off-by: Wei Hu (Xavier) --- v3->v4: Get rid of loop operation to address jason's comments the related link as below: https://patchwork.kernel.org/patch/10771917/ v2->v3: Get rid of udelay operation. v1->v2: Non change. --

[PATCH V4 rdma-next 1/3] RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs

2019-02-03 Thread Wei Hu (Xavier)
ns to avoid NULL pointer operation. Fixes: cb7a94c9c808 ("RDMA/hns: Add reset process for RoCE in hip08") Signed-off-by: Wei Hu (Xavier) --- v3->v4: Non change. v2->v3: Non change. v1->v2: Delete checking whether in the reset state and waiting for

Re: [PATCH V2 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-01-28 Thread Wei Hu (Xavier)
On 2019/1/29 2:27, Jason Gunthorpe wrote: > On Sat, Jan 26, 2019 at 09:47:42AM +0800, Wei Hu (Xavier) wrote: >> >> On 2019/1/26 5:50, Jason Gunthorpe wrote: >>> On Fri, Jan 25, 2019 at 10:15:40AM +0800, Wei Hu (Xavier) wrote: >>>> On 2019/1/25 2:31, Jason G

Re: [PATCH V2 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-01-25 Thread Wei Hu (Xavier)
On 2019/1/26 9:47, Wei Hu (Xavier) wrote: > > On 2019/1/26 5:50, Jason Gunthorpe wrote: >> On Fri, Jan 25, 2019 at 10:15:40AM +0800, Wei Hu (Xavier) wrote: >>> On 2019/1/25 2:31, Jason Gunthorpe wrote: >>>> On Thu, Jan 24, 2019 at 11:13:29AM +0800, Wei Hu (Xavie

[PATCH V3 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-01-25 Thread Wei Hu (Xavier)
e support for hip08 RoCE driver") Signed-off-by: Wei Hu (Xavier) --- v2->v3: Get rid of udelay operation to address jason's comments, the related link as below: https://patchwork.kernel.org/patch/10771917/ v1->v2: Non change. --- drivers/infiniband/hw/hn

[PATCH V3 rdma-next 0/3] RDMA/hns: Some fixes for hns RoCE driver

2019-01-25 Thread Wei Hu (Xavier)
Hi, Jason and Doug This patch series includes three bugfixes for reset related operations and are maked based on wip/jgg-for-next branch. Best Regards Xavier Wei Hu (Xavier) (3): RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs RDMA/hns: Fix the chip hanging caused by

[PATCH V3 rdma-next 3/3] RDMA/hns: Fix the chip hanging caused by sending doorbell during reset

2019-01-25 Thread 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: 2d40788825ac ("RDMA/hns: Add support for processing send wr and receive wr") Signed-off-by: Wei Hu (Xavier) --- v2->v3: Non change

[PATCH V3 rdma-next 1/3] RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs

2019-01-25 Thread Wei Hu (Xavier)
ns to avoid NULL pointer operation. Fixes: cb7a94c9c808 ("RDMA/hns: Add reset process for RoCE in hip08") Signed-off-by: Wei Hu (Xavier) --- v2->v3: Non change. v1->v2: Delete checking whether in the reset state and waiting for the reset to complete in hns_roce_

Re: [PATCH V2 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-01-25 Thread Wei Hu (Xavier)
On 2019/1/26 5:50, Jason Gunthorpe wrote: > On Fri, Jan 25, 2019 at 10:15:40AM +0800, Wei Hu (Xavier) wrote: >> >> On 2019/1/25 2:31, Jason Gunthorpe wrote: >>> On Thu, Jan 24, 2019 at 11:13:29AM +0800, Wei Hu (Xavier) wrote: >>>> On 2019/1/24 6:40, Jason G

Re: [PATCH V2 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-01-24 Thread Wei Hu (Xavier)
On 2019/1/25 2:31, Jason Gunthorpe wrote: > On Thu, Jan 24, 2019 at 11:13:29AM +0800, Wei Hu (Xavier) wrote: >> >> On 2019/1/24 6:40, Jason Gunthorpe wrote: >>> On Sat, Jan 19, 2019 at 11:36:06AM +0800, Wei Hu (Xavier) wrote: >>> >>>> +static int hns

Re: [PATCH V2 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-01-23 Thread Wei Hu (Xavier)
On 2019/1/24 6:40, Jason Gunthorpe wrote: > On Sat, Jan 19, 2019 at 11:36:06AM +0800, Wei Hu (Xavier) wrote: > >> +static int hns_roce_v2_cmd_hw_resetting(struct hns_roce_dev *hr_dev, >> +unsigned l

[PATCH V2 rdma-next 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-01-18 Thread Wei Hu (Xavier)
e support for hip08 RoCE driver") Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 32 -- drivers/infiniband/hw/hns/hns_roce_device.h | 7 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 154 +++- drivers/infiniband/hw/hns/hn

[PATCH V2 rdma-next 3/3] RDMA/hns: Fix the chip hanging caused by sending doorbell during reset

2019-01-18 Thread 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: 2d40788825ac ("RDMA/hns: Add support for processing send wr and receive wr") Signed-off-by: Wei Hu (Xavier) --- drivers/infinib

[PATCH V2 rdma-next 0/3] RDMA/hns: Some fixes for hns RoCE driver

2019-01-18 Thread Wei Hu (Xavier)
Hi, Jason and Doug This patch series includes three bugfixes for reset related operations and are maked based on wip/jgg-for-next branch. Best Regards Xavier Wei Hu (Xavier) (3): RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs RDMA/hns: Fix the chip hanging caused by

[PATCH V2 rdma-next 1/3] RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs

2019-01-18 Thread Wei Hu (Xavier)
ns to avoid NULL pointer operation. Fixes: cb7a94c9c808 ("RDMA/hns: Add reset process for RoCE in hip08") Signed-off-by: Wei Hu (Xavier) --- v1->v2: Delete checking whether in the reset state and waiting for the reset to complete in hns_roce_hw_v2_uninit_instance f

Re: [PATCH rdma-rc 1/3] RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs

2019-01-18 Thread Wei Hu (Xavier)
On 2019/1/16 6:02, Jason Gunthorpe wrote: > On Tue, Jan 15, 2019 at 09:48:01AM +0800, Wei Hu (Xavier) wrote: >> >> On 2019/1/15 6:06, Jason Gunthorpe wrote: >>> On Sat, Jan 12, 2019 at 03:55:31PM +0800, Wei Hu (Xavier) wrote: >>>> On 2019/1/12 5:34, Jason G

Re: [PATCH rdma-rc 1/3] RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs

2019-01-14 Thread Wei Hu (Xavier)
On 2019/1/15 6:06, Jason Gunthorpe wrote: > On Sat, Jan 12, 2019 at 03:55:31PM +0800, Wei Hu (Xavier) wrote: >> >> On 2019/1/12 5:34, Jason Gunthorpe wrote: >>> On Thu, Jan 10, 2019 at 09:57:41PM +0800, Wei Hu (Xavier) wrote: >>>> + /* Check the status of th

Re: [PATCH rdma-rc 1/3] RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs

2019-01-11 Thread Wei Hu (Xavier)
On 2019/1/12 5:34, Jason Gunthorpe wrote: > On Thu, Jan 10, 2019 at 09:57:41PM +0800, Wei Hu (Xavier) wrote: >> +/* Check the status of the current software reset process, if in >> + * software reset process, wait until software reset process finished, >> + * in

[PATCH rdma-rc 1/3] RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs

2019-01-10 Thread Wei Hu (Xavier)
. Fixes: cb7a94c9c808 ("RDMA/hns: Add reset process for RoCE in hip08") Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_device.h | 21 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 136 +--- drivers/infiniband/hw/hns/hns_roce_hw_v2.h |

[PATCH rdma-rc 3/3] RDMA/hns: Fix the chip hanging caused by sending doorbell during reset

2019-01-10 Thread 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: 2d40788825ac ("RDMA/hns: Add support for processing send wr and receive wr") Signed-off-by: Wei Hu (Xavier) --- drivers/infinib

[PATCH rdma-rc 0/3] RDMA/hns: Some fixes for 5.0

2019-01-10 Thread Wei Hu (Xavier)
Hi, Jason and Doug This patch series includes three bugfixes and are maked based on wip/jgg-for-rc branch. Best Regards Xavier Wei Hu (Xavier) (3): RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ du

[PATCH rdma-rc 2/3] RDMA/hns: Fix the chip hanging caused by sending mailbox&CMQ during reset

2019-01-10 Thread Wei Hu (Xavier)
e support for hip08 RoCE driver") Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 32 -- drivers/infiniband/hw/hns/hns_roce_device.h | 7 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 154 +++- drivers/infiniband/hw/hns/hn

Re: [PATCH rdma-next 3/3] RDMA/hns: Modify hns RoCE device's name

2018-11-26 Thread Wei Hu (Xavier)
On 2018/11/27 1:44, Jason Gunthorpe wrote: > On Mon, Nov 26, 2018 at 04:34:10PM +0800, Wei Hu (Xavier) wrote: >> >> On 2018/11/26 11:13, Jason Gunthorpe wrote: >>> On Sat, Nov 24, 2018 at 09:01:19PM +0800, Wei Hu (Xavier) wrote: >>>> On 2018/11/24 4:39, Jaso

Re: [PATCH rdma-next 3/3] RDMA/hns: Modify hns RoCE device's name

2018-11-26 Thread Wei Hu (Xavier)
On 2018/11/26 11:13, Jason Gunthorpe wrote: > On Sat, Nov 24, 2018 at 09:01:19PM +0800, Wei Hu (Xavier) wrote: >> >> On 2018/11/24 4:39, Jason Gunthorpe wrote: >>> On Fri, Nov 23, 2018 at 11:14:25PM +0800, Wei Hu (Xavier) wrote: >>>> This patch modifies t

Re: [PATCH rdma-next 0/3] RDMA/hns: Updates for reset process of roce device in hip08

2018-11-24 Thread Wei Hu (Xavier)
On 2018/11/24 4:42, Jason Gunthorpe wrote: > On Fri, Nov 23, 2018 at 11:14:22PM +0800, Wei Hu (Xavier) wrote: >> Hi, Doug and Janson >> >> This series mainly include updates for reset process of roce device >> in hip08. >> One patch adds support for reset and

Re: [PATCH rdma-next 3/3] RDMA/hns: Modify hns RoCE device's name

2018-11-24 Thread Wei Hu (Xavier)
On 2018/11/24 4:39, Jason Gunthorpe wrote: > On Fri, Nov 23, 2018 at 11:14:25PM +0800, Wei Hu (Xavier) wrote: >> This patch modifies the name of hns RoCE device's name in order >> to ensure that the name is consistent before and after reset. >> >> Signed-off-

[PATCH rdma-next 0/3] RDMA/hns: Updates for reset process of roce device in hip08

2018-11-23 Thread Wei Hu (Xavier)
ux/kernel/git/davem/net-next.git commit cb7ea80c6dfda472a068d40f4f9755d034b2dfde Best Regards Xavier Wei Hu (Xavier) (3): RDMA/hns: Add support for reset and loading or unloading driver occur simultaneously RDMA/hns: Stop sending mailbox&cmq&doorbell when reset occured or is

[PATCH rdma-next 2/3] RDMA/hns: Stop sending mailbox&cmq&doorbell when reset occured or is occuring

2018-11-23 Thread Wei Hu (Xavier)
This patch stops sending mailbox&cmq&doorbell to the hardware When reset occured or is occuring to ensure that hardware can work normally. Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 32 -- drivers/infiniband/hw/hns/hns_roce_device.h | 8 ++

[PATCH rdma-next 3/3] RDMA/hns: Modify hns RoCE device's name

2018-11-23 Thread Wei Hu (Xavier)
This patch modifies the name of hns RoCE device's name in order to ensure that the name is consistent before and after reset. Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +++ drivers/infiniband/h

[PATCH rdma-next 1/3] RDMA/hns: Add support for reset and loading or unloading driver occur simultaneously

2018-11-23 Thread Wei Hu (Xavier)
This patch adds support for reset and loading or unloading driver occur simultaneously. Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_device.h | 21 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 151 ++-- drivers/infiniband/hw/hns

Re: [PATCH V3 rdma-next 4/4] RDMA/hns: Implement the disassociate_ucontext API

2018-05-29 Thread Wei Hu (Xavier)
On 2018/5/29 0:53, Jason Gunthorpe wrote: > On Sat, May 26, 2018 at 04:41:47PM +0800, Wei Hu (Xavier) wrote: >> This patch implemented the IB core disassociate_ucontext API. >> >> Signed-off-by: Wei Hu (Xavier) >> >> v2->v3: Addressed the comments from Ja

Re: [PATCH V3 rdma-next 3/4] RDMA/uverbs: Hoist the common process of disassociate_ucontext into ib core

2018-05-28 Thread Wei Hu (Xavier)
On 2018/5/27 23:05, Leon Romanovsky wrote: > On Sat, May 26, 2018 at 04:41:46PM +0800, Wei Hu (Xavier) wrote: >> This patch hoisted the common process of disassociate_ucontext >> callback function into ib core code, and these code are common >> to ervery ib_device driver

[PATCH V3 rdma-next 2/4] RDMA/hns: Fix the illegal memory operation when cross page

2018-05-26 Thread Wei Hu (Xavier)
) [ 3303.377377] ---[ end trace fd5ab98b3325cf9a ]--- Reported-by: Jie Chen Reported-by: Xiping Zhang (Francis) Fixes: b1c158350968("RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent") Signed-off-by: Wei Hu (Xavier) --- v2->v3: Add calltrace info and mod

[PATCH V3 rdma-next 1/4] RDMA/hns: Add reset process for RoCE in hip08

2018-05-26 Thread Wei Hu (Xavier)
This patch added reset process for RoCE in hip08. Signed-off-by: Wei Hu (Xavier) -- v2->v3: no change. v1->v2: 1.Delete handle->priv = NULL in hns_roce_hw_v2_uninit_instance. 2.Add hns_roce_hw_v2_reset_notify_init callback function, When RoCE reinit failed in this

[PATCH V3 rdma-next 0/4] {RDMA/uverbs,hns}: Misc update for hns driver

2018-05-26 Thread Wei Hu (Xavier)
hanks. Regards Wei Hu Wei Hu (Xavier) (4): RDMA/hns: Add reset process for RoCE in hip08 RDMA/hns: Fix the illegal memory operation when cross page RDMA/uverbs: Hoist the common process of disassociate_ucontext into ib core RDMA/hns: Implement the disassociate_ucontext API dr

[PATCH V3 rdma-next 4/4] RDMA/hns: Implement the disassociate_ucontext API

2018-05-26 Thread Wei Hu (Xavier)
This patch implemented the IB core disassociate_ucontext API. Signed-off-by: Wei Hu (Xavier) --- v2->v3: Addressed the comments from Jason. The related link: https://lkml.org/lkml/2018/5/22/967 v1->v2: no change. --- drivers/infiniband/hw/hns/hns_roce_device.h | 8 d

[PATCH V3 rdma-next 3/4] RDMA/uverbs: Hoist the common process of disassociate_ucontext into ib core

2018-05-26 Thread Wei Hu (Xavier)
This patch hoisted the common process of disassociate_ucontext callback function into ib core code, and these code are common to ervery ib_device driver. Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/core/uverbs_main.c | 45 ++- drivers/infiniband/hw/mlx4

Re: [PATCH V2 rdma-next 0/4] Misc update for hns driver

2018-05-26 Thread Wei Hu (Xavier)
On 2018/5/25 5:43, Jason Gunthorpe wrote: > On Wed, May 23, 2018 at 06:16:26PM +0800, Wei Hu (Xavier) wrote: >> This patchset included fixing bug, some optimization, reset >> process for hns driver. >> >> v1->v2: 1.pull the patch out of the series. The name of th

Re: [PATCH V2 rdma-next 3/4] RDMA/hns: Add reset process for RoCE in hip08

2018-05-25 Thread Wei Hu (Xavier)
On 2018/5/25 22:55, Jason Gunthorpe wrote: > On Fri, May 25, 2018 at 01:54:31PM +0800, Wei Hu (Xavier) wrote: >> >> On 2018/5/25 5:31, Jason Gunthorpe wrote: >>>> static const struct hnae3_client_ops hns_roce_hw_v2_ops = { >>>>.init_

Re: [PATCH V2 rdma-next 4/4] RDMA/hns: Fix the illegal memory operation when cross page

2018-05-24 Thread Wei Hu (Xavier)
On 2018/5/25 5:40, Jason Gunthorpe wrote: > On Wed, May 23, 2018 at 06:16:30PM +0800, Wei Hu (Xavier) wrote: >> This patch fixed the potential illegal operation when using the >> extend sge buffer cross page in post send operation. The bug >> will cause the calltrace. >

Re: [PATCH V2 rdma-next 3/4] RDMA/hns: Add reset process for RoCE in hip08

2018-05-24 Thread Wei Hu (Xavier)
On 2018/5/25 5:31, Jason Gunthorpe wrote: > On Wed, May 23, 2018 at 06:16:29PM +0800, Wei Hu (Xavier) wrote: >> This patch added reset process for RoCE in hip08. >> >> Signed-off-by: Wei Hu (Xavier) >> >> v1->v2: 1.Delete handle->priv = NULL in hns_ro

[PATCH V2 rdma-next 4/4] RDMA/hns: Fix the illegal memory operation when cross page

2018-05-23 Thread Wei Hu (Xavier)
after dma_alloc_coherent") Signed-off-by: Wei Hu (Xavier) --- v1->v2: Modify the Fixes statement according to Leon's comment. --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 70 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 1 + 2 files changed, 51 insertion

[PATCH V2 rdma-next 0/4] Misc update for hns driver

2018-05-23 Thread Wei Hu (Xavier)
3.Address the Jason's comment in reset relevant patch. Wei Hu (Xavier) (4): RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust RDMA/hns: Increase checking CMQ status timeout value RDMA/hns: Add reset process for RoCE in hip08 RDMA/hns: Fix the illegal memory operation wh

[PATCH V2 rdma-next 2/4] RDMA/hns: Increase checking CMQ status timeout value

2018-05-23 Thread Wei Hu (Xavier)
This patch increases checking CMQ status timeout value and uses the same value with NIC driver to avoid deficiency of time. Signed-off-by: Wei Hu (Xavier) Reviewed-by: Leon Romanovsky --- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH V2 rdma-next 3/4] RDMA/hns: Add reset process for RoCE in hip08

2018-05-23 Thread Wei Hu (Xavier)
This patch added reset process for RoCE in hip08. Signed-off-by: Wei Hu (Xavier) --- v1->v2: 1.Delete handle->priv = NULL in hns_roce_hw_v2_uninit_instance. 2.Add hns_roce_hw_v2_reset_notify_init callback function, When RoCE reinit failed in this function, inform NIC

[PATCH V2 rdma-next 1/4] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-23 Thread Wei Hu (Xavier)
This patch modified uar allocation algorithm in hns_roce_uar_alloc function to avoid bitmap exhaust. Signed-off-by: Wei Hu (Xavier) Reviewed-by: Leon Romanovsky --- drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_pd.c | 10 ++ 2 files changed

Re: [PATCH rdma-next 1/5] RDMA/hns: Implement the disassociate_ucontext API

2018-05-23 Thread Wei Hu (Xavier)
On 2018/5/23 4:21, Jason Gunthorpe wrote: > On Sat, May 19, 2018 at 04:24:40PM +0800, Wei Hu (Xavier) wrote: >> >> On 2018/5/17 23:00, Jason Gunthorpe wrote: >>> On Thu, May 17, 2018 at 04:02:49PM +0800, Wei Hu (Xavier) wrote: >>>> This patch Implements t

Re: [PATCH rdma-next 4/5] RDMA/hns: Add reset process for RoCE in hip08

2018-05-23 Thread Wei Hu (Xavier)
On 2018/5/23 11:47, Jason Gunthorpe wrote: > On Wed, May 23, 2018 at 10:54:54AM +0800, Wei Hu (Xavier) wrote: >> >> On 2018/5/23 4:26, Jason Gunthorpe wrote: >>> On Fri, May 18, 2018 at 03:23:00PM +0800, Wei Hu (Xavier) wrote: >>>> On 2018/5/18 12:15, Jason G

Re: [PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-23 Thread Wei Hu (Xavier)
On 2018/5/23 15:00, Leon Romanovsky wrote: > On Wed, May 23, 2018 at 02:49:35PM +0800, Wei Hu (Xavier) wrote: >> >> On 2018/5/23 14:05, Leon Romanovsky wrote: >>> On Thu, May 17, 2018 at 04:02:50PM +0800, Wei Hu (Xavier) wrote: >>>> This patch

Re: [PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-22 Thread Wei Hu (Xavier)
On 2018/5/23 14:05, Leon Romanovsky wrote: > On Thu, May 17, 2018 at 04:02:50PM +0800, Wei Hu (Xavier) wrote: >> This patch modified uar allocation algorithm in hns_roce_uar_alloc >> function to avoid bitmap exhaust. >> >> Signed-off-by: Wei Hu (Xavier) >>

Re: [PATCH rdma-next 5/5] RDMA/hns: Fix the illegal memory operation when cross page

2018-05-22 Thread Wei Hu (Xavier)
On 2018/5/23 14:17, Leon Romanovsky wrote: > On Thu, May 17, 2018 at 04:02:53PM +0800, Wei Hu (Xavier) wrote: >> This patch fixed the potential illegal operation when using the >> extend sge buffer cross page in post send operation. The bug >> will cause the calltrace. &

Re: [PATCH rdma-next 3/5] RDMA/hns: Increase checking CMQ status timeout value

2018-05-22 Thread Wei Hu (Xavier)
On 2018/5/23 14:09, Wei Hu (Xavier) wrote: > > On 2018/5/23 13:49, Leon Romanovsky wrote: >> On Thu, May 17, 2018 at 04:02:51PM +0800, Wei Hu (Xavier) wrote: >>> This patch increases checking CMQ status timeout value and >>> uses the same value with NIC driver t

Re: [PATCH rdma-next 3/5] RDMA/hns: Increase checking CMQ status timeout value

2018-05-22 Thread Wei Hu (Xavier)
On 2018/5/23 13:49, Leon Romanovsky wrote: > On Thu, May 17, 2018 at 04:02:51PM +0800, Wei Hu (Xavier) wrote: >> This patch increases checking CMQ status timeout value and >> uses the same value with NIC driver to avoid deficiency of >> time. >> >&

Re: [PATCH rdma-next 4/5] RDMA/hns: Add reset process for RoCE in hip08

2018-05-22 Thread Wei Hu (Xavier)
On 2018/5/23 10:54, Wei Hu (Xavier) wrote: > > On 2018/5/23 4:26, Jason Gunthorpe wrote: >> On Fri, May 18, 2018 at 03:23:00PM +0800, Wei Hu (Xavier) wrote: >>> On 2018/5/18 12:15, Jason Gunthorpe wrote: >>>> On Fri, May 18, 2018 at 11:28:11AM +0800, Wei Hu (Xav

Re: [PATCH rdma-next 4/5] RDMA/hns: Add reset process for RoCE in hip08

2018-05-22 Thread Wei Hu (Xavier)
On 2018/5/23 4:26, Jason Gunthorpe wrote: > On Fri, May 18, 2018 at 03:23:00PM +0800, Wei Hu (Xavier) wrote: >> >> On 2018/5/18 12:15, Jason Gunthorpe wrote: >>> On Fri, May 18, 2018 at 11:28:11AM +0800, Wei Hu (Xavier) wrote: >>>> On 2018/5/17 23:14, Jason G

Re: [PATCH rdma-next 1/5] RDMA/hns: Implement the disassociate_ucontext API

2018-05-19 Thread Wei Hu (Xavier)
On 2018/5/17 23:00, Jason Gunthorpe wrote: > On Thu, May 17, 2018 at 04:02:49PM +0800, Wei Hu (Xavier) wrote: >> This patch Implements the IB core disassociate_ucontext API. >> >> Signed-off-by: Wei Hu (Xavier) >> drivers/infiniband/

Re: [PATCH rdma-next 4/5] RDMA/hns: Add reset process for RoCE in hip08

2018-05-18 Thread Wei Hu (Xavier)
On 2018/5/18 12:15, Jason Gunthorpe wrote: > On Fri, May 18, 2018 at 11:28:11AM +0800, Wei Hu (Xavier) wrote: >> >> On 2018/5/17 23:14, Jason Gunthorpe wrote: >>> On Thu, May 17, 2018 at 04:02:52PM +0800, Wei Hu (Xavier) wrote: >>>> diff --git a/drivers/infini

Re: [PATCH rdma-next 4/5] RDMA/hns: Add reset process for RoCE in hip08

2018-05-17 Thread Wei Hu (Xavier)
On 2018/5/17 23:14, Jason Gunthorpe wrote: > On Thu, May 17, 2018 at 04:02:52PM +0800, Wei Hu (Xavier) wrote: >> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c >> b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c >> index 86ef15f..e1c44a6 100644 >> +++

[PATCH rdma-next 4/5] RDMA/hns: Add reset process for RoCE in hip08

2018-05-17 Thread Wei Hu (Xavier)
This patch added reset process for RoCE in hip08. Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_cmd.c| 3 ++ drivers/infiniband/hw/hns/hns_roce_device.h | 2 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 60 + drivers/infiniband/hw/hns

[PATCH rdma-next 0/5] Misc update for hns driver

2018-05-17 Thread Wei Hu (Xavier)
This patchset included fixing bug, some optimization, reset process and implementation of the disassociate_ucontext API for hns driver. Wei Hu (Xavier) (5): RDMA/hns: Implement the disassociate_ucontext API RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust RDMA/hns: Increase

[PATCH rdma-next 5/5] RDMA/hns: Fix the illegal memory operation when cross page

2018-05-17 Thread Wei Hu (Xavier)
after dma_alloc_coherent") Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 70 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 1 + 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c

[PATCH rdma-next 3/5] RDMA/hns: Increase checking CMQ status timeout value

2018-05-17 Thread Wei Hu (Xavier)
This patch increases checking CMQ status timeout value and uses the same value with NIC driver to avoid deficiency of time. Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hns

[PATCH rdma-next 2/5] RDMA/hns: Modify uar allocation algorithm to avoid bitmap exhaust

2018-05-17 Thread Wei Hu (Xavier)
This patch modified uar allocation algorithm in hns_roce_uar_alloc function to avoid bitmap exhaust. Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_pd.c | 10 ++ 2 files changed, 7 insertions(+), 4 deletions

[PATCH rdma-next 1/5] RDMA/hns: Implement the disassociate_ucontext API

2018-05-17 Thread Wei Hu (Xavier)
This patch Implements the IB core disassociate_ucontext API. Signed-off-by: Wei Hu (Xavier) --- drivers/infiniband/hw/hns/hns_roce_main.c | 36 +++ 1 file changed, 36 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns

[PATCH V2 rdma-rc 0/3] RDMA/hns: Bug fixes in hns RoCE driver

2017-11-27 Thread Wei Hu (Xavier)
This patch-set introduces three patches to fix the memory related issues. one fixes DMA operation failure when smmu is enabled. the other two patches fixes incorrect usage of dma API that may cause coherency problems. Wei Hu (Xavier) (3): RDMA/hns: Fix the issue of IOVA not page continuous in

[PATCH V2 rdma-rc 1/3] RDMA/hns: Fix the issue of IOVA not page continuous in hip08

2017-11-27 Thread Wei Hu (Xavier)
IOVA should be calculated based on the sg length. Fixes: 3958cc5("RDMA/hns: Configure the MTPT in hip08") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) --- changelog: v1 -> v2: Revi

[PATCH V2 rdma-rc 3/3] RDMA/hns: Get rid of page operation after dma_alloc_coherent

2017-11-27 Thread Wei Hu (Xavier)
the struct of hem in hns RoCE driver. Fixes: 9a44353("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) --- changelog: v1 -> v2: Revi

[PATCH V2 rdma-rc 2/3] RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent

2017-11-27 Thread Wei Hu (Xavier)
3("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) --- changelog: v1 -> v2: Revise the commit message and add Fixes line at Jason's

Re: [PATCH 0/3] RDMA/hns: Bug fixes in hns RoCE driver

2017-11-27 Thread Wei Hu (Xavier)
On 2017/11/28 2:36, Jason Gunthorpe wrote: > On Mon, Nov 27, 2017 at 10:41:21AM +0800, Wei Hu (Xavier) wrote: >> This patch-set introduces three patches to fix about the memory >> related issues. > If these patches are for-rc can you revise the commit message to more > cle

[PATCH 1/3] RDMA/hns: Fix the issue of IOVA not page continuous in hip08

2017-11-26 Thread Wei Hu (Xavier)
If the smmu is enabled, the length of sg obtained from __iommu_map_sg_attrs is not 4kB. When the IOVA is set with the sg dma address, the IOVA will not be page continuous. In order to fix this issue, the IOVA should be calculated based on the sg length. Signed-off-by: Wei Hu (Xavier) Signed-off

[PATCH 3/3] RDMA/hns: Get rid of page operation after dma_alloc_coherent

2017-11-26 Thread Wei Hu (Xavier)
the struct of hem. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) --- drivers/infiniband/hw/hns/hns_roce_hem.c | 25 + drivers/infiniband/hw/hns/hns_roce_hem.h | 1 + 2

[PATCH 0/3] RDMA/hns: Bug fixes in hns RoCE driver

2017-11-26 Thread Wei Hu (Xavier)
This patch-set introduces three patches to fix about the memory related issues. Wei Hu (Xavier) (3): RDMA/hns: Fix the issue of IOVA not page continuous in hip08 RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent RDMA/hns: Get rid of page operation after

[PATCH 2/3] RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent

2017-11-26 Thread Wei Hu (Xavier)
current code, there are incorrect usage as below: dma_alloc_coherent + virt_to_page + vmap. This patch fixes it to get rid of virt_to_page and vmap calls. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-08 Thread Wei Hu (Xavier)
On 2017/11/1 20:26, Robin Murphy wrote: > On 01/11/17 07:46, Wei Hu (Xavier) wrote: >> >> On 2017/10/12 20:59, Robin Murphy wrote: >>> On 12/10/17 13:31, Wei Hu (Xavier) wrote: >>>> On 2017/10/1 0:10, Leon Romanovsky wrote: >>>>> On Sat, Sep

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-08 Thread Wei Hu (Xavier)
On 2017/11/7 23:48, Jason Gunthorpe wrote: > On Tue, Nov 07, 2017 at 10:45:29AM +0800, Wei Hu (Xavier) wrote: > >> We reconstruct the code as below: >> It replaces dma_alloc_coherent with __get_free_pages and >> dma_map_single functions. So, we can vmap s

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-08 Thread Wei Hu (Xavier)
that > in XFS and it led to problems. You need the page allocator + vmap + > invalidate_kernel_vmap_range + flush_kernel_vmap_range to get the > cache flushing right. > > . Hi, Christoph Hellwig Thanks for your suggestion. Regards Wei Hu

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-08 Thread Wei Hu (Xavier)
On 2017/11/7 14:32, Leon Romanovsky wrote: > On Tue, Nov 07, 2017 at 10:45:29AM +0800, Wei Hu (Xavier) wrote: >> >> On 2017/11/1 20:26, Robin Murphy wrote: >>> On 01/11/17 07:46, Wei Hu (Xavier) wrote: >>>> On 2017/10/12 20:59, Robin Murphy wrote: >>&g

  1   2   >