[PATCH] drm/amdgpu: Simplify IRQ vector request logic

2020-06-16 Thread Piotr Stankiewicz
pci_alloc_irq_vectors() will handle fallback from MSI-X to MSI internally, if necessary. So remove checks which determine if we are dealing with MSI or MSI-X and rely on pci_alloc_irq_vectors() to do the right thing. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/gpu

[PATCH v4] PCI/MSI: Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity()

2020-06-16 Thread Piotr Stankiewicz
fallback it will forward any error returned by __pci_enable_msi_range(). This is a confusing behaviour, so have the pci_alloc_irq_vectors_affinity() forward the error code from __pci_enable_msix_range() when appropriate. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko Reviewed

[PATCH v3 02/15] PCI: Add macro for message signalled interrupt types

2020-06-09 Thread Piotr Stankiewicz
There are several places in the kernel which check/ask for MSI or MSI-X interrupts. It would make sense to have a macro which defines all types of message signalled interrupts, to use in such situations. Add PCI_IRQ_MSI_TYPES, for this purpose. Signed-off-by: Piotr Stankiewicz Suggested-by: Andy

[PATCH v3 14/15] net: hns3: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- drivers/net

[PATCH v3 13/15] aquantia: atlantic: Use PCI_IRQ_ALL_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 +--- 1 file changed, 1

[PATCH v3 15/15] scsi: Use PCI_IRQ_MSI_TYPES and PCI_IRQ_ALL_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/scsi/ipr.c| 5 +++-- drivers/scsi/vmw_pvscsi.c | 2 +- 2 files changed

[PATCH v3 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 11/15] mmc: sdhci: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko Acked-by: Ulf Hansson Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-pci-gli.c

[PATCH v3 10/15] vmw_vmci: Use PCI_IRQ_ALL_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/misc/vmw_vmci/vmci_guest.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v3 08/15] IB/qib: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/infiniband/hw/qib/qib_pcie.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH v3 09/15] media: ddbridge: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/media/pci/ddbridge/ddbridge-main.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 07/15] drm/amdgpu: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 11 +-- 1 file changed, 1 insertion

[PATCH v3 05/15] crypto: inside-secure - Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko Reviewed-by: Antoine Tenart Acked-by: Herbert Xu --- drivers/crypto/inside-secure

[PATCH v3 06/15] dmaengine: dw-edma: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/dma/dw-edma/dw-edma-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 04/15] ahci: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 03/15] PCI: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-09 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko Reviewed-by: Logan Gunthorpe --- drivers/pci/pcie/portdrv_core.c | 4 ++-- drivers/pci

[PATCH v3 01/15] PCI/MSI: Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity()

2020-06-09 Thread Piotr Stankiewicz
fallback it will forward any error returned by __pci_enable_msi_range(). This is a confusing behaviour, so have the pci_alloc_irq_vectors_affinity() forward the error code from __pci_enable_msix_range() when appropriate. Signed-off-by: Piotr Stankiewicz --- drivers/pci/msi.c | 22

[PATCH v3 00/15] Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity()

2020-06-09 Thread Piotr Stankiewicz
signalled interrupts (MSI or MSI-X), which spawned the first patch adding PCI_IRQ_MSI_TYPES. Finally the rest of the chain converts all users to take advantage of PCI_IRQ_MSI_TYPES or PCI_IRQ_ALL_TYPES, as appropriate. Piotr Stankiewicz (15): PCI/MSI: Forward MSI-X vector enable error code

[PATCH v2 13/15] aquantia: atlantic: Use PCI_IRQ_ALL_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 +--- 1 file changed, 1

[PATCH v2 15/15] scsi: Use PCI_IRQ_MSI_TYPES and PCI_IRQ_ALL_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/scsi/ipr.c| 5 +++-- drivers/scsi/vmw_pvscsi.c | 2 +- 2 files changed

[PATCH v2 14/15] net: hns3: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- drivers/net

[PATCH v2 12/15] amd-xgbe: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 10/15] vmw_vmci: Use PCI_IRQ_ALL_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/misc/vmw_vmci/vmci_guest.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v2 11/15] mmc: sdhci: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko Acked-by: Ulf Hansson Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-pci-gli.c

