958
959 static void
960 pci_disable_intr(dev_info_t *pdip, dev_info_t *rdip,
961 ddi_intr_handle_impl_t *hdlp, uint32_t inum)
962 {
963 int irq;
964 struct intrspec *ispec;
965 ihdl_plat_t *ihdl_plat_datap = (ihdl_plat_t *)hdlp->ih_private;
966
967 DDI_INTR_NEXDBG((CE_CONT, "pci_disable_intr: \n"));
968 ispec = (struct intrspec *)pci_intx_get_ispec(pdip, rdip, (int)inum);
969 if (ispec == NULL)
970 return;
971 if (DDI_INTR_IS_MSI_OR_MSIX(hdlp->ih_type)) {
972 ispec->intrspec_vec = inum;
973 ispec->intrspec_pri = hdlp->ih_pri;
974 }
975 ihdl_plat_datap->ip_ispecp = ispec;
976
977 /* translate the interrupt if needed */
978 (void) (*psm_intr_ops)(rdip, hdlp, PSM_INTR_OP_XLATE_VECTOR, &irq);
979
980 /* Disable the interrupt handler */
981 rem_avintr((void *)hdlp, hdlp->ih_pri, hdlp->ih_cb_func, irq);
982 ihdl_plat_datap->ip_ispecp = NULL;
983 }
984
985 /*
986 * Miscellaneous library function
987 */
988 int
989 pci_common_get_reg_prop(dev_info_t *dip, pci_regspec_t *pci_rp)
990 {
991 int i;
992 int number;
993 int assigned_addr_len;
994 uint_t phys_hi = pci_rp->pci_phys_hi;
995 pci_regspec_t *assigned_addr;
996
997 if (((phys_hi & PCI_REG_ADDR_M) == PCI_ADDR_CONFIG) ||
998 (phys_hi & PCI_RELOCAT_B))
999 return (DDI_SUCCESS);
1000
1001 /*
1002 * the "reg" property specifies relocatable, get and interpret the
|
958
959 static void
960 pci_disable_intr(dev_info_t *pdip, dev_info_t *rdip,
961 ddi_intr_handle_impl_t *hdlp, uint32_t inum)
962 {
963 int irq;
964 struct intrspec *ispec;
965 ihdl_plat_t *ihdl_plat_datap = (ihdl_plat_t *)hdlp->ih_private;
966
967 DDI_INTR_NEXDBG((CE_CONT, "pci_disable_intr: \n"));
968 ispec = (struct intrspec *)pci_intx_get_ispec(pdip, rdip, (int)inum);
969 if (ispec == NULL)
970 return;
971 if (DDI_INTR_IS_MSI_OR_MSIX(hdlp->ih_type)) {
972 ispec->intrspec_vec = inum;
973 ispec->intrspec_pri = hdlp->ih_pri;
974 }
975 ihdl_plat_datap->ip_ispecp = ispec;
976
977 /* translate the interrupt if needed */
978 if ((*psm_intr_ops)(rdip, hdlp, PSM_INTR_OP_XLATE_VECTOR, &irq) !=
979 PSM_FAILURE) {
980 /* Disable the interrupt handler */
981 rem_avintr((void *)hdlp, hdlp->ih_pri, hdlp->ih_cb_func, irq);
982 ihdl_plat_datap->ip_ispecp = NULL;
983 }
984 }
985
986 /*
987 * Miscellaneous library function
988 */
989 int
990 pci_common_get_reg_prop(dev_info_t *dip, pci_regspec_t *pci_rp)
991 {
992 int i;
993 int number;
994 int assigned_addr_len;
995 uint_t phys_hi = pci_rp->pci_phys_hi;
996 pci_regspec_t *assigned_addr;
997
998 if (((phys_hi & PCI_REG_ADDR_M) == PCI_ADDR_CONFIG) ||
999 (phys_hi & PCI_RELOCAT_B))
1000 return (DDI_SUCCESS);
1001
1002 /*
1003 * the "reg" property specifies relocatable, get and interpret the
|