tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: change MSI/MSI-X APIs
In article <55A63935.4010001%iij.ad.jp@localhost>,
Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost> wrote:
>Thus, here is the implementation of above specification (include man)
> http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api.patch
>furthermore, here is if_wm usage example by msaitoh@n.o
This has a problem; in the man and code page, you declare pci_intr_alloc as:
+.Ft int
+.Fn pci_intr_alloc "struct pci_attach_args *pa" \
+"pci_intr_handle_t **ihp" "pci_intr_type_t *counts" \
+"pci_intr_type_t max_type"
And then in the examples you are passing it "int counts[x];":
+ int counts[PCI_INTR_TYPE_SIZE];
+ counts[PCI_INTR_TYPE_MSIX] = 5;
+ counts[PCI_INTR_TYPE_MSI] = 1;
+ counts[PCI_INTR_TYPE_INTX] = 1;
+ error = pci_intr_alloc(pa, ihps, counts,
I think you want int *counts in the declaration; this also avoids the problem
of the enum being possibly unsigned (depending on the implementation).
>http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api-wm-example.patch
I like the patch. There is a typo "interrput".
>Could you comment this patch?
I like it! Thanks for working on this...
christos
Home |
Main Index |
Thread Index |
Old Index