From: Dan Williams <dan.j.williams@intel.com>
To: gregkh@suse.de
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
alan@linux.intel.com
Subject: [PATCH v3 2/2] serial/8250_pci: init-quirk msi support for kt serial controller
Date: Tue, 22 Nov 2011 13:41:29 -0800 [thread overview]
Message-ID: <20111122214129.13786.92888.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20111122213859.13786.7738.stgit@localhost6.localdomain6>
The semantics of UPF_IIR_ONCE (once per serial irq) are only guaranteed
if the kt irq is not shared (once per serial isr in the shared case ==
potentially unwanted reads of the IIR).
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
drivers/tty/serial/8250_pci.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c
index 8742ef5..2cbf78f 100644
--- a/drivers/tty/serial/8250_pci.c
+++ b/drivers/tty/serial/8250_pci.c
@@ -1118,6 +1118,18 @@ pci_xr17c154_setup(struct serial_private *priv,
return pci_default_setup(priv, board, port, idx);
}
+static int try_enable_msi(struct pci_dev *dev)
+{
+ /* use msi if available, but fallback to legacy otherwise */
+ pci_enable_msi(dev);
+ return 0;
+}
+
+static void disable_msi(struct pci_dev *dev)
+{
+ pci_disable_msi(dev);
+}
+
#define PCI_VENDOR_ID_SBSMODULARIO 0x124B
#define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B
#define PCI_DEVICE_ID_OCTPRO 0x0001
@@ -1233,7 +1245,9 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
.device = PCI_DEVICE_ID_INTEL_PATSBURG_KT,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
+ .init = try_enable_msi,
.setup = kt_serial_setup,
+ .exit = disable_msi,
},
/*
* ITE
next prev parent reply other threads:[~2011-11-22 21:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 21:41 [PATCH v3 0/2] KT serial controller IIR workaround Dan Williams
2011-11-22 21:41 ` [PATCH v3 1/2] serial/8250_pci: setup-quirk workaround for the kt serial controller Dan Williams
2011-11-22 21:41 ` Dan Williams [this message]
2011-11-22 23:08 ` [PATCH v3 0/2] KT serial controller IIR workaround Alan Cox
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=20111122214129.13786.92888.stgit@localhost6.localdomain6 \
--to=dan.j.williams@intel.com \
--cc=alan@linux.intel.com \
--cc=gregkh@suse.de \
--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).