tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: change MSI/MSI-X APIs



Hi,

On 2015/07/15 23:27, Christos Zoulas wrote:
> 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).

Thank you for your comment. I fix pci_intr_alloc() uses int *counts.
I also fix missing about man installation and some wording. Here is
new patch,
    http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api2.patch

>> http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api-wm-example.patch
> 
> I like the patch. There is a typo "interrput".

I fix typo and update counts of pci_intr_alloc() to use int * type.
Here is new patch,
    http://netbsd.org/~knakahara/unify-alloc-api/unify-alloc-api-wm-example2.patch

>> Could you comment this patch?
> 
> I like it! Thanks for working on this...

Could you comment? If there is no issue, I'm going to commit these
patches after a few days or weeks.


Thanks,

-- 
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
Core Product Development Department,
Product Division,
Technology Unit

Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>



Home | Main Index | Thread Index | Old Index