Skip to contentSkip to conversation

timberdale: Use pci_enable_msix_range() instead of pci_enable_msix()

PATCH Applied Alexander Gordeev 2 participants 10 messages Feb 19, 2014 – Mar 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 timberdale: Use pci_enable_msix_range() instead of pci_enable_msix()

As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() and pci_enable_msix_range() interfaces.

---
 drivers/mfd/timberdale.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/mfd/timberdale.c +3 -2
index 2bc5cfb..c2bc6d7 100644
@@ -715,8 +715,9 @@ static int timb_probe(struct pci_dev *dev,
 	for (i = 0; i < TIMBERDALE_NR_IRQS; i++)
 		msix_entries[i].entry = i;
 
-	err = pci_enable_msix(dev, msix_entries, TIMBERDALE_NR_IRQS);
-	if (err) {
+	err = pci_enable_msix_range(dev, msix_entries,
+				    TIMBERDALE_NR_IRQS, TIMBERDALE_NR_IRQS);
+	if (err < 0) {
 		dev_err(&dev->dev,
 			"MSI-X init failed: %d, expected entries: %d\n",
 			err, TIMBERDALE_NR_IRQS);
Signature · 1 line
1.7.7.6
Applied
#1 lore raw
Quoted 6 lines

As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() and pci_enable_msix_range() interfaces.

Quoted 7 lines
---
 drivers/mfd/timberdale.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#2 lore raw

Hi Lee et al,

Based on recently accepted to the mainline pci_enable_msix_exact() function, I am sending an updated version of the patch. Please, let me know if it does not work for you and you need and incremental update from the previous version.

Thanks!

Signature · 3 lines
Regards,
Alexander Gordeev
[email protected]
#3 lore raw

PATCH v2 1/1 timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces.

---
 drivers/mfd/timberdale.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/timberdale.c +1 -1
index 2bc5cfb..6ce36d6 100644
@@ -715,7 +715,7 @@ static int timb_probe(struct pci_dev *dev,
 	for (i = 0; i < TIMBERDALE_NR_IRQS; i++)
 		msix_entries[i].entry = i;
 
-	err = pci_enable_msix(dev, msix_entries, TIMBERDALE_NR_IRQS);
+	err = pci_enable_msix_exact(dev, msix_entries, TIMBERDALE_NR_IRQS);
 	if (err) {
 		dev_err(&dev->dev,
 			"MSI-X init failed: %d, expected entries: %d\n",
Signature · 6 lines
1.7.7.6

-- 
Regards,
Alexander Gordeev
[email protected]
Applied
#4 lore raw

Re: [PATCH v2] timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

Quoted 7 lines · Alexander Gordeev

As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces.

Quoted 7 lines
---
 drivers/mfd/timberdale.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#5 lore raw

Re: [PATCH v2] timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

Quoted 15 lines
Quoted 7 lines

As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces.

Quoted 7 lines
---
 drivers/mfd/timberdale.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 1 line

Applied, thanks.

I've reverted this patch, as it doesn't build othognally.

drivers/mfd/timberdale.c:718:2:
error: implicit declaration of function ‘pci_enable_msix_exact’
[-Werror=implicit-function-declaration]

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#6 lore raw

Re: [PATCH v2] timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

Quoted 7 lines · Lee Jones
Quoted 1 line

Applied, thanks.

I've reverted this patch, as it doesn't build othognally.

drivers/mfd/timberdale.c:718:2:
error: implicit declaration of function ‘pci_enable_msix_exact’
[-Werror=implicit-function-declaration]

I should have to clarify it I think. Do you build on top of 3.14-rc4?

Thanks!

Signature · 3 lines
Regards,
Alexander Gordeev
[email protected]
#7 lore raw

Re: [PATCH v2] timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

Quoted 9 lines
Quoted 7 lines
Quoted 1 line

Applied, thanks.

I've reverted this patch, as it doesn't build othognally.

drivers/mfd/timberdale.c:718:2:
error: implicit declaration of function ‘pci_enable_msix_exact’
[-Werror=implicit-function-declaration]

I should have to clarify it I think. Do you build on top of 3.14-rc4?

Not yet. Is the required patch in there?

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#8 lore raw

Re: [PATCH v2] timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

Quoted 11 lines · Lee Jones
Quoted 9 lines
Quoted 7 lines
Quoted 1 line

Applied, thanks.

I've reverted this patch, as it doesn't build othognally.

drivers/mfd/timberdale.c:718:2:
error: implicit declaration of function ‘pci_enable_msix_exact’
[-Werror=implicit-function-declaration]

I should have to clarify it I think. Do you build on top of 3.14-rc4?

Not yet. Is the required patch in there?

Yep - commit 302a252 ("PCI/MSI: Add pci_enable_msi_range() and pci_enable_msix_range()").

Signature · 3 lines
Regards,
Alexander Gordeev
[email protected]
#9 lore raw

Re: [PATCH v2] timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 1 line

Applied, thanks.

I've reverted this patch, as it doesn't build othognally.

drivers/mfd/timberdale.c:718:2:
error: implicit declaration of function ‘pci_enable_msix_exact’
[-Werror=implicit-function-declaration]

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

I should have to clarify it I think. Do you build on top of 3.14-rc4?

Not yet. Is the required patch in there?

Yep - commit 302a252 ("PCI/MSI: Add pci_enable_msi_range() and pci_enable_msix_range()").

Okay, seems to work fine post-rebase.

Reapplied, thanks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog