tech-kern archive

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

Re: change MSI/MSI-X APIs



On May 18,  3:57pm, k-nakahara%iij.ad.jp@localhost (Kengo NAKAHARA) wrote:
-- Subject: Re: change MSI/MSI-X APIs

| What do you think about below pci_intr_alloc() API?
|     http://mail-index.netbsd.org/tech-kern/2015/05/18/msg018725.html
| 
| I think this API simplify for many device drivers to use, however I am
| unsure this API meets your pointing out.
| Could you comment?

I am fine with it; just some clarifications:

- by max (-1) I meant the maximum number that the bus will allow. The driver
  would then decide how to split the interrupts amongst functions.
- I considered using unsigned int/size_t in the counts argument and then
  I thought that it is best if it agreed with the return type, since we
  overload the return type with (negative error/positive number of interrupts).
  Another way to do this would be to return the number of interrupts allocated
  in the 0'th member of the counts array.

Best,

christos


Home | Main Index | Thread Index | Old Index