Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1551449
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit |
| Date | 2017-01-04 23:30 +0100 |
| Message-ID | <sW2ee-2r4-15@gated-at.bofh.it> (permalink) |
| References | <sVZT4-Ik-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jan 4, 2017 at 9:36 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> No one seems to do this magically in the background, so we have to do
> the job in the exit handler that corresponds to the board setup handler.
>
> Fixes: 60a9244a5d14 ("serial: 8250_lpss: enable MSI for Intel Quark")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
NAK, check the PCI devres code, please.
Christoph, can you amend documentation to make this clear?
I NAKed already third patch related to PCI managed resources (couple
of those regarding to pci_irq_* API)/
> ---
> drivers/tty/serial/8250/8250_lpss.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_lpss.c b/drivers/tty/serial/8250/8250_lpss.c
> index 58cbb30..f09f68a 100644
> --- a/drivers/tty/serial/8250/8250_lpss.c
> +++ b/drivers/tty/serial/8250/8250_lpss.c
> @@ -47,7 +47,7 @@ struct lpss8250_board {
> unsigned long freq;
> unsigned int base_baud;
> int (*setup)(struct lpss8250 *, struct uart_port *p);
> - void (*exit)(struct lpss8250 *);
> + void (*exit)(struct lpss8250 *, struct pci_dev *pdev);
> };
>
> struct lpss8250 {
> @@ -226,9 +226,10 @@ static int qrk_serial_setup(struct lpss8250 *lpss, struct uart_port *port)
> return 0;
> }
>
> -static void qrk_serial_exit(struct lpss8250 *lpss)
> +static void qrk_serial_exit(struct lpss8250 *lpss, struct pci_dev *pdev)
> {
> qrk_serial_exit_dma(lpss);
> + pci_free_irq_vectors(pdev);
> }
>
> static bool lpss8250_dma_filter(struct dma_chan *chan, void *param)
> @@ -324,7 +325,7 @@ static int lpss8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>
> err_exit:
> if (lpss->board->exit)
> - lpss->board->exit(lpss);
> + lpss->board->exit(lpss, pdev);
> return ret;
> }
>
> @@ -333,7 +334,7 @@ static void lpss8250_remove(struct pci_dev *pdev)
> struct lpss8250 *lpss = pci_get_drvdata(pdev);
>
> if (lpss->board->exit)
> - lpss->board->exit(lpss);
> + lpss->board->exit(lpss, pdev);
>
> serial8250_unregister_port(lpss->line);
> }
> --
> 2.1.4
--
With Best Regards,
Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Jan Kiszka <jan.kiszka@siemens.com> - 2017-01-04 21:00 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-04 23:30 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Jan Kiszka <jan.kiszka@siemens.com> - 2017-01-04 23:50 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-05 00:00 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Christoph Hellwig <hch@lst.de> - 2017-01-05 06:30 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Jan Kiszka <jan.kiszka@siemens.com> - 2017-01-05 08:10 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Christoph Hellwig <hch@infradead.org> - 2017-01-08 11:30 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-08 17:10 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Christoph Hellwig <hch@infradead.org> - 2017-01-05 06:30 +0100
Re: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-05 10:10 +0100
csiph-web