Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1559559
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] spi: pca2xx-pci: Allow MSI |
| Date | 2017-01-16 10:40 +0100 |
| Message-ID | <t0bVE-6TE-25@gated-at.bofh.it> (permalink) |
| References | <t0bsB-6yd-11@gated-at.bofh.it> <t0bsB-6yd-9@gated-at.bofh.it> |
| Organization | Intel Finland Oy |
On Mon, 2017-01-16 at 10:06 +0100, Jan Kiszka wrote:
> Now that the core is ready for edge-triggered interrupts, we can
> safely
> allow the PCI versions that provide this to enable the feature and,
> thus, have less shared interrupts.
>
My comments below.
> - if (IS_ERR(ssp->clk))
> + if (IS_ERR(ssp->clk))
> return PTR_ERR(ssp->clk);
This doesn't belong to the patch.
> + pci_set_master(dev);
> +
> + ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
> + if (ret < 0) {
> + clk_unregister(ssp->clk);
> + return ret;
> + }
> + ssp->irq = pci_irq_vector(dev, 0);
> +
This looks good, though I would put it closer to the initial place of
ssp->irq assignment, i.e. before clock registering.
> + pci_free_irq_vectors(dev);
> + pci_free_irq_vectors(dev);
You know my answer, right? So, please be sure that we are using
pcim_alloc_irq_vectors().
Yes, I know there is (was?) no such API, needs to be created. Currently
this might make a mess on ->remove().
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/2] spi: pca2xx-pci: Allow MSI Jan Kiszka <jan.kiszka@siemens.com> - 2017-01-16 10:10 +0100
Re: [PATCH 2/2] spi: pca2xx-pci: Allow MSI Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-16 10:40 +0100
Re: [PATCH 2/2] spi: pca2xx-pci: Allow MSI Jan Kiszka <jan.kiszka@siemens.com> - 2017-01-16 18:40 +0100
csiph-web