From mboxrd@z Thu Jan 1 00:00:00 1970 From: Salil Mehta Subject: RE: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock Date: Wed, 14 Sep 2016 02:09:37 +0000 Message-ID: References: <1473417051-99560-1-git-send-email-salil.mehta@huawei.com> <1473417051-99560-11-git-send-email-salil.mehta@huawei.com> <20160913065028.GR8812@leon.nu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <20160913065028.GR8812-2ukJVAZIZ/Y@public.gmane.org> Content-Language: en-US Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Leon Romanovsky Cc: "dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org" , "Huwei (Xavier)" , oulijun , "Zhuangyuzeng (Yisen)" , "xuwei (O)" , "mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Linuxarm , "Huangdongdong (Donald)" List-Id: linux-rdma@vger.kernel.org > -----Original Message----- > From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma- > owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Leon Romanovsky > Sent: Tuesday, September 13, 2016 7:50 AM > To: Salil Mehta > Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > xuwei (O); mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; > linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Linuxarm; Huangdongdong (Donald) > Subject: Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe > lock > > On Fri, Sep 09, 2016 at 06:30:41PM +0800, Salil Mehta wrote: > > From: Lijun Ou > > > > This lock will be used in query port interface, and will be called > > while IB device was registered to OFED frame. So, the lock of iboe > > must be initiated before IB device was registered. > > Sorry, > what did you mean by writing "OFED frame"? It is a typo. It was OFED framework but I guess more appropriate word might have been 'IB core' layer of Infiniband. Will fix this. Thanks! Best regards Salil > > > > > Signed-off-by: Lijun Ou > > Signed-off-by: Dongdong Huang(Donald) > > Reviewed-by: Wei Hu (Xavier) > > Signed-off-by: Salil Mehta > > --- > > drivers/infiniband/hw/hns/hns_roce_main.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c > b/drivers/infiniband/hw/hns/hns_roce_main.c > > index 2704076..4721c0c 100644 > > --- a/drivers/infiniband/hw/hns/hns_roce_main.c > > +++ b/drivers/infiniband/hw/hns/hns_roce_main.c > > @@ -615,6 +615,7 @@ static int hns_roce_register_device(struct > hns_roce_dev *hr_dev) > > struct device *dev = &hr_dev->pdev->dev; > > > > iboe = &hr_dev->iboe; > > + spin_lock_init(&iboe->lock); > > > > ib_dev = &hr_dev->ib_dev; > > strlcpy(ib_dev->name, "hisi_%d", IB_DEVICE_NAME_MAX); > > @@ -701,8 +702,6 @@ static int hns_roce_register_device(struct > hns_roce_dev *hr_dev) > > goto error_failed_setup_mtu_gids; > > } > > > > - spin_lock_init(&iboe->lock); > > - > > iboe->nb.notifier_call = hns_roce_netdev_event; > > ret = register_netdevice_notifier(&iboe->nb); > > if (ret) { > > -- > > 1.7.9.5 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-rdma" > in > > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755218AbcINCJ4 convert rfc822-to-8bit (ORCPT ); Tue, 13 Sep 2016 22:09:56 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:3413 "EHLO lhrrgout.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbcINCJy (ORCPT ); Tue, 13 Sep 2016 22:09:54 -0400 From: Salil Mehta To: Leon Romanovsky CC: "dledford@redhat.com" , "Huwei (Xavier)" , oulijun , "Zhuangyuzeng (Yisen)" , "xuwei (O)" , "mehta.salil.lnk@gmail.com" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linuxarm , "Huangdongdong (Donald)" Subject: RE: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock Thread-Topic: [PATCH for-next 10/20] IB/hns: Modify the init of iboe lock Thread-Index: AQHSCoLTJD2pVYtpz0yXc+sLESa3wKB28HAAgAFUEhA= Date: Wed, 14 Sep 2016 02:09:37 +0000 Message-ID: References: <1473417051-99560-1-git-send-email-salil.mehta@huawei.com> <1473417051-99560-11-git-send-email-salil.mehta@huawei.com> <20160913065028.GR8812@leon.nu> In-Reply-To: <20160913065028.GR8812@leon.nu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.137.175] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.57D8B169.0151,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d94217d3799835cbe4e7b566c1aaf206 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma- > owner@vger.kernel.org] On Behalf Of Leon Romanovsky > Sent: Tuesday, September 13, 2016 7:50 AM > To: Salil Mehta > Cc: dledford@redhat.com; Huwei (Xavier); oulijun; Zhuangyuzeng (Yisen); > xuwei (O); mehta.salil.lnk@gmail.com; linux-rdma@vger.kernel.org; > linux-kernel@vger.kernel.org; Linuxarm; Huangdongdong (Donald) > Subject: Re: [PATCH for-next 10/20] IB/hns: Modify the init of iboe > lock > > On Fri, Sep 09, 2016 at 06:30:41PM +0800, Salil Mehta wrote: > > From: Lijun Ou > > > > This lock will be used in query port interface, and will be called > > while IB device was registered to OFED frame. So, the lock of iboe > > must be initiated before IB device was registered. > > Sorry, > what did you mean by writing "OFED frame"? It is a typo. It was OFED framework but I guess more appropriate word might have been 'IB core' layer of Infiniband. Will fix this. Thanks! Best regards Salil > > > > > Signed-off-by: Lijun Ou > > Signed-off-by: Dongdong Huang(Donald) > > Reviewed-by: Wei Hu (Xavier) > > Signed-off-by: Salil Mehta > > --- > > drivers/infiniband/hw/hns/hns_roce_main.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c > b/drivers/infiniband/hw/hns/hns_roce_main.c > > index 2704076..4721c0c 100644 > > --- a/drivers/infiniband/hw/hns/hns_roce_main.c > > +++ b/drivers/infiniband/hw/hns/hns_roce_main.c > > @@ -615,6 +615,7 @@ static int hns_roce_register_device(struct > hns_roce_dev *hr_dev) > > struct device *dev = &hr_dev->pdev->dev; > > > > iboe = &hr_dev->iboe; > > + spin_lock_init(&iboe->lock); > > > > ib_dev = &hr_dev->ib_dev; > > strlcpy(ib_dev->name, "hisi_%d", IB_DEVICE_NAME_MAX); > > @@ -701,8 +702,6 @@ static int hns_roce_register_device(struct > hns_roce_dev *hr_dev) > > goto error_failed_setup_mtu_gids; > > } > > > > - spin_lock_init(&iboe->lock); > > - > > iboe->nb.notifier_call = hns_roce_netdev_event; > > ret = register_netdevice_notifier(&iboe->nb); > > if (ret) { > > -- > > 1.7.9.5 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-rdma" > in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html