serial: 8250: remove obsolete and broken PORT_RSA support
Subsystems (2)
PATCH v3 1/1 serial: 8250: remove obsolete and broken PORT_RSA support
From: Arnd Bergmann <[email protected]>
For all I can tell, the RSA support in the 8250 driver is not functional and has not been for a long time.
The RSA-DV II/S ISA card[1] was sold by IODATA in the 1990s as a faster alternative to regular ISA serial ports, and it was discontinued in 2002. Linux support was added by Kiyokazu SUTO in 2000.
The driver defines an I/O port base address of -8 (negative eight), which should always get refused by request_region on all architectures for being outside of the valid resource range.
Further, it seems that a patch to setserial would be required in order to set PORT_RSA when not using autoconfiguration.
This patch removes all code related to the RSA support, with the exception of the user-visible PORT_RSA definition.
---
v2: rebased my own patch after 15 years
v3: fix up Makefile and sunsu.c file
--- drivers/tty/serial/8250/8250.h | 17 -- drivers/tty/serial/8250/8250_core.c | 6 - drivers/tty/serial/8250/8250_platform.c | 4 - drivers/tty/serial/8250/8250_port.c | 8 - drivers/tty/serial/8250/8250_rsa.c | 209 ------------------------ drivers/tty/serial/8250/Kconfig | 11 -- drivers/tty/serial/8250/Makefile | 1 - drivers/tty/serial/sunsu.c | 92 ----------- include/uapi/linux/serial_reg.h | 51 ------ 9 files changed, 399 deletions(-) delete mode 100644 drivers/tty/serial/8250/8250_rsa.c
drivers/tty/serial/8250/8250.h +0 -17
@@ -126,9 +126,6 @@ void serial8250_isa_init_ports(void);extern struct platform_device *serial8250_isa_devs; -extern const struct uart_ops *univ8250_port_base_ops; -extern struct uart_ops univ8250_port_ops; -static inline int serial_in (struct uart_8250_port *up,int offset) {return up->port.serial_in (&up->port, offset);
@@ -323,20 +320,6 @@ static inline int serial8250_pnp_init(void) { return 0; }static inline void serial8250_pnp_exit (void ) { }#endif -#ifdef CONFIG_SERIAL_8250_RSA -void univ8250_rsa_support (struct uart_ops *ops,const struct uart_ops *core_ops); -void rsa_enable (struct uart_8250_port *up); -void rsa_disable (struct uart_8250_port *up); -void rsa_autoconfig (struct uart_8250_port *up); -void rsa_reset (struct uart_8250_port *up); -#else -static inline void univ8250_rsa_support (struct uart_ops *ops,const struct uart_ops *core_ops) { } -static inline void rsa_enable (struct uart_8250_port *up) {} -static inline void rsa_disable (struct uart_8250_port *up) {} -static inline void rsa_autoconfig (struct uart_8250_port *up) {} -static inline void rsa_reset (struct uart_8250_port *up) {} -#endif -#ifdef CONFIG_SERIAL_8250_FINTEK int fintek_8250_probe (struct uart_8250_port *uart);#else
drivers/tty/serial/8250/8250_core.c +0 -6
@@ -307,9 +307,6 @@ static void univ8250_release_irq(struct uart_8250_port *up)serial_unlink_irq_chain (up); } -const struct uart_ops *univ8250_port_base_ops; -struct uart_ops univ8250_port_ops; -static const struct uart_8250_ops univ8250_driver_ops = { .setup_irq = univ8250_setup_irq, .release_irq = univ8250_release_irq,
@@ -352,9 +349,6 @@ struct uart_8250_port *serial8250_setup_port(int index) up->port.port_id = index;serial8250_init_port (up); -if (!univ8250_port_base_ops) - univ8250_port_base_ops = up->port.ops; - up->port.ops = &univ8250_port_ops;timer_setup (&up->timer, serial8250_timeout,0 );
drivers/tty/serial/8250/8250_platform.c +0 -4
@@ -73,10 +73,6 @@ static void __init __serial8250_isa_init_ports(void)for (i =0 ; i < nr_uarts; i++)serial8250_setup_port (i); -/* chain base port ops to support Remote Supervisor Adapter */ - univ8250_port_ops = *univ8250_port_base_ops; -univ8250_rsa_support (&univ8250_port_ops, univ8250_port_base_ops); -for (i =0 ; i <ARRAY_SIZE (old_serial_port) && i < nr_uarts; i++) {struct uart_8250_port *up =serial8250_get_port (i);struct uart_port *port = &up->port;
drivers/tty/serial/8250/8250_port.c +0 -8
@@ -1186,8 +1186,6 @@ static void autoconfig(struct uart_8250_port *up)break ; } -rsa_autoconfig (up); -serial_out (up,UART_LCR , save_lcr); port->fifosize = uart_config[up->port.type].fifo_size;
@@ -1199,7 +1197,6 @@ static void autoconfig(struct uart_8250_port *up)/* * Reset the UART. */ -rsa_reset (up);serial8250_out_MCR (up, save_mcr);serial8250_clear_fifos (up);serial_in (up,UART_RX );
@@ -2156,9 +2153,6 @@ static void serial8250_startup_special(struct uart_port *port)UART_DA830_PWREMU_MGMT_URRST | UART_DA830_PWREMU_MGMT_FREE);break ; -case PORT_RSA : -rsa_enable (up); -break ; } }
@@ -2450,8 +2444,6 @@ void serial8250_do_shutdown(struct uart_port *port)serial8250_clear_fifos (up); -rsa_disable (up); -/* * Read data port to reset things, and then unlink from * the IRQ chain.
drivers/tty/serial/8250/8250_rsa.c deleted +0 -209
209 lines not on this page · raw message
drivers/tty/serial/8250/Kconfig +0 -11
@@ -236,17 +236,6 @@ config SERIAL_8250_DETECT_IRQ If unsure, say N. -config SERIAL_8250_RSA - bool "Support RSA serial ports" - depends on SERIAL_8250_EXTENDED - help - Say Y here if you have a IODATA RSA-DV II/S ISA card and - would like to use its >115kbps speeds. - You will need to provide module parameter "probe_rsa", or boot-time - parameter 8250.probe_rsa with I/O addresses of this card then. - - If you don't have such card, or if unsure, say N. - config SERIAL_8250_MANY_PORTS bool "Support more than 4 legacy serial ports" depends on SERIAL_8250_EXTENDED
drivers/tty/serial/8250/Makefile +0 -1
@@ -14,7 +14,6 @@ obj-$(CONFIG_SERIAL_8250) += 8250_base.o 8250_base-$(CONFIG_SERIAL_8250_DWLIB) += 8250_dwlib.o 8250_base-$(CONFIG_SERIAL_8250_FINTEK) += 8250_fintek.o 8250_base-$(CONFIG_SERIAL_8250_PCILIB) += 8250_pcilib.o -8250_base-$(CONFIG_SERIAL_8250_RSA) += 8250_rsa.o obj-$(CONFIG_SERIAL_8250_CONSOLE) += 8250_early.o
drivers/tty/serial/sunsu.c +0 -92
122 lines not on this page · raw message
include/uapi/linux/serial_reg.h +0 -51
57 lines not on this page · raw message
Signature · 1 line
2.53.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 16 lines
From: Arnd Bergmann <[email protected]>
For all I can tell, the RSA support in the 8250 driver is not functional and has not been for a long time.
The RSA-DV II/S ISA card[1] was sold by IODATA in the 1990s as a faster alternative to regular ISA serial ports, and it was discontinued in 2002. Linux support was added by Kiyokazu SUTO in 2000.
The driver defines an I/O port base address of -8 (negative eight), which should always get refused by
request_regionon all architectures for being outside of the valid resource range.Further, it seems that a patch to setserial would be required in order to set
PORT_RSAwhen not using autoconfiguration.
Quoted 6 lines
This patch removes all code related to the RSA support, with the exception of the user-visible
PORT_RSAdefinition.
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Greg Kroah-Hartman
maintainerQuoted 25 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
For all I can tell, the RSA support in the 8250 driver is not functional and has not been for a long time.
The RSA-DV II/S ISA card[1] was sold by IODATA in the 1990s as a faster alternative to regular ISA serial ports, and it was discontinued in 2002. Linux support was added by Kiyokazu SUTO in 2000.
The driver defines an I/O port base address of -8 (negative eight), which should always get refused by
request_regionon all architectures for being outside of the valid resource range.Further, it seems that a patch to setserial would be required in order to set
PORT_RSAwhen not using autoconfiguration.This patch removes all code related to the RSA support, with the exception of the user-visible
PORT_RSAdefinition.Signed-off-by Arnd Bergmann <[email protected]>---
v2: rebased my own patch after 15 years
v3: fix upMakefileandsunsu.cfile
Quoted 12 lines
--- drivers/tty/serial/8250/8250.h | 17 -- drivers/tty/serial/8250/8250_core.c | 6 - drivers/tty/serial/8250/8250_platform.c | 4 - drivers/tty/serial/8250/8250_port.c | 8 - drivers/tty/serial/8250/8250_rsa.c | 209 ------------------------ drivers/tty/serial/8250/Kconfig | 11 -- drivers/tty/serial/8250/Makefile | 1 - drivers/tty/serial/sunsu.c | 92 ----------- include/uapi/linux/serial_reg.h | 51 ------ 9 files changed, 399 deletions(-) delete mode 100644 drivers/tty/serial/8250/8250_rsa.c
Any objection for me to sneak this into 7.4-rc1?
thanks,
greg k-h
Quoted 16 lines · Greg Kroah-Hartman
Quoted 14 lines · Arnd Bergmann
For all I can tell, the RSA support in the 8250 driver is not functional and has not been for a long time.
The RSA-DV II/S ISA card[1] was sold by IODATA in the 1990s as a faster alternative to regular ISA serial ports, and it was discontinued in 2002. Linux support was added by Kiyokazu SUTO in 2000.
The driver defines an I/O port base address of -8 (negative eight), which should always get refused by
request_regionon all architectures for being outside of the valid resource range.Further, it seems that a patch to setserial would be required in order to set
PORT_RSAwhen not using autoconfiguration.
Quoted 7 lines
Quoted 5 lines
This patch removes all code related to the RSA support, with the exception of the user-visible
PORT_RSAdefinition.Any objection for me to sneak this into 7.4-rc1?
This is a good removal change, but I would like to make Link tags neater, if Arnd sends a v4 sooner, I will tag it for early v7.4 (which is indeed a good candidate to have this).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 2 lines · Greg Kroah-Hartman
Any objection for me to sneak this into 7.4-rc1?
Sounds fair to me, and it looks like there are no objections from others either. I've resent this as [v4 1/2] now with the patch description changed and rebased so it does not depend on the hub6 patch, which now comes second.
Arnd
Quoted 11 lines · Arnd Bergmann
For all I can tell, the RSA support in the 8250 driver is not functional and has not been for a long time.
The RSA-DV II/S ISA card[1] was sold by IODATA in the 1990s as a faster alternative to regular ISA serial ports, and it was discontinued in 2002. Linux support was added by Kiyokazu SUTO in 2000.
The driver defines an I/O port base address of -8 (negative eight), which should always get refused by
request_regionon all architectures for being outside of the valid resource range.
Quoted 7 lines
Further, it seems that a patch to setserial would be required in order to set
PORT_RSAwhen not using autoconfiguration.This patch removes all code related to the RSA support, with the exception of the user-visible
PORT_RSAdefinition.
Can we get this without translate? As it adds an unneeded layer.
Quoted 1 line
Also would be nice to add references to the Link tags like [1] and [2] and mention them in the commit message where appropriate.
Quoted 1 line
Signed-off-by Arnd Bergmann <[email protected]>
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 16 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
For all I can tell, the RSA support in the 8250 driver is not functional and has not been for a long time.
The RSA-DV II/S ISA card[1] was sold by IODATA in the 1990s as a faster alternative to regular ISA serial ports, and it was discontinued in 2002. Linux support was added by Kiyokazu SUTO in 2000.
The driver defines an I/O port base address of -8 (negative eight), which should always get refused by
request_regionon all architectures for being outside of the valid resource range.Further, it seems that a patch to setserial would be required in order to set
PORT_RSAwhen not using autoconfiguration.
Quoted 6 lines
This patch removes all code related to the RSA support, with the exception of the user-visible
PORT_RSAdefinition.
Signature · 2 lines
js suse labs
Quoted 3 lines · Arnd Bergmann
The driver defines an I/O port base address of -8 (negative eight), which should always get refused by
request_regionon all architectures for being outside of the valid resource range.
For completeness only since I have nothing to do with this hardware: it
does not appear to me that the negative offset ought to cause any refusal. In rsa8250_request_resource() we currently have:
start = UART_RSA_BASE << port->regshift; start += port->iobase; size = 8 << port->regshift; if (!request_region(start, size, "serial-rsa")) return -EBUSY;
so the only peculiarity is that the 8-byte region requested is actually below `port->iobase', presumably relative to standard ISA serial port port I/O locations of 0x3f8, 0x2f8, 0x3e8, 0x2e8, possibly not to clash with conventional ISA serial port devices where also present in a system (for simplicity assuming that `port->regshift' is 0; adjust the calculations accordingly if not). So offhand nothing wrong here and please consider discarding the paragraph.
Maciej
Quoted 4 lines · Maciej W. Rozycki
so the only peculiarity is that the 8-byte region requested is actually below `port->iobase', presumably relative to standard ISA serial port port I/O locations of
0x3f8,0x2f8,0x3e8,0x2e8, possibly not to clash with conventional ISA serial port devices where also present in a system (for
Or, to self-correct after a few more mind cycles spent on this piece, the
region below `port->iobase' is an expansion of one above, where standard 8250 registers of the onboard serial port reside. Which makes even more sense, to me anyway.
Maciej
Quoted 11 lines · Maciej W. Rozycki
Quoted 4 lines · Maciej W. Rozycki
so the only peculiarity is that the 8-byte region requested is actually below `port->iobase', presumably relative to standard ISA serial port port I/O locations of
0x3f8,0x2f8,0x3e8,0x2e8, possibly not to clash with conventional ISA serial port devices where also present in a system (forOr, to self-correct after a few more mind cycles spent on this piece, the
region below `port->iobase' is an expansion of one above, where standard 8250 registers of the onboard serial port reside. Which makes even more sense, to me anyway.
Good catch, so it should still work the same way it was originally designed, though I think it still requires a modified setserial to set PORT_RSA, or a boot time argument for autoconfiguration with UART_CONFIG_TYPE.
I've updated the changelog text accordingly for v4.
Arnd
Quoted 9 lines · Arnd Bergmann
Quoted 4 lines
Or, to self-correct after a few more mind cycles spent on this piece, the
region below `port->iobase' is an expansion of one above, where standard 8250 registers of the onboard serial port reside. Which makes even more sense, to me anyway.Good catch, so it should still work the same way it was originally designed, though I think it still requires a modified setserial to set
PORT_RSA, or a boot time argument for autoconfiguration withUART_CONFIG_TYPE.
Well, this is ISA, what do you expect? We've dropped lots of stuff that
required perhaps even more complex manual configuration already (QIC-02 tapes, anyone?).
Maciej
Quoted 7 lines · Maciej W. Rozycki
Quoted 5 lines · Arnd Bergmann
Quoted 4 lines
Or, to self-correct after a few more mind cycles spent on this piece, the
region below `port->iobase' is an expansion of one above, where standard 8250 registers of the onboard serial port reside. Which makes even more sense, to me anyway.
Quoted 8 lines
Quoted 4 lines
Good catch, so it should still work the same way it was originally designed, though I think it still requires a modified setserial to set
PORT_RSA, or a boot time argument for autoconfiguration withUART_CONFIG_TYPE.Well, this is ISA, what do you expect? We've dropped lots of stuff that
required perhaps even more complex manual configuration already (QIC-02 tapes, anyone?).
I pointed it out because this is the only UART driver that relies on that specific mechanism. Everything else uses either hardcoded port numbers that like the 3f8/2f8/3e8/2e8 ports for PC compatibility or they rely on PnP. I understand that we have other network/scsi/sound/iio drivers that also do this.
Arnd