From: Jiri Slaby <jslaby@suse.cz>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH 02/70] mxser: renumber mxser_cards
Date: Fri, 18 Jun 2021 08:14:08 +0200 [thread overview]
Message-ID: <20210618061516.662-3-jslaby@suse.cz> (raw)
In-Reply-To: <20210618061516.662-1-jslaby@suse.cz>
After the ISA cards removal in the previous patch, the mxser_cards array
has holes in it. So renumber the array while updating PCI device's
driver_data.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/mxser.c | 80 +++++++++++++++++++++------------------------
1 file changed, 37 insertions(+), 43 deletions(-)
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 3a00f180f54a..ef539f084e55 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -95,69 +95,63 @@ struct mxser_cardinfo {
};
static const struct mxser_cardinfo mxser_cards[] = {
-/* 0*/ { },
- { },
- { },
- { "C168H/PCI series", 8, },
+/* 0*/ { "C168H/PCI series", 8, },
{ "C104H/PCI series", 4, },
-/* 5*/ { },
- { },
- { },
{ "CP-132 series", 2, },
{ "CP-114 series", 4, },
-/*10*/ { "CT-114 series", 4, },
- { "CP-102 series", 2, MXSER_HIGHBAUD },
+ { "CT-114 series", 4, },
+/* 5*/ { "CP-102 series", 2, MXSER_HIGHBAUD },
{ "CP-104U series", 4, },
{ "CP-168U series", 8, },
{ "CP-132U series", 2, },
-/*15*/ { "CP-134U series", 4, },
- { "CP-104JU series", 4, },
+ { "CP-134U series", 4, },
+/*10*/ { "CP-104JU series", 4, },
{ "Moxa UC7000 Serial", 8, }, /* RC7000 */
{ "CP-118U series", 8, },
{ "CP-102UL series", 2, },
-/*20*/ { "CP-102U series", 2, },
- { "CP-118EL series", 8, },
+ { "CP-102U series", 2, },
+/*15*/ { "CP-118EL series", 8, },
{ "CP-168EL series", 8, },
{ "CP-104EL series", 4, },
{ "CB-108 series", 8, },
-/*25*/ { "CB-114 series", 4, },
- { "CB-134I series", 4, },
+ { "CB-114 series", 4, },
+/*20*/ { "CB-134I series", 4, },
{ "CP-138U series", 8, },
{ "POS-104UL series", 4, },
{ "CP-114UL series", 4, },
-/*30*/ { "CP-102UF series", 2, },
- { "CP-112UL series", 2, },
+ { "CP-102UF series", 2, },
+/*25*/ { "CP-112UL series", 2, },
};
/* driver_data correspond to the lines in the structure above
see also ISA probe function before you change something */
static const struct pci_device_id mxser_pcibrds[] = {
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_C168), .driver_data = 3 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_C104), .driver_data = 4 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP132), .driver_data = 8 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP114), .driver_data = 9 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CT114), .driver_data = 10 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP102), .driver_data = 11 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP104U), .driver_data = 12 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP168U), .driver_data = 13 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP132U), .driver_data = 14 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP134U), .driver_data = 15 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP104JU),.driver_data = 16 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_RC7000), .driver_data = 17 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP118U), .driver_data = 18 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP102UL),.driver_data = 19 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP102U), .driver_data = 20 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP118EL),.driver_data = 21 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP168EL),.driver_data = 22 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP104EL),.driver_data = 23 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CB108), .driver_data = 24 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CB114), .driver_data = 25 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CB134I), .driver_data = 26 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP138U), .driver_data = 27 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_POS104UL), .driver_data = 28 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP114UL), .driver_data = 29 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP102UF), .driver_data = 30 },
- { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP112UL), .driver_data = 31 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_C168), .driver_data = 0 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_C104), .driver_data = 1 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP132), .driver_data = 2 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP114), .driver_data = 3 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CT114), .driver_data = 4 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP102), .driver_data = 5 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP104U), .driver_data = 6 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP168U), .driver_data = 7 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP132U), .driver_data = 8 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP134U), .driver_data = 9 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP104JU),.driver_data = 10 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_RC7000), .driver_data = 11 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP118U), .driver_data = 12 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP102UL),.driver_data = 13 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP102U), .driver_data = 14 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP118EL),.driver_data = 15 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP168EL),.driver_data = 16 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_MOXA_CP104EL),.driver_data = 17 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CB108), .driver_data = 18 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CB114), .driver_data = 19 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CB134I), .driver_data = 20 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP138U), .driver_data = 21 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_POS104UL), .driver_data = 22 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP114UL), .driver_data = 23 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP102UF), .driver_data = 24 },
+ { PCI_VDEVICE(MOXA, PCI_DEVICE_ID_CP112UL), .driver_data = 25 },
{ }
};
MODULE_DEVICE_TABLE(pci, mxser_pcibrds);
--
2.32.0
next prev parent reply other threads:[~2021-06-18 6:15 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 6:14 [PATCH 00/69] mxser: cleanup Jiri Slaby
2021-06-18 6:14 ` [PATCH 01/70] mxser: drop ISA support Jiri Slaby
2021-06-18 6:14 ` Jiri Slaby [this message]
2021-06-18 6:14 ` [PATCH 03/70] mxser: remove info printout from init Jiri Slaby
2021-06-18 6:14 ` [PATCH 04/70] mxser: integrate mxser.h into .c Jiri Slaby
2021-06-18 6:14 ` [PATCH 05/70] mxser: cleanup Gpci_uart_info struct Jiri Slaby
2021-06-18 6:14 ` [PATCH 06/70] mxser: rename CheckIsMoxaMust to mxser_get_must_hwid Jiri Slaby
2021-06-18 6:14 ` [PATCH 07/70] mxser: rename mxser_board::chip_flag to must_hwid Jiri Slaby
2021-06-18 6:14 ` [PATCH 08/70] mxser: introduce enum mxser_must_hwid Jiri Slaby
2021-06-18 6:14 ` [PATCH 09/70] mxser: drop constant board::uart_type Jiri Slaby
2021-06-18 6:14 ` [PATCH 10/70] mxser: move max_baud from port to board Jiri Slaby
2021-06-18 6:14 ` [PATCH 11/70] mxser: remove nonsense from ISR Jiri Slaby
2021-06-18 6:14 ` [PATCH 12/70] mxser: cleanup LSR handling in mxser_receive_chars Jiri Slaby
2021-06-18 6:14 ` [PATCH 13/70] mxser: extract port ISR Jiri Slaby
2021-06-18 6:14 ` [PATCH 14/70] mxser: simplify mxser_interrupt and drop mxser_board::vector_mask Jiri Slaby
2021-06-18 6:14 ` [PATCH 15/70] mxser: extract mxser_receive_chars_new Jiri Slaby
2021-06-18 6:14 ` [PATCH 16/70] mxser: extract mxser_receive_chars_old Jiri Slaby
2021-06-18 6:14 ` [PATCH 17/70] mxser: remove else from LSR bits checks Jiri Slaby
2021-06-18 6:14 ` [PATCH 18/70] mxser: correct types for uart variables Jiri Slaby
2021-06-18 6:14 ` [PATCH 19/70] mxser: make xmit ring buffer variables unsigned Jiri Slaby
2021-06-18 6:14 ` [PATCH 20/70] mxser: drop UART_MCR_AFE and UART_LSR_SPECIAL defines Jiri Slaby
2021-06-18 6:14 ` [PATCH 21/70] mxser: drop unused MOXA_DIAGNOSE macro Jiri Slaby
2021-06-18 6:14 ` [PATCH 22/70] mxser: remove MOXA_GET_MAJOR deprecated ioctl Jiri Slaby
2021-06-18 6:14 ` [PATCH 23/70] mxser: remove MOXA_SET_BAUD_METHOD ioctl Jiri Slaby
2021-06-18 6:14 ` [PATCH 24/70] mxser: remove MOXA_ASPP_MON and friends Jiri Slaby
2021-06-18 6:14 ` [PATCH 25/70] mxser: remove MOXA_ASPP_LSTATUS ioctl Jiri Slaby
2021-06-18 6:14 ` [PATCH 26/70] mxser: remove MOXA_CHKPORTENABLE ioctl Jiri Slaby
2021-06-18 6:14 ` [PATCH 27/70] mxser: remove MOXA_GETDATACOUNT ioctl Jiri Slaby
2021-06-18 6:14 ` [PATCH 28/70] mxser: remove MOXA_GETMSTATUS ioctl Jiri Slaby
2021-06-18 6:14 ` [PATCH 29/70] mxser: remove MOXA_ASPP_OQUEUE ioctl Jiri Slaby
2021-06-18 6:14 ` [PATCH 30/70] mxser: remove MOXA_HighSpeedOn ioctl Jiri Slaby
2021-06-18 6:14 ` [PATCH 31/70] mxser: remove cnt from mxser_receive_chars Jiri Slaby
2021-06-18 6:14 ` [PATCH 32/70] mxser: don't allocate MXSER_PORTS + 1 Jiri Slaby
2021-06-18 6:14 ` [PATCH 33/70] mxser: drop unused mxser_port::normal_termios Jiri Slaby
2021-06-18 6:14 ` [PATCH 34/70] mxser: remove unused mxser_port::stop_rx Jiri Slaby
2021-06-18 6:14 ` [PATCH 35/70] mxser: drop mxser_port::baud_base Jiri Slaby
2021-06-18 6:14 ` [PATCH 36/70] mxser: drop mxser_port::custom_divisor Jiri Slaby
2021-06-18 6:14 ` [PATCH 37/70] mxser: cleanup mxser_change_speed Jiri Slaby
2021-06-18 6:14 ` [PATCH 38/70] mxser: extract mxser_ioctl_op_mode Jiri Slaby
2021-06-18 6:14 ` [PATCH 39/70] mxser: simplify mxser_ioctl_op_mode Jiri Slaby
2021-06-18 6:14 ` [PATCH 40/70] mxser: dedup mxser_must_set_enhance_mode Jiri Slaby
2021-06-18 6:14 ` [PATCH 41/70] mxser: introduce mxser_must_select_bank and use it Jiri Slaby
2021-06-18 6:14 ` [PATCH 42/70] mxser: clean up the rest of MUST helpers Jiri Slaby
2021-06-18 6:14 ` [PATCH 43/70] mxser: move board init into mxser_initbrd Jiri Slaby
2021-06-18 6:14 ` [PATCH 44/70] mxser: inline mxser_board_remove into mxser_remove Jiri Slaby
2021-06-18 6:14 ` [PATCH 45/70] mxser: pci, switch to managed resources Jiri Slaby
2021-06-18 6:14 ` [PATCH 46/70] mxser: move request irq to probe and switch to managed Jiri Slaby
2021-06-18 6:14 ` [PATCH 47/70] mxser: remove info message from probe Jiri Slaby
2021-06-18 6:14 ` [PATCH 48/70] mxser: remove mxser_cardinfo Jiri Slaby
2021-06-18 6:14 ` [PATCH 49/70] mxser: cleanup mxser_process_txrx_fifo Jiri Slaby
2021-06-18 6:14 ` [PATCH 50/70] mxser: rework and simplify mxser_open Jiri Slaby
2021-06-18 6:14 ` [PATCH 51/70] mxser: make mxser_board::idx really an index Jiri Slaby
2021-06-18 6:14 ` [PATCH 52/70] mxser: alloc struct mxser_board dynamically Jiri Slaby
2021-06-18 6:14 ` [PATCH 53/70] mxser: alloc only needed # of ports Jiri Slaby
2021-06-18 6:15 ` [PATCH 54/70] mxser: remove pointless ioaddr checks Jiri Slaby
2021-06-18 6:15 ` [PATCH 55/70] mxser: cleanup mxser_rs_break Jiri Slaby
2021-06-18 6:15 ` [PATCH 56/70] mxser: cleanup mxser_dtr_rts Jiri Slaby
2021-06-18 6:15 ` [PATCH 57/70] mxser: don't start TX from tty_operations::put_char Jiri Slaby
2021-06-18 6:15 ` [PATCH 58/70] mxser: extract and dedup CTS handling Jiri Slaby
2021-06-18 6:15 ` [PATCH 59/70] mxser: introduce and use start/stop_tx helpers Jiri Slaby
2021-06-18 6:15 ` [PATCH 60/70] mxser: remove xmit_cnt < 0 tests Jiri Slaby
2021-06-18 6:15 ` [PATCH 61/70] mxser: decrypt FCR values Jiri Slaby
2021-06-18 6:15 ` [PATCH 62/70] mxser: fix typos around enhanced mode Jiri Slaby
2021-06-18 6:15 ` [PATCH 63/70] mxser: access info->MCR under info->slock Jiri Slaby
2021-06-18 6:15 ` [PATCH 64/70] mxser: use port variable in mxser_set_serial_info Jiri Slaby
2021-06-18 6:15 ` [PATCH 65/70] mxser: rename flags to old_speed " Jiri Slaby
2021-06-18 6:15 ` [PATCH 66/70] mxser: introduce mxser_16550A_or_MUST helper Jiri Slaby
2021-06-18 6:15 ` [PATCH 67/70] mxser: Documentation, remove traces of callout device Jiri Slaby
2021-06-18 6:15 ` [PATCH 68/70] mxser: Documentation, make the docs up-to-date Jiri Slaby
2021-06-18 6:15 ` [PATCH 69/70] mxser: Documentation, fix typos Jiri Slaby
2021-06-18 6:15 ` [PATCH 70/70] MAINTAINERS: add me back as mxser maintainer Jiri Slaby
2021-06-18 11:10 ` [PATCH 00/69] mxser: cleanup Greg KH
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=20210618061516.662-3-jslaby@suse.cz \
--to=jslaby@suse.cz \
--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).