diff options
author | anish <none@none> | 2006-08-21 10:35:49 -0700 |
---|---|---|
committer | anish <none@none> | 2006-08-21 10:35:49 -0700 |
commit | a54f81fbf66e3e4c14a94d571c0fe241e4cf2394 (patch) | |
tree | f3e81f8f15413817da3bc84d80514b725dbbc00f /usr/src | |
parent | 7a3d04104a9a0b1c8065ed695cf6b5867b8065a0 (diff) | |
download | illumos-gate-a54f81fbf66e3e4c14a94d571c0fe241e4cf2394.tar.gz |
6460876 ddi_intr_get_navail(9f): fix functionality across platforms and other bugs
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/cardbus/cardbus.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/i8042.c | 11 | ||||
-rw-r--r-- | usr/src/uts/common/io/pci-ide/pci-ide.c | 20 | ||||
-rw-r--r-- | usr/src/uts/common/pcmcia/nexus/pcmcia.c | 6 | ||||
-rw-r--r-- | usr/src/uts/common/sys/ddi_intr_impl.h | 5 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/pci/pci_common.c | 50 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/rootnex.c | 26 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/ddi_impl.c | 11 | ||||
-rw-r--r-- | usr/src/uts/sun4/io/px/px.c | 2 | ||||
-rw-r--r-- | usr/src/uts/sun4/io/px/px_intr.c | 2 | ||||
-rw-r--r-- | usr/src/uts/sun4/io/rootnex.c | 4 | ||||
-rw-r--r-- | usr/src/uts/sun4/os/ddi_impl.c | 2 | ||||
-rw-r--r-- | usr/src/uts/sun4/sys/ddi_subrdefs.h | 8 | ||||
-rw-r--r-- | usr/src/uts/sun4u/io/pci/pci.c | 4 | ||||
-rw-r--r-- | usr/src/uts/sun4u/io/sbbc.c | 4 | ||||
-rw-r--r-- | usr/src/uts/sun4u/io/sysiosbus.c | 13 | ||||
-rw-r--r-- | usr/src/uts/sun4u/io/upa64s.c | 11 | ||||
-rw-r--r-- | usr/src/uts/sun4u/opl/io/pcicmu/pcicmu.c | 4 | ||||
-rw-r--r-- | usr/src/uts/sun4u/sunfire/io/fhc.c | 4 | ||||
-rw-r--r-- | usr/src/uts/sun4v/io/vnex.c | 4 |
20 files changed, 74 insertions, 119 deletions
diff --git a/usr/src/uts/common/io/cardbus/cardbus.c b/usr/src/uts/common/io/cardbus/cardbus.c index cf11679b0e..74f07951f0 100644 --- a/usr/src/uts/common/io/cardbus/cardbus.c +++ b/usr/src/uts/common/io/cardbus/cardbus.c @@ -2609,7 +2609,7 @@ cardbus_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: #ifdef sparc - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); #else *(int *)result = 1; #endif diff --git a/usr/src/uts/common/io/i8042.c b/usr/src/uts/common/io/i8042.c index f14c2621ae..e314db5946 100644 --- a/usr/src/uts/common/io/i8042.c +++ b/usr/src/uts/common/io/i8042.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1244,6 +1243,7 @@ i8042_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, *(int *)result = 0; break; case DDI_INTROP_NINTRS: + case DDI_INTROP_NAVAIL: *(int *)result = 1; break; case DDI_INTROP_ALLOC: @@ -1322,9 +1322,6 @@ i8042_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, mutex_exit(&global->i8042_mutex); #endif /* defined(USE_SOFT_INTRS) */ break; - case DDI_INTROP_NAVAIL: - *(int *)result = 1; - break; default: return (DDI_FAILURE); } diff --git a/usr/src/uts/common/io/pci-ide/pci-ide.c b/usr/src/uts/common/io/pci-ide/pci-ide.c index fcc68c6320..c47157dd31 100644 --- a/usr/src/uts/common/io/pci-ide/pci-ide.c +++ b/usr/src/uts/common/io/pci-ide/pci-ide.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -647,7 +646,6 @@ static int pciide_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, ddi_intr_handle_impl_t *hdlp, void *result) { - struct ddi_parent_private_data *ppdptr; struct intrspec *ispecp; int rc; int pri = 0; @@ -663,14 +661,9 @@ pciide_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, *(int *)result = DDI_INTR_FLAG_LEVEL; break; case DDI_INTROP_NINTRS: - if (!PCIIDE_NATIVE_MODE(rdip)) { - if ((ppdptr = ddi_get_parent_data(rdip)) == NULL) { - *(int *)result = 0; - return (DDI_FAILURE); - } - *(int *)result = ppdptr->par_nintr; - } else - *(int *)result = 1; + case DDI_INTROP_NAVAIL: + *(int *)result = (!PCIIDE_NATIVE_MODE(rdip)) ? + i_ddi_get_intx_nintrs(rdip) : 1; break; case DDI_INTROP_ALLOC: if ((ispecp = pciide_get_ispec(dip, rdip, hdlp->ih_inum)) == @@ -720,9 +713,6 @@ pciide_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, PDBG(("pciide_disable rc=%d", rc)); #endif /* DEBUG */ return (rc); - case DDI_INTROP_NAVAIL: - *(int *)result = 1; - break; default: return (DDI_FAILURE); } diff --git a/usr/src/uts/common/pcmcia/nexus/pcmcia.c b/usr/src/uts/common/pcmcia/nexus/pcmcia.c index 769c782882..acac8bf6b6 100644 --- a/usr/src/uts/common/pcmcia/nexus/pcmcia.c +++ b/usr/src/uts/common/pcmcia/nexus/pcmcia.c @@ -4925,11 +4925,11 @@ pcmcia_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SUPPORTED_TYPES: /* PCI nexus driver supports only fixed interrupts */ - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: @@ -5407,7 +5407,7 @@ pcmcia_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - if (ddi_get_parent_data(rdip) == NULL) { + if (i_ddi_get_intx_nintrs(rdip) == 0) { *(int *)result = 0; return (DDI_FAILURE); } diff --git a/usr/src/uts/common/sys/ddi_intr_impl.h b/usr/src/uts/common/sys/ddi_intr_impl.h index 8fb35a4018..a341346bc4 100644 --- a/usr/src/uts/common/sys/ddi_intr_impl.h +++ b/usr/src/uts/common/sys/ddi_intr_impl.h @@ -298,6 +298,11 @@ struct intrspec { #ifdef _KERNEL /* + * Figure out how many FIXED nintrs are supported + */ +int i_ddi_get_intx_nintrs(dev_info_t *dip); + +/* * NOTE: * The following 4 busops entry points are obsoleted with version * 9 or greater. Use i_ddi_intr_op interface in place of these diff --git a/usr/src/uts/i86pc/io/pci/pci_common.c b/usr/src/uts/i86pc/io/pci/pci_common.c index 068fb157ad..492a51412c 100644 --- a/usr/src/uts/i86pc/io/pci/pci_common.c +++ b/usr/src/uts/i86pc/io/pci/pci_common.c @@ -57,7 +57,6 @@ * Function prototypes */ static int pci_get_priority(dev_info_t *, ddi_intr_handle_impl_t *, int *); -static int pci_get_nintrs(dev_info_t *, int, int *); static int pci_enable_intr(dev_info_t *, dev_info_t *, ddi_intr_handle_impl_t *, uint32_t); static void pci_disable_intr(dev_info_t *, dev_info_t *, @@ -183,30 +182,6 @@ pci_get_priority(dev_info_t *dip, ddi_intr_handle_impl_t *hdlp, int *pri) } -/* - * pci_get_nintrs: - * Figure out how many interrupts the device supports - */ -static int -pci_get_nintrs(dev_info_t *dip, int type, int *nintrs) -{ - int ret; - - *nintrs = 0; - - if (DDI_INTR_IS_MSI_OR_MSIX(type)) - ret = pci_msi_get_nintrs(dip, type, nintrs); - else { - ret = DDI_FAILURE; - if (ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS, - "interrupts", -1) != -1) { - *nintrs = 1; - ret = DDI_SUCCESS; - } - } - - return (ret); -} static int pcie_pci_intr_pri_counter = 0; @@ -262,9 +237,17 @@ pci_common_intr_ops(dev_info_t *pdip, dev_info_t *rdip, ddi_intr_op_t intr_op, *(int *)result)); } break; + case DDI_INTROP_NAVAIL: case DDI_INTROP_NINTRS: - if (pci_get_nintrs(rdip, hdlp->ih_type, result) != DDI_SUCCESS) - return (DDI_FAILURE); + if (DDI_INTR_IS_MSI_OR_MSIX(hdlp->ih_type)) { + if (pci_msi_get_nintrs(hdlp->ih_dip, hdlp->ih_type, + result) != DDI_SUCCESS) + return (DDI_FAILURE); + } else { + *(int *)result = i_ddi_get_intx_nintrs(hdlp->ih_dip); + if (*(int *)result == 0) + return (DDI_FAILURE); + } break; case DDI_INTROP_ALLOC: /* @@ -627,19 +610,6 @@ pci_common_intr_ops(dev_info_t *pdip, dev_info_t *rdip, ddi_intr_op_t intr_op, DDI_INTR_NEXDBG((CE_CONT, "pci: GETPENDING returned = %x\n", *(int *)result)); break; - case DDI_INTROP_NAVAIL: - if ((psm_intr_ops != NULL) && (pci_get_priority(rdip, - hdlp, &priority) == DDI_SUCCESS)) { - /* Priority in the handle not initialized yet */ - hdlp->ih_pri = priority; - (void) (*psm_intr_ops)(rdip, hdlp, - PSM_INTR_OP_NAVAIL_VECTORS, result); - } else { - *(int *)result = 1; - } - DDI_INTR_NEXDBG((CE_CONT, "pci: NAVAIL returned = %x\n", - *(int *)result)); - break; default: return (i_ddi_intr_ops(pdip, rdip, intr_op, hdlp, result)); } diff --git a/usr/src/uts/i86pc/io/rootnex.c b/usr/src/uts/i86pc/io/rootnex.c index 5c32a6755d..87421198a8 100644 --- a/usr/src/uts/i86pc/io/rootnex.c +++ b/usr/src/uts/i86pc/io/rootnex.c @@ -1383,11 +1383,10 @@ rootnex_intr_ops(dev_info_t *pdip, dev_info_t *rdip, ddi_intr_op_t intr_op, return (DDI_FAILURE); } break; + case DDI_INTROP_NAVAIL: case DDI_INTROP_NINTRS: - if ((pdp = ddi_get_parent_data(rdip)) == NULL) - return (DDI_FAILURE); - *(int *)result = pdp->par_nintr; - if (pdp->par_nintr == 0) { + *(int *)result = i_ddi_get_intx_nintrs(rdip); + if (*(int *)result == 0) { /* * Special case for 'pcic' driver' only. This driver * driver is a child of 'isa' and 'rootnex' drivers. @@ -1402,25 +1401,12 @@ rootnex_intr_ops(dev_info_t *pdip, dev_info_t *rdip, ddi_intr_op_t intr_op, */ if (strcmp(ddi_get_name(rdip), "pcic") == 0) *(int *)result = 1; + else + return (DDI_FAILURE); } break; case DDI_INTROP_SUPPORTED_TYPES: - *(int *)result = 0; - *(int *)result |= DDI_INTR_TYPE_FIXED; /* Always ... */ - break; - case DDI_INTROP_NAVAIL: - if ((ispec = rootnex_get_ispec(rdip, hdlp->ih_inum)) == NULL) - return (DDI_FAILURE); - - if (psm_intr_ops == NULL) { - *(int *)result = 1; - break; - } - - /* Priority in the handle not initialized yet */ - hdlp->ih_pri = ispec->intrspec_pri; - (void) (*psm_intr_ops)(rdip, hdlp, - PSM_INTR_OP_NAVAIL_VECTORS, result); + *(int *)result = DDI_INTR_TYPE_FIXED; /* Always ... */ break; default: return (DDI_FAILURE); diff --git a/usr/src/uts/i86pc/os/ddi_impl.c b/usr/src/uts/i86pc/os/ddi_impl.c index 04ec2dc609..21dd7b5070 100644 --- a/usr/src/uts/i86pc/os/ddi_impl.c +++ b/usr/src/uts/i86pc/os/ddi_impl.c @@ -905,6 +905,17 @@ i_ddi_free_intr_phdl(ddi_intr_handle_impl_t *hdlp) hdlp->ih_private = NULL; } +int +i_ddi_get_intx_nintrs(dev_info_t *dip) +{ + struct ddi_parent_private_data *pdp; + + if ((pdp = ddi_get_parent_data(dip)) == NULL) + return (0); + + return (pdp->par_nintr); +} + /* * DDI Memory/DMA */ diff --git a/usr/src/uts/sun4/io/px/px.c b/usr/src/uts/sun4/io/px/px.c index f9f86818de..f1d7b21da2 100644 --- a/usr/src/uts/sun4/io/px/px.c +++ b/usr/src/uts/sun4/io/px/px.c @@ -1306,7 +1306,7 @@ px_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, /* Process DDI_INTROP_SUPPORTED_TYPES request here */ if (intr_op == DDI_INTROP_SUPPORTED_TYPES) { - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; if ((pci_msi_get_supported_type(rdip, diff --git a/usr/src/uts/sun4/io/px/px_intr.c b/usr/src/uts/sun4/io/px/px_intr.c index b135aa8fef..ba852758e2 100644 --- a/usr/src/uts/sun4/io/px/px_intr.c +++ b/usr/src/uts/sun4/io/px/px_intr.c @@ -579,7 +579,7 @@ px_intx_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; default: ret = DDI_ENOTSUP; diff --git a/usr/src/uts/sun4/io/rootnex.c b/usr/src/uts/sun4/io/rootnex.c index c3700c1741..305ca9a2af 100644 --- a/usr/src/uts/sun4/io/rootnex.c +++ b/usr/src/uts/sun4/io/rootnex.c @@ -677,11 +677,11 @@ rootnex_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SUPPORTED_TYPES: /* Root nexus driver supports only fixed interrupts */ - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: diff --git a/usr/src/uts/sun4/os/ddi_impl.c b/usr/src/uts/sun4/os/ddi_impl.c index 343d3391b5..e822b9ac3e 100644 --- a/usr/src/uts/sun4/os/ddi_impl.c +++ b/usr/src/uts/sun4/os/ddi_impl.c @@ -877,7 +877,7 @@ i_ddi_get_intr_pri(dev_info_t *dip, uint_t inumber) } int -i_ddi_get_nintrs(dev_info_t *dip) +i_ddi_get_intx_nintrs(dev_info_t *dip) { int32_t intrlen; prop_1275_cell_t intr_sz; diff --git a/usr/src/uts/sun4/sys/ddi_subrdefs.h b/usr/src/uts/sun4/sys/ddi_subrdefs.h index d90a955f81..ac035e10ab 100644 --- a/usr/src/uts/sun4/sys/ddi_subrdefs.h +++ b/usr/src/uts/sun4/sys/ddi_subrdefs.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -44,7 +43,6 @@ extern "C" { uint32_t i_ddi_get_inum(dev_info_t *dip, uint_t inumber); uint32_t i_ddi_get_intr_pri(dev_info_t *dip, uint_t inumber); -int i_ddi_get_nintrs(dev_info_t *dip); int i_ddi_add_ivintr(ddi_intr_handle_impl_t *hdlp); void i_ddi_rem_ivintr(ddi_intr_handle_impl_t *hdlp); diff --git a/usr/src/uts/sun4u/io/pci/pci.c b/usr/src/uts/sun4u/io/pci/pci.c index 8c404c288c..69b5a9427f 100644 --- a/usr/src/uts/sun4u/io/pci/pci.c +++ b/usr/src/uts/sun4u/io/pci/pci.c @@ -1344,11 +1344,11 @@ pci_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SUPPORTED_TYPES: /* PCI nexus driver supports only fixed interrupts */ - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: diff --git a/usr/src/uts/sun4u/io/sbbc.c b/usr/src/uts/sun4u/io/sbbc.c index 470136550f..f71f652d53 100644 --- a/usr/src/uts/sun4u/io/sbbc.c +++ b/usr/src/uts/sun4u/io/sbbc.c @@ -648,11 +648,11 @@ sbbc_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SUPPORTED_TYPES: /* PCI nexus driver supports only fixed interrupts */ - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: diff --git a/usr/src/uts/sun4u/io/sysiosbus.c b/usr/src/uts/sun4u/io/sysiosbus.c index 0d0365ef72..a898991493 100644 --- a/usr/src/uts/sun4u/io/sysiosbus.c +++ b/usr/src/uts/sun4u/io/sysiosbus.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1490,7 +1489,7 @@ sbus_ctlops(dev_info_t *dip, dev_info_t *rdip, len = strlen(msgbuf); } - for (i = 0, n = i_ddi_get_nintrs(rdip); i < n; i++) { + for (i = 0, n = i_ddi_get_intx_nintrs(rdip); i < n; i++) { uint32_t sbuslevel, inum, pri; if (i != 0) { @@ -2148,7 +2147,7 @@ sbus_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SETCAP: case DDI_INTROP_SETMASK: @@ -2158,7 +2157,7 @@ sbus_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_SUPPORTED_TYPES: /* Sbus nexus driver supports only fixed interrupts */ - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: diff --git a/usr/src/uts/sun4u/io/upa64s.c b/usr/src/uts/sun4u/io/upa64s.c index 98c6914863..7d5afc38b2 100644 --- a/usr/src/uts/sun4u/io/upa64s.c +++ b/usr/src/uts/sun4u/io/upa64s.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -744,7 +743,7 @@ upa64_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SETCAP: case DDI_INTROP_SETMASK: @@ -754,7 +753,7 @@ upa64_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_SUPPORTED_TYPES: /* only support fixed interrupts */ - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: diff --git a/usr/src/uts/sun4u/opl/io/pcicmu/pcicmu.c b/usr/src/uts/sun4u/opl/io/pcicmu/pcicmu.c index a3dcec894a..0b7cb1c33f 100644 --- a/usr/src/uts/sun4u/opl/io/pcicmu/pcicmu.c +++ b/usr/src/uts/sun4u/opl/io/pcicmu/pcicmu.c @@ -984,11 +984,11 @@ pcmu_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SUPPORTED_TYPES: /* PCI nexus driver supports only fixed interrupts */ - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: diff --git a/usr/src/uts/sun4u/sunfire/io/fhc.c b/usr/src/uts/sun4u/sunfire/io/fhc.c index e310fa8b6a..3b49bb17ec 100644 --- a/usr/src/uts/sun4u/sunfire/io/fhc.c +++ b/usr/src/uts/sun4u/sunfire/io/fhc.c @@ -1456,7 +1456,7 @@ fhc_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SETCAP: case DDI_INTROP_SETMASK: @@ -1466,7 +1466,7 @@ fhc_intr_ops(dev_info_t *dip, dev_info_t *rdip, ddi_intr_op_t intr_op, break; case DDI_INTROP_SUPPORTED_TYPES: /* only support fixed interrupts */ - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: diff --git a/usr/src/uts/sun4v/io/vnex.c b/usr/src/uts/sun4v/io/vnex.c index e30506c23a..25f0d3af94 100644 --- a/usr/src/uts/sun4v/io/vnex.c +++ b/usr/src/uts/sun4v/io/vnex.c @@ -554,10 +554,10 @@ vnex_intr_ops(dev_info_t *dip, dev_info_t *rdip, break; case DDI_INTROP_NINTRS: case DDI_INTROP_NAVAIL: - *(int *)result = i_ddi_get_nintrs(rdip); + *(int *)result = i_ddi_get_intx_nintrs(rdip); break; case DDI_INTROP_SUPPORTED_TYPES: - *(int *)result = i_ddi_get_nintrs(rdip) ? + *(int *)result = i_ddi_get_intx_nintrs(rdip) ? DDI_INTR_TYPE_FIXED : 0; break; default: |