Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-24 Thread Logan Gunthorpe
Hey Bjorn, Thanks for the thorough review. It definitely helped a lot to make the code as good as it can be. I've made all of the changes you suggested. I'm just going to do a bit more testing and then post a v4. See my responses to all of your feedback bellow. Logan On 23/02/17 05:35 PM,

Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-23 Thread Bjorn Helgaas
[+cc Peter, Ingo, Arnaldo, Alexander, Christoph] On Thu, Feb 02, 2017 at 11:06:00AM -0700, Logan Gunthorpe wrote: > Microsemi's "Switchtec" line of PCI switch devices is already well > supported by the kernel with standard PCI switch drivers. However, the > Switchtec device advertises a special

Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-10 Thread Logan Gunthorpe
On 10/02/17 10:09 AM, Greg Kroah-Hartman wrote: > Sure, or just wait for these to be applied to the PCI tree and then send > a follow-on patch. It's up to Bjorn really, as to what he wants. Ok, I sent a working follow-on patch to this thread. @Bjorn: I'm happy to send the patches however you

Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-10 Thread Logan Gunthorpe
On 10/02/17 09:55 AM, Greg Kroah-Hartman wrote: > Yes, but try it yourself to verify it really is correct :) Yes, of course... turns out it wasn't. I accidentally refereed to dev before I assigned it. I had mainly just wanted your feedback to ensure that switching to device_register made sense.

Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-10 Thread Greg Kroah-Hartman
On Fri, Feb 10, 2017 at 10:03:10AM -0700, Logan Gunthorpe wrote: > > > On 10/02/17 09:55 AM, Greg Kroah-Hartman wrote: > > Yes, but try it yourself to verify it really is correct :) > > Yes, of course... turns out it wasn't. I accidentally refereed to dev > before I assigned it. I had mainly

Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-10 Thread Greg Kroah-Hartman
On Fri, Feb 10, 2017 at 09:48:37AM -0700, Logan Gunthorpe wrote: > Hey Greg, > > Thanks so much for the review. > > On 10/02/17 07:51 AM, Greg Kroah-Hartman wrote: > > On Thu, Feb 02, 2017 at 11:06:00AM -0700, Logan Gunthorpe wrote: > >> + cdev = >cdev; > >> + cdev_init(cdev, _fops); > >> +

Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-10 Thread Logan Gunthorpe
Hey Greg, Thanks so much for the review. On 10/02/17 07:51 AM, Greg Kroah-Hartman wrote: > On Thu, Feb 02, 2017 at 11:06:00AM -0700, Logan Gunthorpe wrote: >> +cdev = >cdev; >> +cdev_init(cdev, _fops); >> +cdev->owner = THIS_MODULE; >> +cdev->kobj.parent = >kobj; > > Minor nit,

Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-10 Thread Greg Kroah-Hartman
On Thu, Feb 02, 2017 at 11:06:00AM -0700, Logan Gunthorpe wrote: > Microsemi's "Switchtec" line of PCI switch devices is already well > supported by the kernel with standard PCI switch drivers. However, the > Switchtec device advertises a special management endpoint with a separate > PCI function

Re: [PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-10 Thread Greg Kroah-Hartman
On Thu, Feb 02, 2017 at 11:06:00AM -0700, Logan Gunthorpe wrote: > + cdev = >cdev; > + cdev_init(cdev, _fops); > + cdev->owner = THIS_MODULE; > + cdev->kobj.parent = >kobj; Minor nit, the kobject in a cdev is unlike any other kobject you have ever seen, don't mess with it, it's

[PATCH v2 1/4] MicroSemi Switchtec management interface driver

2017-02-02 Thread Logan Gunthorpe
Microsemi's "Switchtec" line of PCI switch devices is already well supported by the kernel with standard PCI switch drivers. However, the Switchtec device advertises a special management endpoint with a separate PCI function address and class code. This endpoint enables some additional