提交 e86ff4a6 编写于 作者: D Dan Williams 提交者: Greg Kroah-Hartman

serial/8250_pci: init-quirk msi support for kt serial controller

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: NDan Williams <dan.j.williams@intel.com>
Acked-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 448ac154
...@@ -1118,6 +1118,18 @@ pci_xr17c154_setup(struct serial_private *priv, ...@@ -1118,6 +1118,18 @@ pci_xr17c154_setup(struct serial_private *priv,
return pci_default_setup(priv, board, port, idx); 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_VENDOR_ID_SBSMODULARIO 0x124B
#define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B
#define PCI_DEVICE_ID_OCTPRO 0x0001 #define PCI_DEVICE_ID_OCTPRO 0x0001
...@@ -1233,7 +1245,9 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { ...@@ -1233,7 +1245,9 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
.device = PCI_DEVICE_ID_INTEL_PATSBURG_KT, .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT,
.subvendor = PCI_ANY_ID, .subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
.init = try_enable_msi,
.setup = kt_serial_setup, .setup = kt_serial_setup,
.exit = disable_msi,
}, },
/* /*
* ITE * ITE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册