diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/i86pc/io/pci/pci_common.c | 17 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/pcplusmp/apic_introp.c | 6 |
2 files changed, 22 insertions, 1 deletions
diff --git a/usr/src/uts/i86pc/io/pci/pci_common.c b/usr/src/uts/i86pc/io/pci/pci_common.c index 3dfb5fdce7..0c90537424 100644 --- a/usr/src/uts/i86pc/io/pci/pci_common.c +++ b/usr/src/uts/i86pc/io/pci/pci_common.c @@ -381,9 +381,24 @@ SUPPORTED_TYPES_OUT: if (hdlp->ih_type == DDI_INTR_TYPE_MSIX) { if (!(msix_p = i_ddi_get_msix(hdlp->ih_dip))) { msix_p = pci_msix_init(hdlp->ih_dip); - if (msix_p) + if (msix_p) { i_ddi_set_msix(hdlp->ih_dip, msix_p); + } else { + DDI_INTR_NEXDBG((CE_CONT, + "pci_common_intr_ops: MSI-X" + "table initilization failed" + ", rdip 0x%p inum 0x%x\n", + (void *)rdip, + hdlp->ih_inum)); + + (void) (*psm_intr_ops)(rdip, + hdlp, + PSM_INTR_OP_FREE_VECTORS, + NULL); + + return (DDI_FAILURE); + } } } diff --git a/usr/src/uts/i86pc/io/pcplusmp/apic_introp.c b/usr/src/uts/i86pc/io/pcplusmp/apic_introp.c index fbec4bf0c3..a70223d893 100644 --- a/usr/src/uts/i86pc/io/pcplusmp/apic_introp.c +++ b/usr/src/uts/i86pc/io/pcplusmp/apic_introp.c @@ -152,6 +152,8 @@ apic_pci_msi_enable_vector(apic_irq_t *irq_ptr, int type, int inum, int vector, uintptr_t off; ddi_intr_msix_t *msix_p = i_ddi_get_msix(dip); + ASSERT(msix_p != NULL); + /* Offset into the "inum"th entry in the MSI-X table */ off = (uintptr_t)msix_p->msix_tbl_addr + (inum * PCI_MSIX_VECTOR_SIZE); @@ -516,6 +518,8 @@ apic_pci_msi_unconfigure(dev_info_t *rdip, int type, int inum) uint32_t mask; ddi_intr_msix_t *msix_p = i_ddi_get_msix(rdip); + ASSERT(msix_p != NULL); + /* Offset into "inum"th entry in the MSI-X table & mask it */ off = (uintptr_t)msix_p->msix_tbl_addr + (inum * PCI_MSIX_VECTOR_SIZE) + PCI_MSIX_VECTOR_CTRL_OFFSET; @@ -564,6 +568,8 @@ apic_pci_msi_enable_mode(dev_info_t *rdip, int type, int inum) msix_p = i_ddi_get_msix(rdip); + ASSERT(msix_p != NULL); + /* Offset into "inum"th entry in the MSI-X table & clear mask */ off = (uintptr_t)msix_p->msix_tbl_addr + (inum * PCI_MSIX_VECTOR_SIZE) + PCI_MSIX_VECTOR_CTRL_OFFSET; |