Lines Matching refs:counts
483 * counts : The array of number of required interrupt handlers.
485 * CAUTION: The size of counts[] must be PCI_INTR_TYPE_SIZE.
488 * If you want to use 5 MSI-X, 1 MSI, or INTx, you use "counts" as
489 * int counts[PCI_INTR_TYPE_SIZE];
490 * counts[PCI_INTR_TYPE_MSIX] = 5;
491 * counts[PCI_INTR_TYPE_MSI] = 1;
492 * counts[PCI_INTR_TYPE_INTX] = 1;
493 * error = pci_intr_alloc(pa, ihps, counts, PCI_INTR_TYPE_MSIX);
496 * and not to use INTx, you use "counts" as
497 * int counts[PCI_INTR_TYPE_SIZE];
498 * counts[PCI_INTR_TYPE_MSIX] = -1;
499 * counts[PCI_INTR_TYPE_MSI] = 1;
500 * counts[PCI_INTR_TYPE_INTX] = 0;
501 * error = pci_intr_alloc(pa, ihps, counts, PCI_INTR_TYPE_MSIX);
503 * If you want to use 3 MSI or INTx, you can use "counts" as
504 * int counts[PCI_INTR_TYPE_SIZE];
505 * counts[PCI_INTR_TYPE_MSI] = 3;
506 * counts[PCI_INTR_TYPE_INTX] = 1;
507 * error = pci_intr_alloc(pa, ihps, counts, PCI_INTR_TYPE_MSI);
517 int *counts, pci_intr_type_t max_type)
523 if (counts == NULL) { /* simple pattern */
530 msix_count = counts[PCI_INTR_TYPE_MSIX];
533 msi_count = counts[PCI_INTR_TYPE_MSI];
536 intx_count = counts[PCI_INTR_TYPE_INTX];
543 if (counts != NULL)
544 memset(counts, 0, sizeof(counts[0]) * PCI_INTR_TYPE_SIZE);
553 if (counts != NULL)
554 counts[PCI_INTR_TYPE_MSIX] = msix_count;
565 if (counts != NULL)
566 counts[PCI_INTR_TYPE_MSI] = msi_count;
575 if (counts != NULL)
576 counts[PCI_INTR_TYPE_INTX] = 1;