[PATCH 2/3] PCI: Allow specifying devices using a base bus and path of devfns

2018-05-24 Thread Logan Gunthorpe
Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Reviewed-by: Stephen Bates <sba...@raithlin.com> --- Documentation/admin-guide/kernel-parameters.txt | 12 ++- drivers/pci/pci.c | 106 +++- 2 files changed, 112 insertions(+), 6 de

[PATCH 0/3] Add parameter for disabling ACS redirection for P2P

2018-05-24 Thread Logan Gunthorpe
P2P Request Redirect, ACS P2P Completion Redirect and ACS P2P Egress Control bits for the selected devices. This allows P2P traffic between selected bridges and seeing it's done at boot, before IOMMU group creating the IOMMU groups will be created correctly based on the bits. Thanks, Logan Logan

[PATCH 3/3] PCI: Introduce the disable_acs_redir parameter

2018-05-24 Thread Logan Gunthorpe
-off-by: Logan Gunthorpe <log...@deltatee.com> Reviewed-by: Stephen Bates <sba...@raithlin.com> --- Documentation/admin-guide/kernel-parameters.txt | 9 +++ drivers/pci/pci.c | 103 +++- 2 files changed, 110 insertions(+), 2 deleti

[PATCH 1/3] PCI: Make specifying PCI devices in kernel parameters reusable

2018-05-24 Thread Logan Gunthorpe
and extra parentheses). Additionally, make the analogous change to the kernel parameter documentation: Separating the description of how to specify a PCI device into it's own section at the head of the pci= parameter. Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Reviewed-by: Stephen Bate

Re: [Merge tag 'pci-v4.12-changes' of git] 857f864014: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8

2017-06-14 Thread Logan Gunthorpe
Hi Linus, On 14/06/17 03:59 AM, Linus Walleij wrote: > I started to take a stab at it at one point and incorporated some feedback > from Torvalds etc, it's here: > https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?h=chrdev-warn=65e5b1e9eb3f777ab7535b74b490e882eeec79d7

Re: [Merge tag 'pci-v4.12-changes' of git] 857f864014: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8

2017-06-13 Thread Logan Gunthorpe
On 13/06/17 11:00 PM, Greg Kroah-Hartman wrote: > No, don't modify any drivers, do this in the core chardev code. Ok, well then maybe I misunderstood what you originally asked for because I don't see how you can change a fixed allocation to a dynamic one without touching the driver code which

Re: [Merge tag 'pci-v4.12-changes' of git] 857f864014: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8

2017-06-13 Thread Logan Gunthorpe
On 13/06/17 10:35 AM, Greg Kroah-Hartman wrote: > For char devices, I doubt it, but we can't take the chance, which is why > you make it an option. Then, it's enabled for 'allmodconfig' builds, > which helps testers out. Well I took a look at this and it looks like a lot of work to modify all

Re: [Merge tag 'pci-v4.12-changes' of git] 857f864014: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8

2017-06-13 Thread Logan Gunthorpe
On 12/06/17 10:35 PM, Greg Kroah-Hartman wrote: > Or better yet, just turn all char major allocations into dynamic, which > would be really good for test systems. I thought someone proposed > patches for that a long time ago, but I can't find them anymore. That > would be the simplest solution

Re: [Merge tag 'pci-v4.12-changes' of git] 857f864014: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8

2017-06-13 Thread Logan Gunthorpe
On 13/06/17 05:48 AM, Alan Cox wrote: > If you dump the list of majors and drivers do they all look valid or is > there any corruption or repetition that looks odd (wondering if we've > got too many devices or a leak) ? They look valid to me. Logan Character devices: 1 mem 4 /dev/vc/0

Re: [Merge tag 'pci-v4.12-changes' of git] 857f864014: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8

2017-06-12 Thread Logan Gunthorpe
On 12/06/17 10:18 PM, Greg Kroah-Hartman wrote: > What test causes so many major numbers to be allocated? Is this > in-kernel test code? Do you really have a system that requires so many > different drivers that all want a dynamic char major? This is a 0day kernel robot test. I'm not sure the

Re: [PATCH v7 0/4] New Microsemi PCI Switch Management Driver

2017-03-09 Thread Logan Gunthorpe
On 09/03/17 12:55 PM, Bjorn Helgaas wrote: > Applied to pci/switchtec for v4.12, thanks! Great! Thanks so much! Logan -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH v6 2/4] switchtec: Add user interface documentation

2017-03-02 Thread Logan Gunthorpe
This adds standard documentation for the sysfs switchtec attributes and a RST formatted text file which documents the char device interface. Jonathan Corbet has indicated he will move this to a new user-space developer documentation book once it's created. Signed-off-by: Logan Gunthorpe <

[PATCH v6 0/4] New Microsemi PCI Switch Management Driver

2017-03-02 Thread Logan Gunthorpe
review process. The patch is based off of the v4.10-rc6 release. Thanks for your review, Logan [1] https://www.spinics.net/lists/linux-pci/msg56897.html [2] https://github.com/sbates130272/switchtec-user Logan Gunthorpe (4): MicroSemi Switchtec management interface driver switchtec: Add user

[PATCH v7 4/4] switchtec: Add IOCTLs to the Switchtec driver

2017-03-02 Thread Logan Gunthorpe
This patch introduces a couple of special IOCTLs which are provided to: * Inform userspace of firmware partition locations * Pass event counts and allow userspace to wait on events * Translate between PFF numbers used by the switch to port numbers. Signed-off-by: Logan Gunthorpe <

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

2017-03-02 Thread Logan Gunthorpe
atures may be added in the future. [1] https://github.com/sbates130272/switchtec-user [2] https://github.com/linux-nvme/nvme-cli Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Signed-off-by: Stephen Bates <stephen.ba...@microsemi.com> Tested-by: Krishna Dhulipala <krish...@fb.co

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

2017-03-02 Thread Logan Gunthorpe
atures may be added in the future. [1] https://github.com/sbates130272/switchtec-user [2] https://github.com/linux-nvme/nvme-cli Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Signed-off-by: Stephen Bates <stephen.ba...@microsemi.com> Tested-by: Krishna Dhulipala <krish...@fb.co

[PATCH v6 3/4] switchtec: Add sysfs attributes to the Switchtec driver

2017-03-02 Thread Logan Gunthorpe
This patch adds a few read-only sysfs attributes which provide some device information that is exposed from the devices. Primarily component and device names and versions. These are documented in Documentation/ABI/testing/sysfs-class-switchtec. Signed-off-by: Logan Gunthorpe <log...@deltatee.

Re: [PATCH v6 0/4] New Microsemi PCI Switch Management Driver

2017-03-02 Thread Logan Gunthorpe
Hey, Ah, sorry, sorry. I noticed another minor mistake. I'll send a v7 in a second. Thanks, Logan On 02/03/17 04:07 PM, Logan Gunthorpe wrote: > Hi, > > Hopefully this is the last change necessary. The new code to handle > unbind follows Jason's suggestions and is a lot easier to

[PATCH v6 4/4] switchtec: Add IOCTLs to the Switchtec driver

2017-03-02 Thread Logan Gunthorpe
This patch introduces a couple of special IOCTLs which are provided to: * Inform userspace of firmware partition locations * Pass event counts and allow userspace to wait on events * Translate between PFF numbers used by the switch to port numbers. Signed-off-by: Logan Gunthorpe <

[PATCH v7 2/4] switchtec: Add user interface documentation

2017-03-02 Thread Logan Gunthorpe
This adds standard documentation for the sysfs switchtec attributes and a RST formatted text file which documents the char device interface. Jonathan Corbet has indicated he will move this to a new user-space developer documentation book once it's created. Signed-off-by: Logan Gunthorpe <

[PATCH v7 0/4] New Microsemi PCI Switch Management Driver

2017-03-02 Thread Logan Gunthorpe
://www.spinics.net/lists/linux-pci/msg56897.html [2] https://github.com/sbates130272/switchtec-user Logan Gunthorpe (4): MicroSemi Switchtec management interface driver switchtec: Add user interface documentation switchtec: Add sysfs attributes to the Switchtec driver switchtec: Add IOCTLs

