s390/pci: improve irq number check for msix
s390s arch_setup_msi_irqs function ensures that we don't return with more irqs than the PCI architecture allows and that a single PCI function doesn't consume more irqs than the kernel is configured for. At least the last check doesn't help much and should take the sum of all irqs into account. Since that's already done by irq_alloc_desc we can remove this check. As for the first check we should use the value provided by the firmware which can be less than what the PCI architecture allows. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
f318a1229b
commit
b19148f6e2
@@ -369,8 +369,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
|
||||
|
||||
if (type == PCI_CAP_ID_MSI && nvec > 1)
|
||||
return 1;
|
||||
msi_vecs = min(nvec, ZPCI_MSI_VEC_MAX);
|
||||
msi_vecs = min_t(unsigned int, msi_vecs, CONFIG_PCI_NR_MSI);
|
||||
msi_vecs = min_t(unsigned int, nvec, zdev->max_msi);
|
||||
|
||||
/* Allocate adapter summary indicator bit */
|
||||
rc = -EIO;
|
||||
|
@@ -62,6 +62,7 @@ static void clp_store_query_pci_fngrp(struct zpci_dev *zdev,
|
||||
zdev->tlb_refresh = response->refresh;
|
||||
zdev->dma_mask = response->dasm;
|
||||
zdev->msi_addr = response->msia;
|
||||
zdev->max_msi = response->noi;
|
||||
zdev->fmb_update = response->mui;
|
||||
|
||||
switch (response->version) {
|
||||
|
Reference in New Issue
Block a user