[PATCH v2 09/15] media: ddbridge: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/media/pci/ddbridge/ddbridge-main.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 07/15] drm/amdgpu: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 9 ++--- 1 file changed, 2 insertions

[PATCH v2 08/15] IB/qib: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/infiniband/hw/qib/qib_pcie.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH v2 06/15] dmaengine: dw-edma: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/dma/dw-edma/dw-edma-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 03/15] PCI: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko Reviewed-by: Logan Gunthorpe --- drivers/pci/msi.c | 3 +-- drivers/pci

[PATCH v2 05/15] crypto: inside-secure - Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko Reviewed-by: Antoine Tenart Acked-by: Herbert Xu --- drivers/crypto/inside-secure

[PATCH v2 04/15] ahci: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-03 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 01/15] PCI/MSI: Forward MSI-X vector enable error code in pci_alloc_irq_vectors_affinity()

2020-06-03 Thread Piotr Stankiewicz
fallback it will forward any error returned by __pci_enable_msi_range(). This is a confusing behaviour, so have the pci_alloc_irq_vectors_affinity() forward the error code from __pci_enable_msix_range() when appropriate. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/pci

[PATCH 13/15] aquantia: atlantic: use PCI_IRQ_ALL_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 +--- 1 file changed, 1

[PATCH 14/15] net: hns3: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- drivers/net

[PATCH 15/15] scsi: use PCI_IRQ_MSI_TYPES and PCI_IRQ_ALL_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/scsi/ipr.c| 2 +- drivers/scsi/vmw_pvscsi.c | 2 +- 2 files changed, 2

[PATCH 03/15] PCI: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/pci/pcie/portdrv_core.c | 4 ++-- drivers/pci/switch/switchtec.c | 3 +-- 2

[PATCH 04/15] ahci: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 08/15] IB/qib: Use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/infiniband/hw/qib/qib_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 12/15] amd-xgbe: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 1 file changed, 4 insertions

[PATCH 11/15] mmc: sdhci: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/mmc/host/sdhci-pci-gli.c | 3 +-- drivers/mmc/host/sdhci-pci-o2micro.c | 3

[PATCH 10/15] vmw_vmci: use PCI_IRQ_ALL_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/misc/vmw_vmci/vmci_guest.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 06/15] dmaengine: dw-edma: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/dma/dw-edma/dw-edma-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 09/15] media: ddbridge: use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/media/pci/ddbridge/ddbridge-main.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 05/15] crypto: inside-secure - use PCI_IRQ_MSI_TYPES where appropriate

2020-06-02 Thread Piotr Stankiewicz
Seeing as there is shorthand available to use when asking for any type of interrupt, or any type of message signalled interrupt, leverage it. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 02/15] PCI/MSI: forward MSIx vector enable error code in pci_alloc_irq_vectors_affinity

2020-06-02 Thread Piotr Stankiewicz
fallback it will forward any error returned by __pci_enable_msi_range. This is a confusing behaviour, so have the pci_alloc_irq_vectors_affinity forward the error code from __pci_enable_msix_range when appropriate. Signed-off-by: Piotr Stankiewicz Reviewed-by: Andy Shevchenko --- drivers/pci/msi.c | 4

[PATCH 01/15] PCI: add shorthand define for message signalled interrupt types

2020-06-02 Thread Piotr Stankiewicz
There are several places in the kernel which check/ask for MSI or MSI-X interrupts. It would make sense to have a shorthand constant, similar to PCI_IRQ_ALL_TYPES, to use in these situations. So add PCI_IRQ_MSI_TYPES, for this purpose. Signed-off-by: Piotr Stankiewicz Suggested-by: Andy

[PATCH 00/15] forward MSIx vector enable error code in pci_alloc_irq_vectors_affinity

2020-06-02 Thread Piotr Stankiewicz
interrupts (MSI or MSI-X), which spawned the first patch adding PCI_IRQ_MSI_TYPES. Finally the rest of the chain converts all users to take advantage of PCI_IRQ_MSI_TYPES or PCI_IRQ_ALL_TYPES, as appropriate. Piotr Stankiewicz (15): PCI: add shorthand define for message signalled interrupt types