[PATCH v7 3/4] switchtec: Add sysfs attributes to the Switchtec driver

2017-03-02 Thread Logan Gunthorpe
This patch adds a few read-only sysfs attributes which provide some device information that is exposed from the devices. Primarily component and device names and versions. These are documented in Documentation/ABI/testing/sysfs-class-switchtec. Signed-off-by: Logan Gunthorpe <log...@deltatee.

Re: [PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-03-01 Thread Logan Gunthorpe
On 01/03/17 05:23 PM, Logan Gunthorpe wrote: > Because of how poll works, I don't see how I can just hold a semaphore > inside every fops call like the tpm code does. On 01/03/17 04:58 PM, Jason Gunthorpe wrote: > Both infiniband and TPM have the 'detach' flavour of unplug where t

Re: [PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-03-01 Thread Logan Gunthorpe
On 01/03/17 04:58 PM, Jason Gunthorpe wrote: > On Wed, Mar 01, 2017 at 03:49:04PM -0700, Logan Gunthorpe wrote: > >> Seems to me like an elegant solution would be to implement a 'cdev_kill' >> function which could kill all the processes using a cdev. Thus, during >> a

Re: [PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-03-01 Thread Logan Gunthorpe
On 01/03/17 05:32 PM, Bjorn Helgaas wrote: > It's not a perfect fit in drivers/pci because it's not bus > infrastructure and I don't want to be the default maintainer of it, > but I agree there's not really an alternative that's clearly better, > so let's leave it where it is for now. Sounds

Re: [PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-03-01 Thread Logan Gunthorpe
On 01/03/17 03:59 PM, Keith Busch wrote: > Okay, I see. Was mistakenliy looking at v4. The v5 looks right. Great! Thanks for reviewing that for me. Logan -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-03-01 Thread Logan Gunthorpe
) and unless someone can describe how it's wrong or a better solution I'd rather see it merged as is. If and when a better approach arrives I'd happily patch it to improve the situation. Logan On 01/03/17 03:24 PM, Logan Gunthorpe wrote: > > > On 01/03/17 02:41 PM, Bjorn Helgaas wrote: &

Re: [PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-03-01 Thread Logan Gunthorpe
On 01/03/17 03:26 PM, Keith Busch wrote: > I think this is from using the managed device resource API to request the > irq actions. The scope of the resource used to be tied to the pci_dev's > dev, but now it's the new switchec class dev, which has a different > lifetime while open references

Re: [PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-03-01 Thread Logan Gunthorpe
On 01/03/17 02:41 PM, Bjorn Helgaas wrote: > I don't think this is indicating a bug in the PCI core (although I do > think a BUG_ON() here is an excessive response). I think it's an > indication that the driver didn't disconnect its ISR. Without more > details of the failure it's hard to tell

Re: [PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-02-28 Thread Logan Gunthorpe
> This driver doesn't have anything to do with the PCI core, other than > using the pci_register_driver() interface (just like all other drivers > for PCI-connected devices), so drivers/pci doesn't really feel like > the right place for it. Putting it in drivers/pci leads to the sort > of

[PATCH v5 2/4] switchtec: Add user interface documentation

2017-02-25 Thread Logan Gunthorpe
This adds standard documentation for the sysfs switchtec attributes and a RST formatted text file which documents the char device interface. Jonathan Corbet has indicated he will move this to a new user-space developer documentation book once it's created. Signed-off-by: Logan Gunthorpe <

[PATCH v5 0/4] New Microsemi PCI Switch Management Driver

2017-02-25 Thread Logan Gunthorpe
[2] https://github.com/sbates130272/switchtec-user Logan Gunthorpe (4): MicroSemi Switchtec management interface driver switchtec: Add user interface documentation switchtec: Add sysfs attributes to the Switchtec driver switchtec: Add IOCTLs to the Switchtec driver Documentation/ABI

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

2017-02-25 Thread Logan Gunthorpe
atures may be added in the future. [1] https://github.com/sbates130272/switchtec-user [2] https://github.com/linux-nvme/nvme-cli Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Signed-off-by: Stephen Bates <stephen.ba...@microsemi.com> Tested-by: Krishna Dhulipala <krish...@fb.co

[PATCH v5 4/4] switchtec: Add IOCTLs to the Switchtec driver

2017-02-25 Thread Logan Gunthorpe
This patch introduces a couple of special IOCTLs which are provided to: * Inform userspace of firmware partition locations * Pass event counts and allow userspace to wait on events * Translate between PFF numbers used by the switch to port numbers. Signed-off-by: Logan Gunthorpe <

[PATCH v4 3/4] switchtec: Add sysfs attributes to the Switchtec driver

2017-02-24 Thread Logan Gunthorpe
This patch adds a few read-only sysfs attributes which provide some device information that is exposed from the devices. Primarily component and device names and versions. These are documented in Documentation/ABI/testing/sysfs-class-switchtec. Signed-off-by: Logan Gunthorpe <log...@deltatee.

[PATCH v4 4/4] switchtec: Add IOCTLs to the Switchtec driver

2017-02-24 Thread Logan Gunthorpe
This patch introduces a couple of special IOCTLs which are provided to: * Inform userspace of firmware partition locations * Pass event counts and allow userspace to wait on events * Translate between PFF numbers used by the switch to port numbers. Signed-off-by: Logan Gunthorpe <

[PATCH v4 0/4] New Microsemi PCI Switch Management Driver

2017-02-24 Thread Logan Gunthorpe
to see this work included in either 4.11 or 4.12 assuming a smooth review process. The patch is based off of the v4.10-rc6 release. Thanks for your review, Logan [1] https://www.spinics.net/lists/linux-pci/msg56897.html [2] https://github.com/sbates130272/switchtec-user Logan Gunthorpe (4

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

2017-02-24 Thread Logan Gunthorpe
atures may be added in the future. [1] https://github.com/sbates130272/switchtec-user [2] https://github.com/linux-nvme/nvme-cli Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Signed-off-by: Stephen Bates <stephen.ba...@microsemi.com> Tested-by: Krishna Dhulipala <krish...@fb.co

[PATCH v4 2/4] switchtec: Add user interface documentation

2017-02-24 Thread Logan Gunthorpe
This adds standard documentation for the sysfs switchtec attributes and a RST formatted text file which documents the char device interface. Jonathan Corbet has indicated he will move this to a new user-space developer documentation book once it's created. Signed-off-by: Logan Gunthorpe <

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,

[PATCH v3 4/4] switchtec: Add IOCTLs to the Switchtec driver

2017-02-23 Thread Logan Gunthorpe
This patch introduces a couple of special IOCTLs which are provided to: * Inform userspace of firmware partition locations * Pass event counts and allow userspace to wait on events * Translate between PFF numbers used by the switch to port numbers. Signed-off-by: Logan Gunthorpe <

[PATCH v3 2/4] switchtec: Add user interface documentation

2017-02-23 Thread Logan Gunthorpe
This adds standard documentation for the sysfs switchtec attributes and a RST formatted text file which documents the char device interface. Jonathan Corbet has indicated he will move this to a new user-space developer documentation book once it's created. Signed-off-by: Logan Gunthorpe <

[PATCH v3 0/4] New Microsemi PCI Switch Management Driver

2017-02-23 Thread Logan Gunthorpe
a smooth review process. The patch is based off of the v4.10-rc6 release. Thanks for your review, Logan [1] https://www.spinics.net/lists/linux-pci/msg56897.html [2] https://github.com/sbates130272/switchtec-user -- Logan Gunthorpe (4): MicroSemi Switchtec management interface driver switchtec

[PATCH v3 3/4] switchtec: Add sysfs attributes to the Switchtec driver

2017-02-23 Thread Logan Gunthorpe
This patch adds a few read-only sysfs attributes which provide some device information that is exposed from the devices. Primarily component and device names and versions. These are documented in Documentation/ABI/testing/sysfs-class-switchtec. Signed-off-by: Logan Gunthorpe <log...@deltatee.

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

2017-02-23 Thread Logan Gunthorpe
atures may be added in the future. [1] https://github.com/sbates130272/switchtec-user [2] https://github.com/linux-nvme/nvme-cli Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Signed-off-by: Stephen Bates <stephen.ba...@microsemi.com> Tested-by: Krishna Dhulipala <krish...@fb.co

Re: [PATCH v2 3/4] switchtec: Add sysfs attributes to the Switchtec driver

2017-02-23 Thread Logan Gunthorpe
On 23/02/17 03:43 PM, Bjorn Helgaas wrote: > This path seems a little generic. I don't see other cases where a > product brand name ("Switchtec") appears at the top level of > /sys/class/... Ok, well we are certainly open to suggestions, but there isn't really a generic version of this device

Re: [PATCH v2 0/4] New Microsemi PCI Switch Management Driver

2017-02-23 Thread Logan Gunthorpe
03:14 PM, Bjorn Helgaas wrote: > On Thu, Feb 23, 2017 at 01:36:51PM -0700, Logan Gunthorpe wrote: >> Hello, >> >> We're still waiting on any kind of response from Bjorn. (If you're >> listening please say something!) >> >> Does anyone have any sugge

Re: [PATCH v2 0/4] New Microsemi PCI Switch Management Driver

2017-02-23 Thread Logan Gunthorpe
On 23/02/17 01:51 PM, Sinan Kaya wrote: > You'll want to be careful during the merge window (these days) as the > maintainer is usually busy with code delivery. You can't rush your code in at > the last minute. Thanks for the advice, we will continue to wait. However, I would say we've been

Re: [PATCH v2 0/4] New Microsemi PCI Switch Management Driver

2017-02-23 Thread Logan Gunthorpe
another route? In the end, it's just a fairly basic driver and doesn't touch any core PCI functionality and we've had a fair amount of review from other kernel contributors, all of which we've addressed. Thanks, Logan On 17/02/17 01:36 PM, Logan Gunthorpe wrote: > Hi Bjorn, > > Can

Re: [PATCH] switchtec: cleanup cdev init

2017-02-19 Thread Logan Gunthorpe
On 19/02/17 02:43 PM, Dan Williams wrote: > Is this race present for all file operations? I've only seen it with > mmap() and late faults. So if these other drivers do not support mmap > it's not clear they can trigger the failure. I don't see how it's related to mmap only. I think there's a

Re: [PATCH] switchtec: cleanup cdev init

2017-02-18 Thread Logan Gunthorpe
numerous examples are fixed up. Thanks, Logan [1] https://lkml.org/lkml/2017/2/10/589 [2] https://lkml.org/lkml/2017/2/13/700 On 10/02/17 10:57 AM, Logan Gunthorpe wrote: > Per a suggestion from Greg Kroah-Hartman [1], don't set the cdev's > kobject parent. This allows us

Re: [PATCH v2 0/4] New Microsemi PCI Switch Management Driver

2017-02-17 Thread Logan Gunthorpe
concerns you may have, just please let us know. Thanks, Logan On 02/02/17 11:05 AM, Logan Gunthorpe wrote: > Changes since v1: > > * Rebased onto 4.10-rc6 (cleanly) > * Split the patch into a few more easily digestible patches (as > suggested by Greg Kroah-Hartman) > *

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

[PATCH] switchtec: cleanup cdev init

2017-02-10 Thread Logan Gunthorpe
Per a suggestion from Greg Kroah-Hartman [1], don't set the cdev's kobject parent. This allows us to use device_register instead of init and add. [1] https://lkml.org/lkml/2017/2/10/370 --- drivers/pci/switch/switchtec.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff

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 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->

[PATCH v2 2/4] switchtec: Add user interface documentation

2017-02-02 Thread Logan Gunthorpe
This adds standard documentation for the sysfs switchtec attributes and a RST formatted text file which documents the char device interface. Jonathan Corbet has indicated he will move this to a new user-space developer documentation book once it's created. Signed-off-by: Logan Gunthorpe <

[PATCH v2 0/4] New Microsemi PCI Switch Management Driver

2017-02-02 Thread Logan Gunthorpe
://www.spinics.net/lists/linux-pci/msg56897.html [2] https://github.com/sbates130272/switchtec-user -- Logan Gunthorpe (4): MicroSemi Switchtec management interface driver switchtec: Add user interface documentation switchtec: Add sysfs attributes to the Switchtec driver switchtec: Add IOCTLs

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

2017-02-02 Thread Logan Gunthorpe
atures may be added in the future. [1] https://github.com/sbates130272/switchtec-user [2] https://github.com/linux-nvme/nvme-cli Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Signed-off-by: Stephen Bates <stephen.ba...@microsemi.com> --- MAINTAINERS|8

[PATCH v2 4/4] switchtec: Add IOCTLs to the Switchtec driver

2017-02-02 Thread Logan Gunthorpe
This patch introduces a couple of special IOCTLs which are provided to: * Inform userspace of firmware partition locations * Pass event counts and allow userspace to wait on events * Translate between PFF numbers used by the switch to port numbers. Signed-off-by: Logan Gunthorpe <

[PATCH v2 3/4] switchtec: Add sysfs attributes to the Switchtec driver

2017-02-02 Thread Logan Gunthorpe
This patch adds a few read-only sysfs attributes which provide some device information that is exposed from the devices. Primarily component and device names and versions. These are documented in Documentation/ABI/testing/sysfs-class-switchtec. Signed-off-by: Logan Gunthorpe <log...@deltatee.

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

2017-02-02 Thread Logan Gunthorpe
On 01/02/17 05:10 AM, Emil Velikov wrote: > You can keep it roughly as-is if you're ~reasonably certain one won't > change it in the future. I've made the change anyway. I think it's better now. > Some teams frown upon adding new IOCTL(s) where existing ones can be > made backward/forward

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

2017-01-31 Thread Logan Gunthorpe
On 31/01/17 11:57 AM, Greg Kroah-Hartman wrote: > Sorry, it was probably me :) Nope, it was Christoph Hellwig. I don't mind changing it. It's just hard to know what's expected all the time. > Why do you need this? Wherever you put it, it should be built as part > of the online kernel

[PATCH 0/1] DRAFT: New Microsemi PCI Switch Management Driver

2017-01-31 Thread Logan Gunthorpe
of IOCTLs to the switchtec device * A number of miscelaneous bug fixes -- Logan Gunthorpe (1): MicroSemi Switchtec management interface driver Documentation/ABI/testing/sysfs-class-switchtec | 96 ++ Documentation/ioctl/ioctl-number.txt|1 + Documentation/switchtec.txt

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

2017-01-31 Thread Logan Gunthorpe
On 31/01/17 10:26 AM, Greg Kroah-Hartman wrote: > That's one big patch to review, would you want to do that? Sorry, will do. > Can you break it up into smaller parts? At least put the documentation > separately, right? Ha, funny. Last time I sent a patch someone asked for the documentation

[PATCH 1/1] MicroSemi Switchtec management interface driver

2017-01-31 Thread Logan Gunthorpe
/switchtec-user [2] https://github.com/linux-nvme/nvme-cli Signed-off-by: Logan Gunthorpe <log...@deltatee.com> Signed-off-by: Stephen Bates <stephen.ba...@microsemi.com> --- Documentation/ABI/testing/sysfs-class-switchtec | 96 ++ Documentation/ioctl/ioctl-number.txt|

Re: [RFC 1/1] MicroSemi Switchtec management interface driver

2016-12-19 Thread Logan Gunthorpe
On 19/12/16 10:02 AM, Keith Busch wrote: > Some of this would be simplified if you use the managed device API's: > devm_request_irq, pcim_enable_device, pcim_iomap, etc... Thanks Keith, I'll look into using those. Logan -- To unsubscribe from this list: send the line "unsubscribe linux-doc"

Re: [RFC 1/1] MicroSemi Switchtec management interface driver

2016-12-18 Thread Logan Gunthorpe
Hi Greg, Thanks for the quick review! On 18/12/16 12:51 AM, Greg Kroah-Hartman wrote: On Sat, Dec 17, 2016 at 10:09:22AM -0700, Logan Gunthorpe wrote: +struct switchtec_dev { + struct pci_dev *pdev; + struct msix_entry *msix; + struct device *dev; + struct kref kref