Re: MSI messages

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

 



Michael Ellerman wrote:
> On Sun, 2008-12-21 at 01:13 +0400, Manu Abraham wrote:
>> Grant Grundler wrote:
>>> On Sun, Dec 14, 2008 at 03:15:15PM +0400, Manu Abraham wrote:
>>> ...
>>>>> A "GSI" (Generic Sys Interrupt?) is associated with each entry in
>>>>> the MSI-X table. Driver then calls request_irq() to bind an interrupt
>>>>> handler to each GSI. So the driver never directly sees the "message".
>>>> Oh, you mean the array of irq_handlers in the MSI-X table should 
>>>> correspond to a particular message ?
>>> No. I mean each MSI-X entry has an address+message pair and each MSI-X entry
>>> is associated with the parameters passed to each call of request_irq().
>>> Pass in unique private data to each call of request_irq() and the driver
>>> can determine which message was delivered when the ISR gets called.
>>> (ISR == Interrupt Service Routine, aka driver IRQ handler)
>>
>> Is it possible that even when the config space says that multiple messages 
>> are supported, you cannot enable MSI-X ?
> 
> Yes, absolutely. Have a look at pci_msi_check_device() for starters. MSI
> can be disabled globally, or per-device by a quirk, the bridges above
> your device might not support MSI and the arch code may prevent
> MSI/MSI-X for some reason (ie. platform doesn't support it).
> 
> There's also a check in pci_enable_msix() to make sure the entries you
> pass in are valid.
> 
>>  ------------- with MSI-X -------------
>>
>> saa716x_pci_init (0): found a NEMO reference board PCIe card
>> ACPI: PCI Interrupt 0000:05:00.0[A] -> GSI 19 (level, low) -> IRQ 19
>> PCI: Setting latency timer of device 0000:05:00.0 to 64
>> saa716x_request_irq (0): Using MSI-X mode
>> saa716x_enable_msix (0): MSI-X request failed
> 
> For starters you should print the error code returned by
> pci_enable_msix() - unfortunately it returns EINVAL for many different
> reasons, but it will narrow it down a bit.

It does return -22

Regards,
Manu

saa716x_request_irq (0): Using MSI-X mode                                                                      
saa716x_enable_msix (0): MSI-X request failed <-22>                                                            
saa716x_request_irq (0): INT-A Mode                                                                            
    SAA7160 Rev 1 [1131:0000], irq: 19,                                                                        
    mmio: 0xf9480000                                                                                           
    SAA7160 64Bit, MSI Disabled, MSI-X=32 msgs
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux