Re: [PATCH 1/4] PCI: allow MSI chip providers to implement their own multiple MSI setup

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

 



Hi Lucas,



On Fri, Jun 13, 2014 at 7:50 PM, Lucas Stach <l.stach@xxxxxxxxxxxxxx> wrote:
> Hi Pratyush,
>
> Am Freitag, den 13.06.2014, 11:12 +0530 schrieb Pratyush Anand:
>>  Hi Lucas,
>>
>>
>> On Thu, Jun 5, 2014 at 8:16 PM, Lucas Stach <l.stach@xxxxxxxxxxxxxx> wrote:
>> > Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
>> > ---
>> >  drivers/pci/msi.c   | 3 +++
>> >  include/linux/msi.h | 2 ++
>> >  2 files changed, 5 insertions(+)
>> >
>> > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
>> > index 27a7e67ddfe4..c45399d3061a 100644
>> > --- a/drivers/pci/msi.c
>> > +++ b/drivers/pci/msi.c
>> > @@ -68,9 +68,12 @@ int __weak arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
>> >
>> >  int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
>> >  {
>> > +       struct msi_chip *chip = dev->bus->msi;
>> >         struct msi_desc *entry;
>> >         int ret;
>> >
>> > +       if (chip && chip->setup_irqs)
>>
>> I think, you should also check here for nvec > 1
>
> No, nvec == 1 is just a special case and is perfectly valid.

So it means that the platform which supports setup_irqs need not
support setup_irq. May be it can be
documented atleast as a comment somewhere and then setup_irq can be
removed from designware driver.

>>
>> > +               return chip->setup_irqs(chip, dev, nvec, type);
>>
>> Before return, shouldn't we set chip_data for all desc->irq?
>
> Setting chip_data is done in the MSI irq domains map callback and is the
> same for single or multiple MSI setup. No need to do anything special
> here.

But I see arch_setup_msi_irq function in this file doing it.

Regards
Pratyush
--
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