diff options
-rw-r--r-- | arch/s390/include/asm/pci.h | 5 | ||||
-rw-r--r-- | arch/s390/pci/pci.c | 3 | ||||
-rw-r--r-- | arch/s390/pci/pci_clp.c | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h index c030900320e0..ef803c202d42 100644 --- a/arch/s390/include/asm/pci.h +++ b/arch/s390/include/asm/pci.h | |||
@@ -50,10 +50,6 @@ struct zpci_fmb { | |||
50 | atomic64_t unmapped_pages; | 50 | atomic64_t unmapped_pages; |
51 | } __packed __aligned(16); | 51 | } __packed __aligned(16); |
52 | 52 | ||
53 | #define ZPCI_MSI_VEC_BITS 11 | ||
54 | #define ZPCI_MSI_VEC_MAX (1 << ZPCI_MSI_VEC_BITS) | ||
55 | #define ZPCI_MSI_VEC_MASK (ZPCI_MSI_VEC_MAX - 1) | ||
56 | |||
57 | enum zpci_state { | 53 | enum zpci_state { |
58 | ZPCI_FN_STATE_RESERVED, | 54 | ZPCI_FN_STATE_RESERVED, |
59 | ZPCI_FN_STATE_STANDBY, | 55 | ZPCI_FN_STATE_STANDBY, |
@@ -90,6 +86,7 @@ struct zpci_dev { | |||
90 | 86 | ||
91 | /* IRQ stuff */ | 87 | /* IRQ stuff */ |
92 | u64 msi_addr; /* MSI address */ | 88 | u64 msi_addr; /* MSI address */ |
89 | unsigned int max_msi; /* maximum number of MSI's */ | ||
93 | struct airq_iv *aibv; /* adapter interrupt bit vector */ | 90 | struct airq_iv *aibv; /* adapter interrupt bit vector */ |
94 | unsigned int aisb; /* number of the summary bit */ | 91 | unsigned int aisb; /* number of the summary bit */ |
95 | 92 | ||
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 2fa7b14b9c08..47a4568e141d 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c | |||
@@ -369,8 +369,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | |||
369 | 369 | ||
370 | if (type == PCI_CAP_ID_MSI && nvec > 1) | 370 | if (type == PCI_CAP_ID_MSI && nvec > 1) |
371 | return 1; | 371 | return 1; |
372 | msi_vecs = min(nvec, ZPCI_MSI_VEC_MAX); | 372 | msi_vecs = min_t(unsigned int, nvec, zdev->max_msi); |
373 | msi_vecs = min_t(unsigned int, msi_vecs, CONFIG_PCI_NR_MSI); | ||
374 | 373 | ||
375 | /* Allocate adapter summary indicator bit */ | 374 | /* Allocate adapter summary indicator bit */ |
376 | rc = -EIO; | 375 | rc = -EIO; |
diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c index 6e22a247de9b..d6e411ed8b1f 100644 --- a/arch/s390/pci/pci_clp.c +++ b/arch/s390/pci/pci_clp.c | |||
@@ -62,6 +62,7 @@ static void clp_store_query_pci_fngrp(struct zpci_dev *zdev, | |||
62 | zdev->tlb_refresh = response->refresh; | 62 | zdev->tlb_refresh = response->refresh; |
63 | zdev->dma_mask = response->dasm; | 63 | zdev->dma_mask = response->dasm; |
64 | zdev->msi_addr = response->msia; | 64 | zdev->msi_addr = response->msia; |
65 | zdev->max_msi = response->noi; | ||
65 | zdev->fmb_update = response->mui; | 66 | zdev->fmb_update = response->mui; |
66 | 67 | ||
67 | switch (response->version) { | 68 | switch (response->version) { |