From: Jan Kiszka <jan.kiszka@siemens.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-serial@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit
Date: Wed, 4 Jan 2017 20:36:51 +0100 [thread overview]
Message-ID: <0250c46e-da6c-71f3-50ae-b7c17fd0bd2c@siemens.com> (raw)
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>
---
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
next reply other threads:[~2017-01-04 19:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 19:36 Jan Kiszka [this message]
2017-01-04 22:19 ` [PATCH] serial: 8250_lpss: Release Quark MSI vectors on exit Andy Shevchenko
2017-01-04 22:46 ` Jan Kiszka
2017-01-04 22:52 ` Andy Shevchenko
2017-01-05 5:25 ` Christoph Hellwig
2017-01-05 7:03 ` Jan Kiszka
2017-01-08 10:24 ` Christoph Hellwig
2017-01-08 16:04 ` Andy Shevchenko
2017-01-05 5:25 ` Christoph Hellwig
2017-01-05 9:01 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0250c46e-da6c-71f3-50ae-b7c17fd0bd2c@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).