RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
.org; linux- > ker...@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the > HNAE3 framework > > On Sat, 17 Jun 2017 18:24:25 +0100 > Salil Mehta <salil.me...@huawei.com> wrote: > > > + > > +/* This struct defines

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
.org; linux- > ker...@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the > HNAE3 framework > > On Sat, 17 Jun 2017 18:24:25 +0100 > Salil Mehta wrote: > > > + > > +/* This struct defines the operation on th

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
er...@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the > HNAE3 framework > > Hi, > On Sat, Jun 17, 2017 at 06:24:25PM +0100, Salil Mehta wrote: > >+ * Unregister client from ae_dev > >+ * start() > >+ * Enable th

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
er...@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the > HNAE3 framework > > Hi, > On Sat, Jun 17, 2017 at 06:24:25PM +0100, Salil Mehta wrote: > >+ * Unregister client from ae_dev > >+ * start() > >+ * Enable th

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
er...@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the > HNAE3 framework > > > +static int __init hnae3_init(void) > > +{ > > + return 0; > > +} > > + > > +static void __exit hnae3_exit(void) > > +

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
er...@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the > HNAE3 framework > > > +static int __init hnae3_init(void) > > +{ > > + return 0; > > +} > > + > > +static void __exit hnae3_exit(void) > > +

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
.org; linux- > ker...@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the > HNAE3 framework > > > +static void hnae3_list_add(spinlock_t *lock, struct list_head *node, > > + struct list_head *head) > > +{ > > + uns

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
.org; linux- > ker...@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the > HNAE3 framework > > > +static void hnae3_list_add(spinlock_t *lock, struct list_head *node, > > + struct list_head *head) > > +{ > > + uns

Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-19 Thread Stephen Hemminger
On Sat, 17 Jun 2017 18:24:25 +0100 Salil Mehta wrote: > + > +/* This struct defines the operation on the handle. > + * > + * init_ae_dev(): (mandatory) > + * Get PF configure from pci_dev and initialize PF hardware > + * uninit_ae_dev() > + * Disable PF device and

Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-19 Thread Stephen Hemminger
On Sat, 17 Jun 2017 18:24:25 +0100 Salil Mehta wrote: > + > +/* This struct defines the operation on the handle. > + * > + * init_ae_dev(): (mandatory) > + * Get PF configure from pci_dev and initialize PF hardware > + * uninit_ae_dev() > + * Disable PF device and release PF resource > + *

Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-18 Thread Bo Yu
Hi, On Sat, Jun 17, 2017 at 06:24:25PM +0100, Salil Mehta wrote: + * Unregister client from ae_dev + * start() + * Enable the hardware + * stop() + * Disable the hardware + * get_status() + * Get the carrier state of the back channel of the handle, 1 for ok, 0 for + * non-ok + *

Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-18 Thread Bo Yu
Hi, On Sat, Jun 17, 2017 at 06:24:25PM +0100, Salil Mehta wrote: + * Unregister client from ae_dev + * start() + * Enable the hardware + * stop() + * Disable the hardware + * get_status() + * Get the carrier state of the back channel of the handle, 1 for ok, 0 for + * non-ok + *

Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-18 Thread Andrew Lunn
> +static int __init hnae3_init(void) > +{ > + return 0; > +} > + > +static void __exit hnae3_exit(void) > +{ > +} > + > +module_init(hnae3_init); > +module_exit(hnae3_exit); I think init and exit functions are optional. Since your's don't do anything useful, please try without them.

Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-18 Thread Andrew Lunn
> +static int __init hnae3_init(void) > +{ > + return 0; > +} > + > +static void __exit hnae3_exit(void) > +{ > +} > + > +module_init(hnae3_init); > +module_exit(hnae3_exit); I think init and exit functions are optional. Since your's don't do anything useful, please try without them.

Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-17 Thread Andrew Lunn
> +static void hnae3_list_add(spinlock_t *lock, struct list_head *node, > +struct list_head *head) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(lock, flags); > + list_add_tail(node, head); > + spin_unlock_irqrestore(lock, flags); > +} > + >

Re: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-17 Thread Andrew Lunn
> +static void hnae3_list_add(spinlock_t *lock, struct list_head *node, > +struct list_head *head) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(lock, flags); > + list_add_tail(node, head); > + spin_unlock_irqrestore(lock, flags); > +} > + >

[PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-17 Thread Salil Mehta
This patch adds the support of the HNAE3 (Hisilicon Network Acceleration Engine 3) framework support to the HNS3 driver. Framework facilitates clients like ENET(HNS3 Ethernet Driver), RoCE and user-space Ethernet drivers (like ODP etc.) to register with HNAE3 devices and their associated

[PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-06-17 Thread Salil Mehta
This patch adds the support of the HNAE3 (Hisilicon Network Acceleration Engine 3) framework support to the HNS3 driver. Framework facilitates clients like ENET(HNS3 Ethernet Driver), RoCE and user-space Ethernet drivers (like ODP etc.) to register with HNAE3 devices and their associated