Skip to contentSkip to conversation

Change pci_enable_sriov, pci_disable_sriov and pci_reset_function to non-GPL symbol.

PATCH In review Neo Jia 3 participants 6 messages Nov 15, 2017 – Nov 25, 2017 PCI

lore
Share & tools
lore

Neo Jia

author
#0 lore raw

PATCH 1/1 Change pci_enable_sriov, pci_disable_sriov and pci_reset_function to non-GPL symbol.

This will allow proprietary linux drivers to adopt SR-IOV spec from PCI-SIG, also switch pci_reset_function to non-GPL symbol as it mainly does pci config space access per spec.

---
 drivers/pci/iov.c | 4 ++--
 drivers/pci/pci.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/pci/iov.c +2 -2
index 6bacb8995e96..ecc6e7cddc57 100644
@@ -673,7 +673,7 @@ int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn)
 
 	return sriov_enable(dev, nr_virtfn);
 }
-EXPORT_SYMBOL_GPL(pci_enable_sriov);
+EXPORT_SYMBOL(pci_enable_sriov);
 
 /**
  * pci_disable_sriov - disable the SR-IOV capability
@@ -688,7 +688,7 @@ void pci_disable_sriov(struct pci_dev *dev)
 
 	sriov_disable(dev);
 }
-EXPORT_SYMBOL_GPL(pci_disable_sriov);
+EXPORT_SYMBOL(pci_disable_sriov);
 
 /**
  * pci_num_vf - return number of VFs associated with a PF device_release_driver
drivers/pci/pci.c +1 -1
index 4a7c6864fdf4..e8318abedc73 100644
@@ -4367,7 +4367,7 @@ int pci_reset_function(struct pci_dev *dev)
 
 	return rc;
 }
-EXPORT_SYMBOL_GPL(pci_reset_function);
+EXPORT_SYMBOL(pci_reset_function);
 
 /**
  * pci_reset_function_locked - quiesce and reset a PCI device function
Signature · 1 line
2.7.4
#1 lore raw
Quoted 3 lines · Neo Jia

This will allow proprietary linux drivers to adopt SR-IOV spec from PCI-SIG, also switch pci_reset_function to non-GPL symbol as it mainly does pci config space access per spec.

Clear NAK. Thos were added intentional, and even if they were changed your driver would still be a derived work and had to be published under a GPLv2-compatible license.

author
#2 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 3 lines · Neo Jia

This will allow proprietary linux drivers to adopt SR-IOV spec from PCI-SIG, also switch pci_reset_function to non-GPL symbol as it mainly does pci config space access per spec.

Clear NAK. Thos were added intentional, and even if they were changed your driver would still be a derived work and had to be published under a GPLv2-compatible license.

Hi Christoph,

Just to be clear, here the request is to allow proprietary driver continue supporting Linux OS when adopting SR-IOV - a PCIE virtualization technology standardized by PCI SIG.

Similar interfaces we have seen inside Linux kernels are pci_enable_msi, pci_enable_misx_range, which allows proprietary to work when following a PCI SIG standard.

Thanks,
Neo

#3 lore raw
Quoted 3 lines

Just to be clear, here the request is to allow proprietary driver continue supporting Linux OS when adopting SR-IOV - a PCIE virtualization technology standardized by PCI SIG.

And the anser in the previous mail was pretty clear: no. And while we're at it go talk to your lawyers again that you don't have a derived work, because I suspect you do with such intimate entangling.

author
#4 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 3 lines

Just to be clear, here the request is to allow proprietary driver continue supporting Linux OS when adopting SR-IOV - a PCIE virtualization technology standardized by PCI SIG.

And the anser in the previous mail was pretty clear: no. And while we're at it go talk to your lawyers again that you don't have a derived work, because I suspect you do with such intimate entangling.

Hi Christoph,

Right now, Linux kernel is providing PCI kernel interfaces to support proprietary PCI driver when it follows the standard from PCI SIG spec.

So here we are just following the precedence of such to enable a SR-IOV capable device. I treat this no difference to the scenario when a proprietary PCI driver is used to only support MSI (pci_enable_msi) and later add MSI-X support (pci_enable_msix_range).

Thanks,
Neo

#5 lore raw
Quoted 9 lines · Neo Jia
Quoted 7 lines · Christoph Hellwig
Quoted 3 lines

Just to be clear, here the request is to allow proprietary driver continue supporting Linux OS when adopting SR-IOV - a PCIE virtualization technology standardized by PCI SIG.


And the anser in the previous mail was pretty clear: no.  And while we're at it go talk to your lawyers again that you don't have a derived work, because I suspect you do with such intimate entangling.

Quoted 4 lines

Hi Christoph,

Right now, Linux kernel is providing PCI kernel interfaces to support proprietary PCI driver when it follows the standard from PCI SIG spec.

Some, but not all. For example, the SVM interfaces are also exported with EXPORT_SYMBOL_GPL, and may not be used by drivers which violate the GPL licence of the kernel.

You have already been told that this won't be changed. Please stop asking.