Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576720 > unrolled thread

[PATCH v2 0/7] serial: exar: Fixes and cleanups

Started byJan Kiszka <jan.kiszka@siemens.com>
First post2017-02-08 18:00 +0100
Last post2017-02-10 22:00 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/7] serial: exar: Fixes and cleanups Jan Kiszka <jan.kiszka@siemens.com> - 2017-02-08 18:00 +0100
    [PATCH v2 3/7] serial: exar: Fix feature control register constants Jan Kiszka <jan.kiszka@siemens.com> - 2017-02-08 18:00 +0100
    [PATCH v2 7/7] serial: exar: Enable MSI support Jan Kiszka <jan.kiszka@siemens.com> - 2017-02-08 18:10 +0100
    Re: [PATCH v2 0/7] serial: exar: Fixes and cleanups Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2017-02-10 22:00 +0100

#1576720 — [PATCH v2 0/7] serial: exar: Fixes and cleanups

FromJan Kiszka <jan.kiszka@siemens.com>
Date2017-02-08 18:00 +0100
Subject[PATCH v2 0/7] serial: exar: Fixes and cleanups
Message-ID<t8Di1-2Aw-9@gated-at.bofh.it>
Changes in v2:
- line rewrapped in patch 2 [Andy]
- reordered PCI ID list [Andy]
- removed obsolete constants from 8250_pci [Andy]
- added Commtech devices to 8250_pci blacklist [Andy]

Original intro:

Fixes one fall-out from the exar split-up and two longer pending issue
regarding the correct initialization of exar registers ports > 0.
Furthermore, it moves remaining exar code over to the new module and
also cleans up & fixes some registers defines.

This includes the previously posted "Fix EXAR feature control register
constants".

Note that I have no chance to test the Commtech change on real hardware.

Jan

Jan Kiszka (7):
  serial: exar: Fix mapping of port I/O resources
  serial: exar: Fix initialization of EXAR registers for ports > 0
  serial: exar: Fix feature control register constants
  serial: exar: Move Commtech adapters to 8250_exar as well
  serial: pci: Remove unused pci_boards entries
  serial: exar: Move register defines from uapi header to consumer site
  serial: exar: Enable MSI support

 drivers/tty/serial/8250/8250_exar.c | 129 ++++++++++++++++++++++++-----
 drivers/tty/serial/8250/8250_pci.c  | 161 +-----------------------------------
 drivers/tty/serial/8250/8250_port.c |   6 ++
 include/uapi/linux/serial_reg.h     |  18 ----
 4 files changed, 117 insertions(+), 197 deletions(-)

-- 
2.1.4

[toc] | [next] | [standalone]


#1576721 — [PATCH v2 3/7] serial: exar: Fix feature control register constants

FromJan Kiszka <jan.kiszka@siemens.com>
Date2017-02-08 18:00 +0100
Subject[PATCH v2 3/7] serial: exar: Fix feature control register constants
Message-ID<t8DL3-2L3-15@gated-at.bofh.it>
In reply to#1576720
According to the XR17V352 manual, bit 4 is IrDA control and bit 5 for
485. Fortunately, no driver used them so far.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 include/uapi/linux/serial_reg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/serial_reg.h b/include/uapi/linux/serial_reg.h
index 274d8fc..25b93a7 100644
--- a/include/uapi/linux/serial_reg.h
+++ b/include/uapi/linux/serial_reg.h
@@ -374,8 +374,8 @@
 #define UART_EXAR_DVID		0x8d	/* Device identification */
 
 #define UART_EXAR_FCTR		0x08	/* Feature Control Register */
-#define UART_FCTR_EXAR_IRDA	0x08	/* IrDa data encode select */
-#define UART_FCTR_EXAR_485	0x10	/* Auto 485 half duplex dir ctl */
+#define UART_FCTR_EXAR_IRDA	0x10	/* IrDa data encode select */
+#define UART_FCTR_EXAR_485	0x20	/* Auto 485 half duplex dir ctl */
 #define UART_FCTR_EXAR_TRGA	0x00	/* FIFO trigger table A */
 #define UART_FCTR_EXAR_TRGB	0x60	/* FIFO trigger table B */
 #define UART_FCTR_EXAR_TRGC	0x80	/* FIFO trigger table C */
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1576727 — [PATCH v2 7/7] serial: exar: Enable MSI support

FromJan Kiszka <jan.kiszka@siemens.com>
Date2017-02-08 18:10 +0100
Subject[PATCH v2 7/7] serial: exar: Enable MSI support
Message-ID<t8DUK-33r-21@gated-at.bofh.it>
In reply to#1576720
Use pci_alloc_irq_vectors to enable MSI when available. At least the
XR17V352 supports this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/tty/serial/8250/8250_exar.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index f612da3..b89c4ff 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -283,10 +283,16 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
 
 	priv->board = board;
 
+	pci_set_master(pcidev);
+
+	rc = pci_alloc_irq_vectors(pcidev, 1, 1, PCI_IRQ_ALL_TYPES);
+	if (rc < 0)
+		return rc;
+
 	memset(&uart, 0, sizeof(uart));
 	uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ
 			  | UPF_EXAR_EFR;
-	uart.port.irq = pcidev->irq;
+	uart.port.irq = pci_irq_vector(pcidev, 0);
 	uart.port.dev = &pcidev->dev;
 
 	for (i = 0; i < nr_ports && i < maxnr; i++) {
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1578792

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2017-02-10 22:00 +0100
Message-ID<t9qsp-8pJ-1@gated-at.bofh.it>
In reply to#1576720
On Wed, Feb 08, 2017 at 05:09:02PM +0100, Jan Kiszka wrote:
> Changes in v2:
> - line rewrapped in patch 2 [Andy]
> - reordered PCI ID list [Andy]
> - removed obsolete constants from 8250_pci [Andy]
> - added Commtech devices to 8250_pci blacklist [Andy]
> 
> Original intro:
> 
> Fixes one fall-out from the exar split-up and two longer pending issue
> regarding the correct initialization of exar registers ports > 0.
> Furthermore, it moves remaining exar code over to the new module and
> also cleans up & fixes some registers defines.
> 
> This includes the previously posted "Fix EXAR feature control register
> constants".
> 
> Note that I have no chance to test the Commtech change on real hardware.

+Rob

Hi Rob,
Can you please test these patches on your setup. I don't have a desktop
atm to test.

Regards
Sudip

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web