Hi,
First of all, it seems that mask/unmask of MSI has problems.
- Per-vector masking is optional for MSI, so I think that allocating
multiple messages for a function without masking capability would be
not good idea, since all vector in the block will be masked/unmasked
at once without any agreement.
- Even if the function supports per-vector masking, current
mask/unmask_msi_irq() functions assume that MSI uses only one vector,
therefore they only set/unset the first bit of the maskbits which
for the first vector of the block. The bits for other vectors are
initialized as 'masked' but no one unmask them.
Matthew Wilcox wrote:
I think we should return -EINVAL here.
No one guarantee that 32 interrupts is able to be allocate at this time.
And also I think -EINVAL should be returned if nvec is greater than
the number of encoded in the function's "Multiple Message Capable", but
I could not find any mention about handling of such over-capability request
in PCI Bus Spec. 3.0.
Thanks,
H.Seto
--