MAINTAINERS: orphan mxser
Subsystems (30)
PATCH 1/44 MAINTAINERS: orphan mxser
I cannot maintain this driver for years due to missing HW. Let's orphan the entry in MAINTAINERS. And likely drop the driver later as these devices are likely gone from this world. Mxser provides different (out-of-tree) drivers for their current devices.
--- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +1 -2
@@ -12089,8 +12089,7 @@ F: drivers/media/pci/meye/ F: include/uapi/linux/meye.h MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD -M: Jiri Slaby <[email protected]> -S: Maintained +S: Orphan F: Documentation/driver-api/serial/moxa-smartio.rst F: drivers/tty/mxser.*
Signature · 1 line
2.30.1
PATCH 2/44 MAINTAINERS: drop cyclades.com reference
cyclades.com is a dead domain.
--- MAINTAINERS | 1 - 1 file changed, 1 deletion(-)
MAINTAINERS +0 -1
@@ -4885,7 +4885,6 @@ F: include/uapi/linux/cyclades.h CYCLADES PC300 DRIVER S: Orphan -W: http://www.cyclades.com/ F: drivers/net/wan/pc300* CYPRESS_FIRMWARE MEDIA DRIVER
Signature · 1 line
2.30.1
PATCH 3/44 PCI: remove synclink entries from pci_ids
In reply to Jiri SlabyThe drivers were removed in a1f714b44e34 (tty: Remove redundant synclink driver) and 3d608a591b2b (tty: Remove redundant synclinkmp driver).
So remove also the PCI ID entries.
--- include/linux/pci_ids.h | 2 -- 1 file changed, 2 deletions(-)
include/linux/pci_ids.h +0 -2
@@ -2065,8 +2065,6 @@#define PCI_DEVICE_ID_EXAR_XR17V358 0x0358#define PCI_VENDOR_ID_MICROGATE 0x13c0 -#define PCI_DEVICE_ID_MICROGATE_USC 0x0010 -#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030#define PCI_VENDOR_ID_3WARE 0x13C1#define PCI_DEVICE_ID_3WARE_1000 0x1000
Signature · 1 line
2.30.1
Re: [PATCH 03/44] PCI: remove synclink entries from pci_ids
Hi Jiri,
Quoted 4 lines
The drivers were removed in
a1f714b44e34(tty: Remove redundant synclink driver) and3d608a591b2b(tty: Remove redundant synclinkmp driver).So remove also the PCI ID entries.
[...]
Thank you!
Krzysztof
Re: [PATCH 03/44] PCI: remove synclink entries from pci_ids
In reply to Jiri SlabyQuoted 6 lines · Jiri Slaby
The drivers were removed in
a1f714b44e34(tty: Remove redundant synclink driver) and3d608a591b2b(tty: Remove redundant synclinkmp driver).So remove also the PCI ID entries.
Signed-off-by Jiri Slaby <[email protected]>
Applied with Krzysztof's reviewed-by to pci/misc for v5.13, thanks!
Quoted 22 lines
Cc Bjorn Helgaas <[email protected]>--- include/linux/pci_ids.h | 2 -- 1 file changed, 2 deletions(-)include/linux/pci_ids.h +0
-2@@ -2065,8 +2065,6 @@#define PCI_DEVICE_ID_EXAR_XR17V358 0x0358#define PCI_VENDOR_ID_MICROGATE 0x13c0 -#define PCI_DEVICE_ID_MICROGATE_USC 0x0010 -#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030#define PCI_VENDOR_ID_3WARE 0x13C1#define PCI_DEVICE_ID_3WARE_1000 0x1000Signature · 1 line
2.30.1
PATCH 4/44 vgacon: comment on vga_rolled_over
In reply to Jiri SlabyLong time ago, I figured out what this number is good for and documented that locally. But never submitted, so do it now.
--- drivers/video/console/vgacon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/console/vgacon.c +1 -1
@@ -96,7 +96,7 @@ static bool vga_is_gfx;static bool vga_512_chars;static int vga_video_font_height;static int vga_scan_lines__read_mostly ; -static unsigned int vga_rolled_over; +static unsigned int vga_rolled_over;/* last vc_origin offset before wrap */ static bool vgacon_text_mode_force;static bool vga_hardscroll_enabled;
Signature · 6 lines
2.30.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 04/44] vgacon: comment on vga_rolled_over
Quoted 6 lines · Jiri Slaby
Long time ago, I figured out what this number is good for and documented that locally. But never submitted, so do it now.
I think Greg volunteered to take care of these ... Also my brain is toast and I'm not even close to ready to grok vc code to review this properly :-/
Cheers, Daniel
Quoted 24 lines
--- drivers/video/console/vgacon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/video/console/vgacon.c +1
-1@@ -96,7 +96,7 @@ static bool vga_is_gfx;static bool vga_512_chars;static int vga_video_font_height;static int vga_scan_lines__read_mostly ; -static unsigned int vga_rolled_over; +static unsigned int vga_rolled_over;/* last vc_origin offset before wrap */ static bool vgacon_text_mode_force;static bool vga_hardscroll_enabled;Signature · 6 lines
2.30.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/44 tty: cyclades, remove this orphan
In reply to Jiri SlabyThe Cyclades driver was orphaned by commit d459883e6c54 (MAINTAINERS:
remove two dead e-mail) 13 years ago. Noone stepped up to take care of them and to fix all the issues the driver has.
On the top of that, there is no way to obtain the firmware for Z cards from the vendor as cyclades.com ceased to exist.
So it's time to drop the driver with all its traces.
--- Documentation/admin-guide/devices.txt | 10 - .../driver-api/serial/cyclades_z.rst | 11 - Documentation/driver-api/serial/index.rst | 1 - Documentation/process/magic-number.rst | 1 - .../it_IT/process/magic-number.rst | 1 - .../zh_CN/process/magic-number.rst | 1 - .../userspace-api/ioctl/ioctl-number.rst | 1 - MAINTAINERS | 7 - arch/powerpc/configs/ppc6xx_defconfig | 1 - drivers/tty/Kconfig | 31 +- drivers/tty/Makefile | 1 - drivers/tty/cyclades.c | 4119 ----------------- drivers/tty/serial/8250/Kconfig | 5 +- include/linux/cyclades.h | 364 -- include/linux/pci_ids.h | 8 - include/uapi/linux/cyclades.h | 494 -- include/uapi/linux/major.h | 2 - include/uapi/linux/serial.h | 4 +- 18 files changed, 5 insertions(+), 5057 deletions(-) delete mode 100644 Documentation/driver-api/serial/cyclades_z.rst delete mode 100644 drivers/tty/cyclades.c delete mode 100644 include/linux/cyclades.h delete mode 100644 include/uapi/linux/cyclades.h
Documentation/admin-guide/devices.txt +0 -10
@@ -477,11 +477,6 @@ 18 block Sanyo CD-ROM 0 = /dev/sjcd Sanyo CD-ROM - 19 char Cyclades serial card - 0 = /dev/ttyC0 First Cyclades port - ... - 31 = /dev/ttyC31 32nd Cyclades port - 19 block "Double" compressed disk 0 = /dev/double0 First compressed disk ...
@@ -493,11 +488,6 @@ See the Double documentation for the meaning of the mirror devices. - 20 char Cyclades serial card - alternate devices - 0 = /dev/cub0 Callout device for ttyC0 - ... - 31 = /dev/cub31 Callout device for ttyC31 - 20 block Hitachi CD-ROM (under development) 0 = /dev/hitcd Hitachi CD-ROM
Documentation/driver-api/serial/cyclades_z.rst deleted +0 -11
@@ -1,11 +0,0 @@ -================ -Cyclades-Z notes -================ - -The Cyclades-Z must have firmware loaded onto the card before it will -operate. This operation should be performed during system startup, - -The firmware, loader program and the latest device driver code are -available from Cyclades at - - ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/
Documentation/driver-api/serial/index.rst +0 -1
@@ -17,7 +17,6 @@ Serial drivers .. toctree:: :maxdepth: 1 - cyclades_z moxa-smartio n_gsm rocket
Documentation/process/magic-number.rst +0 -1
@@ -73,7 +73,6 @@ CMAGIC 0x0111 user ``include/linux/ MKISS_DRIVER_MAGIC 0x04bf mkiss_channel ``drivers/net/mkiss.h`` HDLC_MAGIC 0x239e n_hdlc ``drivers/char/n_hdlc.c`` APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` -CYCLADES_MAGIC 0x4359 cyclades_port ``include/linux/cyclades.h`` DB_MAGIC 0x4442 fc_info ``drivers/net/iph5526_novram.c`` DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
Documentation/translations/it_IT/process/magic-number.rst +0 -1
@@ -79,7 +79,6 @@ CMAGIC 0x0111 user ``include/linux/ MKISS_DRIVER_MAGIC 0x04bf mkiss_channel ``drivers/net/mkiss.h`` HDLC_MAGIC 0x239e n_hdlc ``drivers/char/n_hdlc.c`` APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` -CYCLADES_MAGIC 0x4359 cyclades_port ``include/linux/cyclades.h`` DB_MAGIC 0x4442 fc_info ``drivers/net/iph5526_novram.c`` DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
Documentation/translations/zh_CN/process/magic-number.rst +0 -1
@@ -62,7 +62,6 @@ CMAGIC 0x0111 user ``include/linux/ MKISS_DRIVER_MAGIC 0x04bf mkiss_channel ``drivers/net/mkiss.h`` HDLC_MAGIC 0x239e n_hdlc ``drivers/char/n_hdlc.c`` APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` -CYCLADES_MAGIC 0x4359 cyclades_port ``include/linux/cyclades.h`` DB_MAGIC 0x4442 fc_info ``drivers/net/iph5526_novram.c`` DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
Documentation/userspace-api/ioctl/ioctl-number.rst +0 -1
@@ -209,7 +209,6 @@ Code Seq# Include File Comments linux/fs.h, 'X' all fs/ocfs2/ocfs_fs.h conflict! 'X' 01 linux/pktcdvd.h conflict! -'Y' all linux/cyclades.h 'Z' 14-15 drivers/message/fusion/mptctl.h '[' 00-3F linux/usb/tmc.h USB Test and Measurement Devices <mailto:[email protected]>
MAINTAINERS +0 -7
@@ -4876,13 +4876,6 @@ S: Maintained W: http://www.armlinux.org.uk/ F: drivers/video/fbdev/cyber2000fb.* -CYCLADES ASYNC MUX DRIVER -S: Orphan -W: http://www.cyclades.com/ -F: drivers/tty/cyclades.c -F: include/linux/cyclades.h -F: include/uapi/linux/cyclades.h - CYCLADES PC300 DRIVER S: Orphan F: drivers/net/wan/pc300*
arch/powerpc/configs/ppc6xx_defconfig +0 -1
@@ -595,7 +595,6 @@ CONFIG_GAMEPORT_FM801=m # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_NONSTANDARD=y CONFIG_ROCKETPORT=m -CONFIG_CYCLADES=m CONFIG_SYNCLINK_GT=m CONFIG_NOZOMI=m CONFIG_N_HDLC=m
drivers/tty/Kconfig +1 -30
@@ -181,7 +181,7 @@ config SERIAL_NONSTANDARD help Say Y here if you have any non-standard serial boards -- boards which aren't supported using the standard "dumb" serial driver. - This includes intelligent serial boards such as Cyclades, + This includes intelligent serial boards such as Digiboards, etc. These are usually used for systems that need many serial ports because they serve many terminals or dial-in connections.
@@ -207,35 +207,6 @@ config ROCKETPORT If you want to compile this driver into the kernel, say Y here. If you don't have a Comtrol RocketPort/RocketModem card installed, say N. -config CYCLADES - tristate "Cyclades async mux support" - depends on SERIAL_NONSTANDARD && (PCI || ISA) - select FW_LOADER - help - This driver supports Cyclades Z and Y multiserial boards. - You would need something like this to connect more than two modems to - your Linux box, for instance in order to become a dial-in server. - - For information about the Cyclades-Z card, read - <file:Documentation/driver-api/serial/cyclades_z.rst>. - - To compile this driver as a module, choose M here: the - module will be called cyclades. - - If you haven't heard about it, it's safe to say N. - -config CYZ_INTR - bool "Cyclades-Z interrupt mode operation" - depends on CYCLADES && PCI - help - The Cyclades-Z family of multiport cards allows 2 (two) driver op - modes: polling and interrupt. In polling mode, the driver will check - the status of the Cyclades-Z ports every certain amount of time - (which is called polling cycle and is configurable). In interrupt - mode, it will use an interrupt line (IRQ) in order to check the - status of the Cyclades-Z ports. The default op mode is polling. If - unsure, say N. - config MOXA_INTELLIO tristate "Moxa Intellio support" depends on SERIAL_NONSTANDARD && (ISA || EISA || PCI)
drivers/tty/Makefile +0 -1
@@ -18,7 +18,6 @@ obj-$(CONFIG_SERIAL_DEV_BUS) += serdev/ # tty drivers obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o -obj-$(CONFIG_CYCLADES) += cyclades.o obj-$(CONFIG_ISI) += isicom.o obj-$(CONFIG_MOXA_INTELLIO) += moxa.o obj-$(CONFIG_MOXA_SMARTIO) += mxser.o
drivers/tty/cyclades.c deleted +0 -4119
2,862 lines not on this page · raw message
include/linux/cyclades.h deleted +0 -364
364 lines not on this page · raw message
include/uapi/linux/cyclades.h deleted +0 -494
494 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.30.1
Part of the diff is not shown here. View the raw message.
PATCH 6/44 tty: isicom, remove this orphan
In reply to Jiri SlabyThe Isicom driver was orphaned by commit d86b3001a1a6 (MAINTAINERS:
orphan isicom) 10 years ago. Noone stepped up to take care of them and to fix all the issues the driver has.
So it's time to drop the driver with all its traces.
--- Documentation/admin-guide/devices.txt | 2 +- Documentation/process/magic-number.rst | 1 - .../it_IT/process/magic-number.rst | 1 - .../zh_CN/process/magic-number.rst | 1 - MAINTAINERS | 5 - drivers/tty/Kconfig | 10 - drivers/tty/Makefile | 1 - drivers/tty/isicom.c | 1699 ----------------- include/linux/isicom.h | 85 - 9 files changed, 1 insertion(+), 1804 deletions(-) delete mode 100644 drivers/tty/isicom.c delete mode 100644 include/linux/isicom.h
Documentation/admin-guide/devices.txt +1 -1
@@ -289,7 +289,7 @@ 152 = /dev/kpoll Kernel Poll Driver 153 = /dev/mergemem Memory merge device 154 = /dev/pmu Macintosh PowerBook power manager - 155 = /dev/isictl MultiTech ISICom serial control + 155 = 156 = /dev/lcd Front panel LCD display 157 = /dev/ac Applicom Intl Profibus card 158 = /dev/nwbutton Netwinder external button
Documentation/process/magic-number.rst +0 -1
@@ -77,7 +77,6 @@ DB_MAGIC 0x4442 fc_info ``drivers/net/ip DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` FF_MAGIC 0x4646 fc_info ``drivers/net/iph5526_novram.c`` -ISICOM_MAGIC 0x4d54 isi_port ``include/linux/isicom.h`` PTY_MAGIC 0x5001 ``drivers/char/pty.c`` PPP_MAGIC 0x5002 ppp ``include/linux/if_pppvar.h`` SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
Documentation/translations/it_IT/process/magic-number.rst +0 -1
@@ -83,7 +83,6 @@ DB_MAGIC 0x4442 fc_info ``drivers/net/ip DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` FF_MAGIC 0x4646 fc_info ``drivers/net/iph5526_novram.c`` -ISICOM_MAGIC 0x4d54 isi_port ``include/linux/isicom.h`` PTY_MAGIC 0x5001 ``drivers/char/pty.c`` PPP_MAGIC 0x5002 ppp ``include/linux/if_pppvar.h`` SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
Documentation/translations/zh_CN/process/magic-number.rst +0 -1
@@ -66,7 +66,6 @@ DB_MAGIC 0x4442 fc_info ``drivers/net/ip DL_MAGIC 0x444d fc_info ``drivers/net/iph5526_novram.c`` FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` FF_MAGIC 0x4646 fc_info ``drivers/net/iph5526_novram.c`` -ISICOM_MAGIC 0x4d54 isi_port ``include/linux/isicom.h`` PTY_MAGIC 0x5001 ``drivers/char/pty.c`` PPP_MAGIC 0x5002 ppp ``include/linux/if_pppvar.h`` SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
MAINTAINERS +0 -5
@@ -12225,11 +12225,6 @@ F: drivers/mux/ F: include/dt-bindings/mux/ F: include/linux/mux/ -MULTITECH MULTIPORT CARD (ISICOM) -S: Orphan -F: drivers/tty/isicom.c -F: include/linux/isicom.h - MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER M: Bin Liu <[email protected]> L: [email protected]
drivers/tty/Kconfig +0 -10
@@ -238,16 +238,6 @@ config SYNCLINK_GT synchronous and asynchronous serial adapters manufactured by Microgate Systems, Ltd. (www.microgate.com) -config ISI - tristate "Multi-Tech multiport card support" - depends on SERIAL_NONSTANDARD && PCI - select FW_LOADER - help - This is a driver for the Multi-Tech cards which provide several - serial ports. The driver is experimental and can currently only be - built as a module. The module will be called isicom. - If you want to do that, choose M here. - config N_HDLC tristate "HDLC line discipline support" depends on SERIAL_NONSTANDARD
drivers/tty/Makefile +0 -1
@@ -18,7 +18,6 @@ obj-$(CONFIG_SERIAL_DEV_BUS) += serdev/ # tty drivers obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o -obj-$(CONFIG_ISI) += isicom.o obj-$(CONFIG_MOXA_INTELLIO) += moxa.o obj-$(CONFIG_MOXA_SMARTIO) += mxser.o obj-$(CONFIG_NOZOMI) += nozomi.o
drivers/tty/isicom.c deleted +0 -1699
1,699 lines not on this page · raw message
include/linux/isicom.h deleted +0 -85
85 lines not on this page · raw message
Signature · 1 line
2.30.1
PATCH 7/44 tty: rocket, remove the driver
In reply to Jiri SlabyWhile the driver is still marked as maintained in MAINTAINERS, Comtrol does not really care about this ancient driver. They are still manufacturing serial devices, but those are controlled only by out-of-tree drivers.
Comtrol didn't answer my pings, so this driver is apparently unmaintained. Aside from that, the driver was untouched for years, only whole-tree changes happened during the past years. The driver needs much more care, so drop it for now. If someone steps up to reintroduce it, they need to clean it up first.
--- Documentation/driver-api/serial/rocket.rst | 185 - Documentation/process/magic-number.rst | 1 - .../it_IT/process/magic-number.rst | 1 - .../zh_CN/process/magic-number.rst | 1 - MAINTAINERS | 6 - drivers/tty/Kconfig | 15 - drivers/tty/Makefile | 1 - drivers/tty/rocket.c | 3127 ----------------- drivers/tty/rocket.h | 111 - drivers/tty/rocket_int.h | 1214 ------- include/linux/pci_ids.h | 21 - 11 files changed, 4683 deletions(-) delete mode 100644 Documentation/driver-api/serial/rocket.rst delete mode 100644 drivers/tty/rocket.c delete mode 100644 drivers/tty/rocket.h delete mode 100644 drivers/tty/rocket_int.h
Documentation/driver-api/serial/rocket.rst deleted +0 -185
@@ -1,185 +0,0 @@ -================================================ -Comtrol(tm) RocketPort(R)/RocketModem(TM) Series -================================================ - -Device Driver for the Linux Operating System -============================================ - -Product overview ----------------- - -This driver provides a loadable kernel driver for the Comtrol RocketPort -and RocketModem PCI boards. These boards provide, 2, 4, 8, 16, or 32 -high-speed serial ports or modems. This driver supports up to a combination -of four RocketPort or RocketModems boards in one machine simultaneously. -This file assumes that you are using the RocketPort driver which is -integrated into the kernel sources. - -The driver can also be installed as an external module using the usual -"make;make install" routine. This external module driver, obtainable -from the Comtrol website listed below, is useful for updating the driver -or installing it into kernels which do not have the driver configured -into them. Installations instructions for the external module -are in the included README and HW_INSTALL files. - -RocketPort ISA and RocketModem II PCI boards currently are only supported by -this driver in module form. - -The RocketPort ISA board requires I/O ports to be configured by the DIP -switches on the board. See the section "ISA Rocketport Boards" below for -information on how to set the DIP switches. - -You pass the I/O port to the driver using the following module parameters: - -board1: - I/O port for the first ISA board -board2: - I/O port for the second ISA board -board3: - I/O port for the third ISA board -board4: - I/O port for the fourth ISA board - -There is a set of utilities and scripts provided with the external driver -(downloadable from http://www.comtrol.com) that ease the configuration and -setup of the ISA cards. - -The RocketModem II PCI boards require firmware to be loaded into the card -before it will function. The driver has only been tested as a module for this -board. - -Installation Procedures ------------------------ - -RocketPort/RocketModem PCI cards require no driver configuration, they are -automatically detected and configured. - -The RocketPort driver can be installed as a module (recommended) or built -into the kernel. This is selected, as for other drivers, through the `make config` -command from the root of the Linux source tree during the kernel build process. - -The RocketPort/RocketModem serial ports installed by this driver are assigned -device major number 46, and will be named /dev/ttyRx, where x is the port number -starting at zero (ex. /dev/ttyR0, /devttyR1, ...). If you have multiple cards -installed in the system, the mapping of port names to serial ports is displayed -in the system log at /var/log/messages. - -If installed as a module, the module must be loaded. This can be done -manually by entering "modprobe rocket". To have the module loaded automatically -upon system boot, edit a `/etc/modprobe.d/*.conf` file and add the line -"alias char-major-46 rocket". - -In order to use the ports, their device names (nodes) must be created with mknod. -This is only required once, the system will retain the names once created. To -create the RocketPort/RocketModem device names, use the command -"mknod /dev/ttyRx c 46 x" where x is the port number starting at zero. - -For example:: - - > mknod /dev/ttyR0 c 46 0 - > mknod /dev/ttyR1 c 46 1 - > mknod /dev/ttyR2 c 46 2 - -The Linux script MAKEDEV will create the first 16 ttyRx device names (nodes) -for you:: - - >/dev/MAKEDEV ttyR - -ISA Rocketport Boards ---------------------- - -You must assign and configure the I/O addresses used by the ISA Rocketport -card before installing and using it. This is done by setting a set of DIP -switches on the Rocketport board. - - -Setting the I/O address ------------------------ - -Before installing RocketPort(R) or RocketPort RA boards, you must find -a range of I/O addresses for it to use. The first RocketPort card -requires a 68-byte contiguous block of I/O addresses, starting at one -of the following: 0x100h, 0x140h, 0x180h, 0x200h, 0x240h, 0x280h, -0x300h, 0x340h, 0x380h. This I/O address must be reflected in the DIP -switches of *all* of the Rocketport cards. - -The second, third, and fourth RocketPort cards require a 64-byte -contiguous block of I/O addresses, starting at one of the following -I/O addresses: 0x100h, 0x140h, 0x180h, 0x1C0h, 0x200h, 0x240h, 0x280h, -0x2C0h, 0x300h, 0x340h, 0x380h, 0x3C0h. The I/O address used by the -second, third, and fourth Rocketport cards (if present) are set via -software control. The DIP switch settings for the I/O address must be -set to the value of the first Rocketport cards. - -In order to distinguish each of the card from the others, each card -must have a unique board ID set on the dip switches. The first -Rocketport board must be set with the DIP switches corresponding to -the first board, the second board must be set with the DIP switches -corresponding to the second board, etc. IMPORTANT: The board ID is -the only place where the DIP switch settings should differ between the -various Rocketport boards in a system. - -The I/O address range used by any of the RocketPort cards must not -conflict with any other cards in the system, including other -RocketPort cards. Below, you will find a list of commonly used I/O -address ranges which may be in use by other devices in your system. -On a Linux system, "cat /proc/ioports" will also be helpful in -identifying what I/O addresses are being used by devices on your -system. - -Remember, the FIRST RocketPort uses 68 I/O addresses. So, if you set it -for 0x100, it will occupy 0x100 to 0x143. This would mean that you -CAN NOT set the second, third or fourth board for address 0x140 since -the first 4 bytes of that range are used by the first board. You would -need to set the second, third, or fourth board to one of the next available -blocks such as 0x180. - -RocketPort and RocketPort RA SW1 Settings:: - - +-------------------------------+ - | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | - +-------+-------+---------------+ - | Unused| Card | I/O Port Block| - +-------------------------------+ - - DIP Switches DIP Switches - 7 8 6 5 - =================== =================== - On On UNUSED, MUST BE ON. On On First Card <==== Default - On Off Second Card - Off On Third Card - Off Off Fourth Card - - DIP Switches I/O Address Range - 4 3 2 1 Used by the First Card - ===================================== - On Off On Off 100-143 - On Off Off On 140-183 - On Off Off Off 180-1C3 <==== Default - Off On On Off 200-243 - Off On Off On 240-283 - Off On Off Off 280-2C3 - Off Off On Off 300-343 - Off Off Off On 340-383 - Off Off Off Off 380-3C3 - -Reporting Bugs --------------- - -For technical support, please provide the following -information: Driver version, kernel release, distribution of -kernel, and type of board you are using. Error messages and log -printouts port configuration details are especially helpful. - -USA: - :Phone: (612) 494-4100 - :FAX: (612) 494-4199 - :email: [email protected] - -Comtrol Europe: - :Phone: +44 (0) 1 869 323-220 - :FAX: +44 (0) 1 869 323-211 - :email: [email protected] - -Web: http://www.comtrol.com -FTP: ftp.comtrol.com
Documentation/process/magic-number.rst +0 -1
@@ -95,7 +95,6 @@ USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/cl RFCOMM_TTY_MAGIC 0x6d02 ``net/bluetooth/rfcomm/tty.c`` USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port ``drivers/usb/serial/usb-serial.h`` CG_MAGIC 0x00090255 ufs_cylinder_group ``include/linux/ufs_fs.h`` -RPORT_MAGIC 0x00525001 r_port ``drivers/char/rocket_int.h`` LSEMAGIC 0x05091998 lse ``drivers/fc4/fc.c`` RIEBL_MAGIC 0x09051990 ``drivers/net/atarilance.c`` NBD_REQUEST_MAGIC 0x12560953 nbd_request ``include/linux/nbd.h``
Documentation/translations/it_IT/process/magic-number.rst +0 -1
@@ -101,7 +101,6 @@ USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/cl RFCOMM_TTY_MAGIC 0x6d02 ``net/bluetooth/rfcomm/tty.c`` USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port ``drivers/usb/serial/usb-serial.h`` CG_MAGIC 0x00090255 ufs_cylinder_group ``include/linux/ufs_fs.h`` -RPORT_MAGIC 0x00525001 r_port ``drivers/char/rocket_int.h`` LSEMAGIC 0x05091998 lse ``drivers/fc4/fc.c`` GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str ``drivers/scsi/gdth_ioctl.h`` RIEBL_MAGIC 0x09051990 ``drivers/net/atarilance.c``
Documentation/translations/zh_CN/process/magic-number.rst +0 -1
@@ -84,7 +84,6 @@ USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/cl RFCOMM_TTY_MAGIC 0x6d02 ``net/bluetooth/rfcomm/tty.c`` USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port ``drivers/usb/serial/usb-serial.h`` CG_MAGIC 0x00090255 ufs_cylinder_group ``include/linux/ufs_fs.h`` -RPORT_MAGIC 0x00525001 r_port ``drivers/char/rocket_int.h`` LSEMAGIC 0x05091998 lse ``drivers/fc4/fc.c`` GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str ``drivers/scsi/gdth_ioctl.h`` RIEBL_MAGIC 0x09051990 ``drivers/net/atarilance.c``
MAINTAINERS +0 -6
@@ -15397,12 +15397,6 @@ L: [email protected] S: Supported F: drivers/net/ethernet/rocker/ -ROCKETPORT DRIVER -S: Maintained -W: http://www.comtrol.com -F: Documentation/driver-api/serial/rocket.rst -F: drivers/tty/rocket* - ROCKETPORT EXPRESS/INFINITY DRIVER M: Kevin Cernekee <[email protected]> L: [email protected]
drivers/tty/Kconfig +0 -15
@@ -192,21 +192,6 @@ config SERIAL_NONSTANDARD Most people can say N here. -config ROCKETPORT - tristate "Comtrol RocketPort support" - depends on SERIAL_NONSTANDARD && (ISA || EISA || PCI) - help - This driver supports Comtrol RocketPort and RocketModem PCI boards. - These boards provide 2, 4, 8, 16, or 32 high-speed serial ports or - modems. For information about the RocketPort/RocketModem boards - and this driver read <file:Documentation/driver-api/serial/rocket.rst>. - - To compile this driver as a module, choose M here: the - module will be called rocket. - - If you want to compile this driver into the kernel, say Y here. If - you don't have a Comtrol RocketPort/RocketModem card installed, say N. - config MOXA_INTELLIO tristate "Moxa Intellio support" depends on SERIAL_NONSTANDARD && (ISA || EISA || PCI)
drivers/tty/Makefile +0 -1
@@ -22,7 +22,6 @@ obj-$(CONFIG_MOXA_INTELLIO) += moxa.o obj-$(CONFIG_MOXA_SMARTIO) += mxser.o obj-$(CONFIG_NOZOMI) += nozomi.o obj-$(CONFIG_NULL_TTY) += ttynull.o -obj-$(CONFIG_ROCKETPORT) += rocket.o obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o obj-$(CONFIG_PPC_EPAPR_HV_BYTECHAN) += ehv_bytechan.o obj-$(CONFIG_GOLDFISH_TTY) += goldfish.o
drivers/tty/rocket.c deleted +0 -3127
2,754 lines not on this page · raw message
drivers/tty/rocket.h deleted +0 -111
111 lines not on this page · raw message
drivers/tty/rocket_int.h deleted +0 -1214
1,214 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.30.1
Part of the diff is not shown here. View the raw message.
PATCH 8/44 tty: remove TTY_LDISC_MAGIC
In reply to Jiri SlabyFirst, it is never checked. Second, use of it as a debugging aid is at least questionable. With the current tools, I don't think anyone used this kind of thing for debugging purposes for years.
On the top of that, e.g. serdev does not set this field of tty_ldisc_ops at all.
So get rid of this legacy.
--- Documentation/process/magic-number.rst | 1 - Documentation/translations/it_IT/process/magic-number.rst | 1 - Documentation/translations/zh_CN/process/magic-number.rst | 1 - drivers/accessibility/speakup/spk_ttyio.c | 1 - drivers/bluetooth/hci_ldisc.c | 1 - drivers/misc/ti-st/st_core.c | 1 - drivers/net/caif/caif_serial.c | 1 - drivers/net/can/slcan.c | 1 - drivers/net/hamradio/6pack.c | 1 - drivers/net/hamradio/mkiss.c | 1 - drivers/net/ppp/ppp_async.c | 1 - drivers/net/ppp/ppp_synctty.c | 1 - drivers/net/slip/slip.c | 1 - drivers/pps/clients/pps-ldisc.c | 3 --- drivers/tty/n_gsm.c | 1 - drivers/tty/n_hdlc.c | 1 - drivers/tty/n_null.c | 1 - drivers/tty/n_r3964.c | 1 - drivers/tty/n_tty.c | 1 - include/linux/tty_ldisc.h | 3 --- net/nfc/nci/uart.c | 1 - sound/soc/codecs/cx20442.c | 1 - sound/soc/ti/ams-delta.c | 1 - 23 files changed, 27 deletions(-)
Documentation/process/magic-number.rst +0 -1
@@ -88,7 +88,6 @@ TTY_MAGIC 0x5401 tty_struct ``include/linux/ MGSL_MAGIC 0x5401 mgsl_info ``drivers/char/synclink.c`` TTY_DRIVER_MAGIC 0x5402 tty_driver ``include/linux/tty_driver.h`` MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c`` -TTY_LDISC_MAGIC 0x5403 tty_ldisc ``include/linux/tty_ldisc.h`` USB_SERIAL_MAGIC 0x6702 usb_serial ``drivers/usb/serial/usb-serial.h`` FULL_DUPLEX_MAGIC 0x6969 ``drivers/net/ethernet/dec/tulip/de2104x.c`` USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/class/bluetty.c``
Documentation/translations/it_IT/process/magic-number.rst +0 -1
@@ -94,7 +94,6 @@ TTY_MAGIC 0x5401 tty_struct ``include/linux/ MGSL_MAGIC 0x5401 mgsl_info ``drivers/char/synclink.c`` TTY_DRIVER_MAGIC 0x5402 tty_driver ``include/linux/tty_driver.h`` MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c`` -TTY_LDISC_MAGIC 0x5403 tty_ldisc ``include/linux/tty_ldisc.h`` USB_SERIAL_MAGIC 0x6702 usb_serial ``drivers/usb/serial/usb-serial.h`` FULL_DUPLEX_MAGIC 0x6969 ``drivers/net/ethernet/dec/tulip/de2104x.c`` USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/class/bluetty.c``
Documentation/translations/zh_CN/process/magic-number.rst +0 -1
@@ -77,7 +77,6 @@ TTY_MAGIC 0x5401 tty_struct ``include/linux/ MGSL_MAGIC 0x5401 mgsl_info ``drivers/char/synclink.c`` TTY_DRIVER_MAGIC 0x5402 tty_driver ``include/linux/tty_driver.h`` MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c`` -TTY_LDISC_MAGIC 0x5403 tty_ldisc ``include/linux/tty_ldisc.h`` USB_SERIAL_MAGIC 0x6702 usb_serial ``drivers/usb/serial/usb-serial.h`` FULL_DUPLEX_MAGIC 0x6969 ``drivers/net/ethernet/dec/tulip/de2104x.c`` USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth ``drivers/usb/class/bluetty.c``
drivers/accessibility/speakup/spk_ttyio.c +0 -1
@@ -104,7 +104,6 @@ static int spk_ttyio_receive_buf2(struct tty_struct *tty,static struct tty_ldisc_ops spk_ttyio_ldisc_ops = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="speakup_ldisc" , .open = spk_ttyio_ldisc_open, .close = spk_ttyio_ldisc_close,
drivers/bluetooth/hci_ldisc.c +0 -1
@@ -821,7 +821,6 @@ static __poll_t hci_uart_tty_poll(struct tty_struct *tty,static struct tty_ldisc_ops hci_uart_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="n_hci" , .open = hci_uart_tty_open, .close = hci_uart_tty_close,
drivers/misc/ti-st/st_core.c +0 -1
@@ -845,7 +845,6 @@ static void st_tty_flush_buffer(struct tty_struct *tty) }static struct tty_ldisc_ops st_ldisc_ops = { - .magic =TTY_LDISC_MAGIC , .name ="n_st" , .open = st_tty_open, .close = st_tty_close,
drivers/net/caif/caif_serial.c +0 -1
@@ -382,7 +382,6 @@ static void ldisc_close(struct tty_struct *tty)/* The line discipline structure. */ static struct tty_ldisc_ops caif_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="n_caif" , .open = ldisc_open, .close = ldisc_close,
drivers/net/can/slcan.c +0 -1
@@ -697,7 +697,6 @@ static int slcan_ioctl(struct tty_struct *tty, struct file *file,static struct tty_ldisc_ops slc_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="slcan" , .open = slcan_open, .close = slcan_close,
drivers/net/hamradio/6pack.c +0 -1
@@ -749,7 +749,6 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file,static struct tty_ldisc_ops sp_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="6pack" , .open = sixpack_open, .close = sixpack_close,
drivers/net/hamradio/mkiss.c +0 -1
@@ -933,7 +933,6 @@ static void mkiss_write_wakeup(struct tty_struct *tty)static struct tty_ldisc_ops ax_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="mkiss" , .open = mkiss_open, .close = mkiss_close,
drivers/net/ppp/ppp_async.c +0 -1
@@ -372,7 +372,6 @@ ppp_asynctty_wakeup(struct tty_struct *tty)static struct tty_ldisc_ops ppp_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="ppp" , .open = ppp_asynctty_open, .close = ppp_asynctty_close,
drivers/net/ppp/ppp_synctty.c +0 -1
@@ -365,7 +365,6 @@ ppp_sync_wakeup(struct tty_struct *tty)static struct tty_ldisc_ops ppp_sync_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="pppsync" , .open = ppp_sync_open, .close = ppp_sync_close,
drivers/net/slip/slip.c +0 -1
@@ -1263,7 +1263,6 @@ static int sl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)static struct tty_ldisc_ops sl_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="slip" , .open = slip_open, .close = slip_close,
drivers/pps/clients/pps-ldisc.c +0 -3
@@ -13,8 +13,6 @@#include <linux/pps_kernel.h> #include <linux/bug.h> -#define PPS_TTY_MAGIC 0x0001 -static void pps_tty_dcd_change (struct tty_struct *tty,unsigned int status) {struct pps_device *pps;
@@ -114,7 +112,6 @@ static int __init pps_tty_init(void)/* Init PPS_TTY data */ pps_ldisc_ops.owner =THIS_MODULE ; - pps_ldisc_ops.magic =PPS_TTY_MAGIC ; pps_ldisc_ops.name ="pps_tty" ; pps_ldisc_ops.dcd_change = pps_tty_dcd_change; pps_ldisc_ops.open = pps_tty_open;
drivers/tty/n_gsm.c +0 -1
@@ -2849,7 +2849,6 @@ static int gsm_create_network(struct gsm_dlci *dlci, struct gsm_netconfig *nc)/* Line discipline for real tty */ static struct tty_ldisc_ops tty_ldisc_packet = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="n_gsm" , .open = gsmld_open, .close = gsmld_close,
drivers/tty/n_hdlc.c +0 -1
@@ -787,7 +787,6 @@ static struct n_hdlc_buf *n_hdlc_buf_get(struct n_hdlc_buf_list *buf_list)static struct tty_ldisc_ops n_hdlc_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="hdlc" , .open = n_hdlc_tty_open, .close = n_hdlc_tty_close,
drivers/tty/n_null.c +0 -1
@@ -40,7 +40,6 @@ static void n_null_receivebuf(struct tty_struct *tty,static struct tty_ldisc_ops null_ldisc = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="n_null" , .open = n_null_open, .close = n_null_close,
drivers/tty/n_r3964.c +0 -1
@@ -146,7 +146,6 @@ static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp,static struct tty_ldisc_ops tty_ldisc_N_R3964 = { .owner =THIS_MODULE , - .magic =TTY_LDISC_MAGIC , .name ="R3964" , .open = r3964_open, .close = r3964_close,
drivers/tty/n_tty.c +0 -1
@@ -2488,7 +2488,6 @@ static int n_tty_ioctl(struct tty_struct *tty, struct file *file, }static struct tty_ldisc_ops n_tty_ops = { - .magic =TTY_LDISC_MAGIC , .name ="n_tty" , .open = n_tty_open, .close = n_tty_close,
include/linux/tty_ldisc.h +0 -3
@@ -173,7 +173,6 @@ extern int ldsem_down_write_nested(struct ld_semaphore *sem, int subclass,struct tty_ldisc_ops { -int magic;char *name;int num;int flags;
@@ -218,8 +217,6 @@ struct tty_ldisc {struct tty_struct *tty; }; -#define TTY_LDISC_MAGIC 0x5403 -#define LDISC_FLAG_DEFINED 0x00000001#define MODULE_ALIAS_LDISC (ldisc) \
net/nfc/nci/uart.c +0 -1
@@ -453,7 +453,6 @@ void nci_uart_set_config(struct nci_uart *nu, int baudrate, int flow_ctrl)EXPORT_SYMBOL_GPL (nci_uart_set_config);static struct tty_ldisc_ops nci_uart_ldisc = { - .magic =TTY_LDISC_MAGIC , .owner =THIS_MODULE , .name ="n_nci" , .open = nci_uart_tty_open,
sound/soc/codecs/cx20442.c +0 -1
@@ -285,7 +285,6 @@ static void v253_wakeup(struct tty_struct *tty) }struct tty_ldisc_ops v253_ops = { - .magic =TTY_LDISC_MAGIC , .name ="cx20442" , .owner =THIS_MODULE , .open = v253_open,
sound/soc/ti/ams-delta.c +0 -1
@@ -395,7 +395,6 @@ static void cx81801_wakeup(struct tty_struct *tty) }static struct tty_ldisc_ops cx81801_ops = { - .magic =TTY_LDISC_MAGIC , .name ="cx81801" , .owner =THIS_MODULE , .open = cx81801_open,
Signature · 1 line
2.30.1
PATCH 9/44 tty: n_tty, set tty_ldisc_ops::owner
In reply to Jiri SlabySet tty_ldisc_ops::owner to THIS_MODULE. This has no effect currently as n_tty cannot be built as a module. If someone ever tries to modularize tty, we wouldn't manage module's reference count as in other ldiscs. So fix this just in case.
--- drivers/tty/n_tty.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/n_tty.c +1 -0
@@ -2488,6 +2488,7 @@ static int n_tty_ioctl(struct tty_struct *tty, struct file *file, }static struct tty_ldisc_ops n_tty_ops = { + .owner =THIS_MODULE , .name ="n_tty" , .open = n_tty_open, .close = n_tty_close,
Signature · 1 line
2.30.1
PATCH 10/44 tty: imx, use ms_to_ktime
In reply to Jiri SlabyThis really eliminates multiplications from the assembly. I would have thought they are optimized by inlining ktime_set, but not on x86_64 with gcc 10.
--- drivers/tty/serial/imx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/tty/serial/imx.c +1 -5
@@ -394,11 +394,7 @@ static void imx_uart_rts_inactive(struct imx_port *sport, u32 *ucr2)static void start_hrtimer_ms (struct hrtimer *hrt,unsigned long msec) { -long sec = msec /MSEC_PER_SEC ; -long nsec = (msec %MSEC_PER_SEC ) *1000000 ; -ktime_t t =ktime_set (sec, nsec); - -hrtimer_start (hrt, t,HRTIMER_MODE_REL ); +hrtimer_start (hrt,ms_to_ktime (msec),HRTIMER_MODE_REL ); }/* called with port.lock taken and irqs off */
Signature · 1 line
2.30.1
Re: [PATCH 10/44] tty: imx, use ms_to_ktime
Hello Jiri,
Quoted 19 lines · Jiri Slaby
This really eliminates multiplications from the assembly. I would have thought they are optimized by inlining
ktime_set, but not onx86_64with gcc 10.Signed-off-by Jiri Slaby <[email protected]>Cc Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>Cc Pengutronix Kernel Team <[email protected]>Cc Fabio Estevam <[email protected]>Cc NXP Linux Team <[email protected]>--- drivers/tty/serial/imx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/tty/serial/imx.c +0
-0
drivers/tty/serial/imx.c static void imx_uart_rts_inactive(struct imx_port *sport, u32 *ucr2) · line 398
Quoted 10 lines
drivers/tty/serial/imx.c +1
-5@@ -394,11 +394,7 @@ static void imx_uart_rts_inactive(struct imx_port *sport, u32 *ucr2)static void start_hrtimer_ms (struct hrtimer *hrt,unsigned long msec) { -long sec = msec /MSEC_PER_SEC ; -long nsec = (msec %MSEC_PER_SEC ) *1000000 ; -ktime_t t =ktime_set (sec, nsec); - -hrtimer_start (hrt, t,HRTIMER_MODE_REL ); +hrtimer_start (hrt,ms_to_ktime (msec),HRTIMER_MODE_REL ); }
What about:
drivers/tty/serial/imx.c +6 -13
@@ -392,15 +392,6 @@ static void imx_uart_rts_inactive(struct imx_port *sport, u32 *ucr2)mctrl_gpio_set (sport->gpios, sport->port.mctrl); } -static void start_hrtimer_ms (struct hrtimer *hrt,unsigned long msec) -{ -long sec = msec /MSEC_PER_SEC ; -long nsec = (msec %MSEC_PER_SEC ) *1000000 ; -ktime_t t =ktime_set (sec, nsec); - -hrtimer_start (hrt, t,HRTIMER_MODE_REL ); -} -/* called with port.lock taken and irqs off */ static void imx_uart_start_rx (struct uart_port *port) {
@@ -457,8 +448,9 @@ static void imx_uart_stop_tx(struct uart_port *port)if (port->rs485.flags &SER_RS485_ENABLED ) {if (sport->tx_state ==SEND ) { sport->tx_state =WAIT_AFTER_SEND ; -start_hrtimer_ms (&sport->trigger_stop_tx, - port->rs485.delay_rts_after_send); +hrtimer_start (&sport->trigger_stop_tx, +ms_to_ktime (port->rs485.delay_rts_after_send), +HRTIMER_MODE_REL );return ; }
@@ -697,8 +689,9 @@ static void imx_uart_start_tx(struct uart_port *port)imx_uart_stop_rx (port); sport->tx_state =WAIT_AFTER_RTS ; -start_hrtimer_ms (&sport->trigger_start_tx, - port->rs485.delay_rts_before_send); +hrtimer_start (&sport->trigger_start_tx, +ms_to_ktime (port->rs485.delay_rts_before_send), +HRTIMER_MODE_REL );return ; }
instead?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
PATCH 11/44 tty: 8250, use ms_to_ktime
In reply to Jiri SlabyThis really eliminates multiplications from the assembly. I would have thought they are optimized by inlining ktime_set, but not on x86_64 with gcc 10.
--- drivers/tty/serial/8250/8250_port.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/tty/serial/8250/8250_port.c +1 -5
@@ -1487,11 +1487,7 @@ static enum hrtimer_restart serial8250_em485_handle_stop_tx(struct hrtimer *t)static void start_hrtimer_ms (struct hrtimer *hrt,unsigned long msec) { -long sec = msec /1000 ; -long nsec = (msec %1000 ) *1000000 ; -ktime_t t =ktime_set (sec, nsec); - -hrtimer_start (hrt, t,HRTIMER_MODE_REL ); +hrtimer_start (hrt,ms_to_ktime (msec),HRTIMER_MODE_REL ); }static void __stop_tx_rs485 (struct uart_8250_port *p)
Signature · 1 line
2.30.1
PATCH 12/44 tty: 8250, cleanup em485 timers
In reply to Jiri SlabyInitialize the variables directly by initializers in definitions. This is expected/usual for these kind of callback.
--- drivers/tty/serial/8250/8250_port.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
drivers/tty/serial/8250/8250_port.c +8 -10
@@ -1466,13 +1466,11 @@ EXPORT_SYMBOL_GPL(serial8250_em485_stop_tx);static enum hrtimer_restart serial8250_em485_handle_stop_tx (struct hrtimer *t) { -struct uart_8250_em485 *em485; -struct uart_8250_port *p; + struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485, + stop_tx_timer); +struct uart_8250_port *p = em485->port;unsigned long flags; - em485 = container_of(t, struct uart_8250_em485, stop_tx_timer); - p = em485->port; -serial8250_rpm_get (p);spin_lock_irqsave (&p->port.lock, flags);if (em485->active_timer == &em485->stop_tx_timer) {
@@ -1482,6 +1480,7 @@ static enum hrtimer_restart serial8250_em485_handle_stop_tx(struct hrtimer *t) }spin_unlock_irqrestore (&p->port.lock, flags);serial8250_rpm_put (p); +return HRTIMER_NORESTART ; }
@@ -1629,19 +1628,18 @@ static inline void start_tx_rs485(struct uart_port *port)static enum hrtimer_restart serial8250_em485_handle_start_tx (struct hrtimer *t) { -struct uart_8250_em485 *em485; -struct uart_8250_port *p; + struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485, + start_tx_timer); +struct uart_8250_port *p = em485->port;unsigned long flags; - em485 = container_of(t, struct uart_8250_em485, start_tx_timer); - p = em485->port; -spin_lock_irqsave (&p->port.lock, flags);if (em485->active_timer == &em485->start_tx_timer) {__start_tx (&p->port); em485->active_timer =NULL ; }spin_unlock_irqrestore (&p->port.lock, flags); +return HRTIMER_NORESTART ; }
Signature · 1 line
2.30.1
PATCH 13/44 tty: 8250/serial_cs, propagate errors in simple_config
In reply to Jiri SlabyThe caller expects from the others (pfc_config and multi_config) to return standard error values. So do the same for simple_config too.
We invert the if condition to handle the error case.
--- drivers/tty/serial/8250/serial_cs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/tty/serial/8250/serial_cs.c +6 -6
@@ -456,11 +456,11 @@ static int simple_config(struct pcmcia_device *link)* its base address, then try to grab any standard serial port * address, and finally try to get any free port. */ -if (!pcmcia_loop_config (link, simple_config_check_notpicky,NULL )) - goto found_port; - -dev_warn (&link->dev,"no usable port range found, giving up\n" ); -return -1 ; + ret =pcmcia_loop_config (link, simple_config_check_notpicky,NULL ); +if (ret) { +dev_warn (&link->dev,"no usable port range found, giving up\n" ); +return ret; + } found_port:if (info->multi && (info->manfid ==MANFID_3COM ))
@@ -474,7 +474,7 @@ static int simple_config(struct pcmcia_device *link) ret =pcmcia_enable_device (link);if (ret !=0 ) -return -1 ; +return ret;return setup_serial (link, info, link->resource[0 ]->start, link->irq); }
Signature · 1 line
2.30.1
PATCH 14/44 net: caif: inline register_ldisc
In reply to Jiri Slabyregister_ldisc only calls tty_register_ldisc. Inline register_ldisc into the only caller of register_ldisc, i.e. caif_ser_init. Now, caif_ser_init is symmetric to caif_ser_exit in this regard.
--- drivers/net/caif/caif_serial.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-)
drivers/net/caif/caif_serial.c +4 -13
@@ -389,18 +389,6 @@ static struct tty_ldisc_ops caif_ldisc = { .write_wakeup = ldisc_tx_wakeup }; -static int register_ldisc (void ) -{ -int result; - - result =tty_register_ldisc (N_CAIF , &caif_ldisc); -if (result <0 ) { -pr_err ("cannot register CAIF ldisc=%d err=%d\n" ,N_CAIF , - result); -return result; - } -return result; -}static const struct net_device_ops netdev_ops = { .ndo_open = caif_net_open, .ndo_stop = caif_net_close,
@@ -443,7 +431,10 @@ static int __init caif_ser_init(void) {int ret; - ret =register_ldisc (); + ret =tty_register_ldisc (N_CAIF , &caif_ldisc); +if (ret <0 ) +pr_err ("cannot register CAIF ldisc=%d err=%d\n" ,N_CAIF , ret); + debugfsdir =debugfs_create_dir ("caif_serial" ,NULL );return ret; }
Signature · 1 line
2.30.1
PATCH 15/44 net: nfc: nci: remove memset of nci_uart_drivers
In reply to Jiri Slabynci_uart_drivers is a global definition, so there is no need to initialize its memory to zero during module load.
--- net/nfc/nci/uart.c | 1 - 1 file changed, 1 deletion(-)
net/nfc/nci/uart.c +0 -1
@@ -468,7 +468,6 @@ static struct tty_ldisc_ops nci_uart_ldisc = {static int __init nci_uart_init (void ) { -memset (nci_uart_drivers,0 ,sizeof (nci_uart_drivers));return tty_register_ldisc (N_NCI , &nci_uart_ldisc); }
Signature · 1 line
2.30.1
PATCH 16/44 net: nfc: nci: drop nci_uart_ops::recv_buf
In reply to Jiri SlabyThere is noone setting nci_uart_ops::recv_buf, so the default one (nci_uart_default_recv_buf) is always used. So drop this hook, move nci_uart_default_recv_buf before the use in nci_uart_tty_receive and remove unused parameter flags.
--- include/net/nfc/nci_core.h | 2 - net/nfc/nci/uart.c | 136 ++++++++++++++++++------------------- 2 files changed, 67 insertions(+), 71 deletions(-)
include/net/nfc/nci_core.h +0 -2
@@ -430,8 +430,6 @@ struct nci_uart_ops {int (*open)(struct nci_uart *nci_uart);void (*close)(struct nci_uart *nci_uart);int (*recv)(struct nci_uart *nci_uart,struct sk_buff *skb); -int (*recv_buf)(struct nci_uart *nci_uart,const u8 *data,char *flags, -int count);int (*send)(struct nci_uart *nci_uart,struct sk_buff *skb);void (*tx_start)(struct nci_uart *nci_uart);void (*tx_done)(struct nci_uart *nci_uart);
net/nfc/nci/uart.c +67 -69
160 lines not on this page · raw message
Signature · 1 line
2.30.1
PATCH 17/44 net: nfc: nci: drop nci_uart_default_recv
In reply to Jiri Slabynci_uart_register returns -EINVAL immediately when nu->ops.recv is not set. So the same 'if' later never triggers so nci_uart_default_recv is never used. Drop it.
--- net/nfc/nci/uart.c | 10 ---------- 1 file changed, 10 deletions(-)
net/nfc/nci/uart.c +0 -10
@@ -387,12 +387,6 @@ static int nci_uart_send(struct nci_uart *nu, struct sk_buff *skb)return 0 ; } -/* -- Default recv handler -- */ -static int nci_uart_default_recv (struct nci_uart *nu,struct sk_buff *skb) -{ -return nci_recv_frame (nu->ndev, skb); -} -int nci_uart_register (struct nci_uart *nu) { if (!nu || !nu->ops.open ||
@@ -402,10 +396,6 @@ int nci_uart_register(struct nci_uart *nu)/* Set the send callback */ nu->ops.send = nci_uart_send; -/* Install default handlers if not overridden */ -if (!nu->ops.recv) - nu->ops.recv = nci_uart_default_recv; -/* Add this driver in the driver list */ if (nci_uart_drivers[nu->driver]) {pr_err ("driver %d is already registered\n" , nu->driver);
Signature · 1 line
2.30.1
PATCH 18/44 tty: con3215, remove tasklet for tty_wakeup
In reply to Jiri Slabytty_wakeup is safe to be called from all contexts. No need to schedule a tasklet for that. Let us call it directly like in other drivers.
And delete the tasklet completely.
--- drivers/s390/char/con3215.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-)
drivers/s390/char/con3215.c +1 -19
@@ -85,7 +85,6 @@ struct raw3215_info {int written;/* number of bytes in write requests */ struct raw3215_req *queued_read;/* pointer to queued read requests */ struct raw3215_req *queued_write;/* pointer to queued write requests */ -struct tasklet_struct tlet;/* tasklet to invoke tty_wakeup */ wait_queue_head_t empty_wait;/* wait queue for flushing */ struct timer_list timer;/* timer for delayed output */ int line_pos;/* position on the line (for tabs) */
@@ -329,21 +328,6 @@ static inline void raw3215_try_io(struct raw3215_info *raw) } } -/* -* Call tty_wakeup from tasklet context -*/ -static void raw3215_wakeup (unsigned long data) -{ -struct raw3215_info *raw = (struct raw3215_info *) data; -struct tty_struct *tty; - - tty =tty_port_tty_get (&raw->port); -if (tty) { -tty_wakeup (tty); -tty_kref_put (tty); - } -} -/* * Try to start the next IO and wake up processes waiting on the tty. */
@@ -352,7 +336,7 @@ static void raw3215_next_io(struct raw3215_info *raw, struct tty_struct *tty)raw3215_mk_write_req (raw);raw3215_try_io (raw);if (tty &&RAW3215_BUFFER_SIZE - raw->count >=RAW3215_MIN_SPACE ) -tasklet_schedule (&raw->tlet); +tty_wakeup (tty); }/*
@@ -644,7 +628,6 @@ static struct raw3215_info *raw3215_alloc_info(void)timer_setup (&info->timer, raw3215_timeout,0 );init_waitqueue_head (&info->empty_wait); -tasklet_init (&info->tlet, raw3215_wakeup, (unsigned long )info);tty_port_init (&info->port);return info;
@@ -936,7 +919,6 @@ static void tty3215_close(struct tty_struct *tty, struct file * filp) tty->closing =1 ;/* Shutdown the terminal */ raw3215_shutdown (raw); -tasklet_kill (&raw->tlet); tty->closing =0 ;tty_port_tty_set (&raw->port,NULL ); }
Signature · 1 line
2.30.1
PATCH 19/44 tty: con3215, remove unneeded tty checks
In reply to Jiri SlabyThere is no need to check tty in these functions as it's always non-NULL. So remove the tests.
--- drivers/s390/char/con3215.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/s390/char/con3215.c +0 -4
@@ -948,8 +948,6 @@ static int tty3215_write(struct tty_struct * tty,struct raw3215_info *raw;int i, written; -if (!tty) -return 0 ; raw = (struct raw3215_info *) tty->driver_data; written = count;while (count >0 ) {
@@ -975,8 +973,6 @@ static int tty3215_put_char(struct tty_struct *tty, unsigned char ch) {struct raw3215_info *raw; -if (!tty) -return 0 ; raw = (struct raw3215_info *) tty->driver_data;raw3215_putchar (raw, ch);return 1 ;
Signature · 1 line
2.30.1
PATCH 20/44 tty: con3215, remove tty->driver_data casts
In reply to Jiri SlabyCasts of 'void *' pointer are superfluous. So remove them.
--- drivers/s390/char/con3215.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-)
drivers/s390/char/con3215.c +11 -21
@@ -911,9 +911,8 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp)*/ static void tty3215_close (struct tty_struct *tty,struct file * filp) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data; - raw = (struct raw3215_info *) tty->driver_data;if (raw ==NULL || tty->count >1 )return ; tty->closing =1 ;
@@ -928,9 +927,7 @@ static void tty3215_close(struct tty_struct *tty, struct file * filp)*/ static int tty3215_write_room (struct tty_struct *tty) { -struct raw3215_info *raw; - - raw = (struct raw3215_info *) tty->driver_data; +struct raw3215_info *raw = tty->driver_data;/* Subtract TAB_STOP_SIZE to allow for a tab, 8 <<< 64K */ if ((RAW3215_BUFFER_SIZE - raw->count -TAB_STOP_SIZE ) >=0 )
@@ -945,10 +942,9 @@ static int tty3215_write_room(struct tty_struct *tty)static int tty3215_write (struct tty_struct * tty,const unsigned char *buf,int count) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data;int i, written; - raw = (struct raw3215_info *) tty->driver_data; written = count;while (count >0 ) {for (i =0 ; i < count; i++)
@@ -971,10 +967,10 @@ static int tty3215_write(struct tty_struct * tty,*/ static int tty3215_put_char (struct tty_struct *tty,unsigned char ch) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data; - raw = (struct raw3215_info *) tty->driver_data;raw3215_putchar (raw, ch); +return 1 ; }
@@ -987,17 +983,15 @@ static void tty3215_flush_chars(struct tty_struct *tty)*/ static int tty3215_chars_in_buffer (struct tty_struct *tty) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data; - raw = (struct raw3215_info *) tty->driver_data;return raw->count; }static void tty3215_flush_buffer (struct tty_struct *tty) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data; - raw = (struct raw3215_info *) tty->driver_data;raw3215_flush_buffer (raw);tty_wakeup (tty); }
@@ -1007,9 +1001,8 @@ static void tty3215_flush_buffer(struct tty_struct *tty)*/ static void tty3215_throttle (struct tty_struct * tty) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data; - raw = (struct raw3215_info *) tty->driver_data; raw->flags |=RAW3215_THROTTLED ; }
@@ -1018,10 +1011,9 @@ static void tty3215_throttle(struct tty_struct * tty)*/ static void tty3215_unthrottle (struct tty_struct * tty) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data;unsigned long flags; - raw = (struct raw3215_info *) tty->driver_data;if (raw->flags &RAW3215_THROTTLED ) {spin_lock_irqsave (get_ccwdev_lock (raw->cdev), flags); raw->flags &= ~RAW3215_THROTTLED ;
@@ -1035,9 +1027,8 @@ static void tty3215_unthrottle(struct tty_struct * tty)*/ static void tty3215_stop (struct tty_struct *tty) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data; - raw = (struct raw3215_info *) tty->driver_data; raw->flags |=RAW3215_STOPPED ; }
@@ -1046,10 +1037,9 @@ static void tty3215_stop(struct tty_struct *tty)*/ static void tty3215_start (struct tty_struct *tty) { -struct raw3215_info *raw; +struct raw3215_info *raw = tty->driver_data;unsigned long flags; - raw = (struct raw3215_info *) tty->driver_data;if (raw->flags &RAW3215_STOPPED ) {spin_lock_irqsave (get_ccwdev_lock (raw->cdev), flags); raw->flags &= ~RAW3215_STOPPED ;
Signature · 1 line
2.30.1
PATCH 21/44 tty: jsm_tty, make char+error handling readable
In reply to Jiri SlabyThe code for char+error handling in jsm_input was complete mess of letters. Introduce 3 new local variables and use them with care.
--- drivers/tty/serial/jsm/jsm_tty.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-)
drivers/tty/serial/jsm/jsm_tty.c +14 -10
@@ -603,18 +603,22 @@ void jsm_input(struct jsm_channel *ch)if (I_PARMRK (tp) ||I_BRKINT (tp) ||I_INPCK (tp)) {for (i =0 ; i < s; i++) { +u8 chr = ch->ch_rqueue[tail + i]; +u8 error = ch->ch_equeue[tail + i]; +char flag =TTY_NORMAL ; +/* -* Give the Linux ld the flags in the -* format it likes. +* Give the Linux ld the flags in the format it +* likes. */ -if (*(ch->ch_equeue + tail + i) &UART_LSR_BI ) -tty_insert_flip_char (port, *(ch->ch_rqueue +tail +i),TTY_BREAK ); -else if (*(ch->ch_equeue +tail +i) &UART_LSR_PE ) -tty_insert_flip_char (port, *(ch->ch_rqueue +tail +i),TTY_PARITY ); -else if (*(ch->ch_equeue +tail +i) &UART_LSR_FE ) -tty_insert_flip_char (port, *(ch->ch_rqueue +tail +i),TTY_FRAME ); -else -tty_insert_flip_char (port, *(ch->ch_rqueue +tail +i),TTY_NORMAL ); +if (error &UART_LSR_BI ) + flag =TTY_BREAK ; +else if (error &UART_LSR_PE ) + flag =TTY_PARITY ; +else if (error &UART_LSR_FE ) + flag =TTY_FRAME ; + +tty_insert_flip_char (port, chr, flag); } }else {tty_insert_flip_string (port, ch->ch_rqueue + tail, s);
Signature · 1 line
2.30.1
PATCH 22/44 tty: nozomi, remove struct buffer
In reply to Jiri SlabyIt is unused.
--- drivers/tty/nozomi.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/tty/nozomi.c +0 -6
@@ -359,12 +359,6 @@ struct nozomi {u32 open_ttys; }; -/* This is a data packet that is read or written to/from card */ -struct buffer { -u32 size;/* size is the length of the data buffer */ -u8 *data; -} __attribute__ ((packed)); -/* Global variables */ static const struct pci_device_id nozomi_pci_tbl[] = { {PCI_DEVICE (0x1931 ,0x000c )},/* Nozomi HSDPA */
Signature · 1 line
2.30.1
PATCH 23/44 tty: nozomi, remove init/exit messages
In reply to Jiri SlabyRemove useless prints from init and exit functions. The version is artificial anyway.
--- drivers/tty/nozomi.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/tty/nozomi.c +1 -8
@@ -47,9 +47,6 @@#include <linux/delay.h> - -#define VERSION_STRING DRIVER_DESC " 2.1d" -/* Default debug printout level */ #define NOZOMI_DEBUG_LEVEL 0x00static int debug =NOZOMI_DEBUG_LEVEL ;
@@ -89,7 +86,6 @@ do { \/* Defines */ #define NOZOMI_NAME "nozomi"#define NOZOMI_NAME_TTY "nozomi_tty" -#define DRIVER_DESC "Nozomi driver"#define NTTY_TTY_MAXMINORS 256#define NTTY_FIFO_BUFFER_SIZE 8192
@@ -1841,8 +1837,6 @@ static __init int nozomi_init(void) {int ret; -printk (KERN_INFO "Initializing %s\n" ,VERSION_STRING ); - ntty_driver =alloc_tty_driver (NTTY_TTY_MAXMINORS );if (!ntty_driver)return -ENOMEM ;
@@ -1882,7 +1876,6 @@ static __init int nozomi_init(void) static __exit void nozomi_exit(void) { -printk (KERN_INFO "Unloading %s\n" ,DRIVER_DESC );pci_unregister_driver (&nozomi_driver);tty_unregister_driver (ntty_driver);put_tty_driver (ntty_driver);
@@ -1892,4 +1885,4 @@ module_init(nozomi_init);module_exit (nozomi_exit);MODULE_LICENSE ("Dual BSD/GPL" ); -MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_DESCRIPTION ("Nozomi driver" );
Signature · 1 line
2.30.1
PATCH 24/44 tty: nozomi, remove useless debug prints
In reply to Jiri SlabyThese are either commented out or can be printed by tracing mechanisms.
--- drivers/tty/nozomi.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/tty/nozomi.c +0 -11
@@ -777,7 +777,6 @@ static int receive_data(enum port_type index, struct nozomi *dc)int i, ret; size =__le32_to_cpu (readl (addr)); -/* DBG1( "%d bytes port: %d", size, index); */ if (tty &&tty_throttled (tty)) { DBG1("No room in tty, don't read data, don't ack interrupt, "
@@ -1308,8 +1307,6 @@ static int nozomi_card_init(struct pci_dev *pdev,int ndev_idx;int i; -dev_dbg (&pdev->dev,"Init, new card found\n" ); -for (ndev_idx =0 ; ndev_idx <ARRAY_SIZE (ndevs); ndev_idx++)if (!ndevs[ndev_idx])break ;
@@ -1443,8 +1440,6 @@ static void tty_exit(struct nozomi *dc) {unsigned int i; -DBG1 (" " ); -for (i =0 ; i <MAX_PORT ; ++i)tty_port_tty_hangup (&dc->port[i].port, false);
@@ -1609,8 +1604,6 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,struct port *port = tty->driver_data;unsigned long flags; -/* DBG1( "WRITEx: %d, index = %d", count, index); */ -if (!dc || !port)return -ENODEV ;
@@ -1736,8 +1729,6 @@ static int ntty_ioctl(struct tty_struct *tty,struct port *port = tty->driver_data;int rval = -ENOIOCTLCMD ; -DBG1 ("******** IOCTL, cmd: %d" , cmd); -switch (cmd) {case TIOCMIWAIT : {struct async_icount cprev = port->tty_icount;
@@ -1763,7 +1754,6 @@ static void ntty_unthrottle(struct tty_struct *tty)struct nozomi *dc =get_dc_by_tty (tty);unsigned long flags; -DBG1 ("UNTHROTTLE" );spin_lock_irqsave (&dc->spin_mutex, flags);enable_transmit_dl (tty->index %MAX_PORT , dc);set_rts (tty,1 );
@@ -1780,7 +1770,6 @@ static void ntty_throttle(struct tty_struct *tty)struct nozomi *dc =get_dc_by_tty (tty);unsigned long flags; -DBG1 ("THROTTLE" );spin_lock_irqsave (&dc->spin_mutex, flags);set_rts (tty,0 );spin_unlock_irqrestore (&dc->spin_mutex, flags);
Signature · 1 line
2.30.1
PATCH 25/44 tty: vcc, make globals static
In reply to Jiri SlabyThese are used only in this unit, so make them static.
--- drivers/tty/vcc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/tty/vcc.c +3 -3
@@ -66,9 +66,9 @@ static struct tty_driver *vcc_tty_driver;static struct vcc_port *vcc_table[VCC_MAX_PORTS ];static DEFINE_SPINLOCK (vcc_table_lock); -int vcc_dbg; -int vcc_dbg_ldc; -int vcc_dbg_vio; +static unsigned int vcc_dbg; +static unsigned int vcc_dbg_ldc; +static unsigned int vcc_dbg_vio;module_param (vcc_dbg, uint,0664 );module_param (vcc_dbg_ldc, uint,0664 );
Signature · 1 line
2.30.1
PATCH 26/44 tty: vcc, drop version dump
In reply to Jiri SlabyThe version number is artificial, no need to dump it to logs during initialization.
--- drivers/tty/vcc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/tty/vcc.c +1 -9
@@ -14,16 +14,9 @@#include <asm/vio.h> #include <asm/ldc.h> -#define DRV_MODULE_NAME "vcc" -#define DRV_MODULE_VERSION "1.1" -#define DRV_MODULE_RELDATE "July 1, 2017" - -static char version[] - DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")"; -MODULE_DESCRIPTION ("Sun LDOM virtual console concentrator driver" );MODULE_LICENSE ("GPL" ); -MODULE_VERSION (DRV_MODULE_VERSION ); +MODULE_VERSION ("1.1" );struct vcc_port {struct vio_driver_state vio;
@@ -1066,8 +1059,6 @@ static int vcc_tty_init(void) {int rv; -pr_info ("VCC: %s\n" , version); - vcc_tty_driver =tty_alloc_driver (VCC_MAX_PORTS ,VCC_TTY_FLAGS );if (IS_ERR (vcc_tty_driver)) {pr_err ("VCC: TTY driver alloc failed\n" );
Signature · 1 line
2.30.1
PATCH 27/44 tty: vcc, use name strings directly
In reply to Jiri SlabyDo not define global variables for driver/device names, use the strings directly.
--- drivers/tty/vcc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/tty/vcc.c +2 -4
@@ -52,8 +52,6 @@ struct vcc_port {#define VCC_CTL_BREAK -1#define VCC_CTL_HUP -2 -static const char vcc_driver_name[] ="vcc" ; -static const char vcc_device_node[] ="vcc" ;static struct tty_driver *vcc_tty_driver;static struct vcc_port *vcc_table[VCC_MAX_PORTS ];
@@ -1065,8 +1063,8 @@ static int vcc_tty_init(void)return PTR_ERR (vcc_tty_driver); } - vcc_tty_driver->driver_name = vcc_driver_name; - vcc_tty_driver->name = vcc_device_node; + vcc_tty_driver->driver_name ="vcc" ; + vcc_tty_driver->name ="vcc" ; vcc_tty_driver->minor_start =VCC_MINOR_START ; vcc_tty_driver->type =TTY_DRIVER_TYPE_SYSTEM ;
Signature · 1 line
2.30.1
PATCH 28/44 tty: vcc, remove useless tty checks
In reply to Jiri SlabyAll these functions are called with a valid tty pointer, no need to check that.
--- drivers/tty/vcc.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-)
drivers/tty/vcc.c +0 -45
@@ -726,11 +726,6 @@ static int vcc_open(struct tty_struct *tty, struct file *vcc_file) {struct vcc_port *port; -if (unlikely (!tty)) { -pr_err ("VCC: open: Invalid TTY handle\n" ); -return -ENXIO ; - } -if (tty->count >1 )return -EBUSY ;
@@ -764,11 +759,6 @@ static int vcc_open(struct tty_struct *tty, struct file *vcc_file)static void vcc_close (struct tty_struct *tty,struct file *vcc_file) { -if (unlikely (!tty)) { -pr_err ("VCC: close: Invalid TTY handle\n" ); -return ; - } -if (unlikely (tty->count >1 ))return ;
@@ -796,11 +786,6 @@ static void vcc_hangup(struct tty_struct *tty) {struct vcc_port *port; -if (unlikely (!tty)) { -pr_err ("VCC: hangup: Invalid TTY handle\n" ); -return ; - } - port =vcc_get_ne (tty->index);if (unlikely (!port)) {pr_err ("VCC: hangup: Failed to find VCC port\n" );
@@ -830,11 +815,6 @@ static int vcc_write(struct tty_struct *tty, const unsigned char *buf,int tosend =0 ;int rv = -EINVAL ; -if (unlikely (!tty)) { -pr_err ("VCC: write: Invalid TTY handle\n" ); -return -ENXIO ; - } - port =vcc_get_ne (tty->index);if (unlikely (!port)) {pr_err ("VCC: write: Failed to find VCC port" );
@@ -895,11 +875,6 @@ static int vcc_write_room(struct tty_struct *tty)struct vcc_port *port;u64 num; -if (unlikely (!tty)) { -pr_err ("VCC: write_room: Invalid TTY handle\n" ); -return -ENXIO ; - } - port =vcc_get_ne (tty->index);if (unlikely (!port)) {pr_err ("VCC: write_room: Failed to find VCC port\n" );
@@ -918,11 +893,6 @@ static int vcc_chars_in_buffer(struct tty_struct *tty)struct vcc_port *port;u64 num; -if (unlikely (!tty)) { -pr_err ("VCC: chars_in_buffer: Invalid TTY handle\n" ); -return -ENXIO ; - } - port =vcc_get_ne (tty->index);if (unlikely (!port)) {pr_err ("VCC: chars_in_buffer: Failed to find VCC port\n" );
@@ -941,11 +911,6 @@ static int vcc_break_ctl(struct tty_struct *tty, int state)struct vcc_port *port;unsigned long flags; -if (unlikely (!tty)) { -pr_err ("VCC: break_ctl: Invalid TTY handle\n" ); -return -ENXIO ; - } - port =vcc_get_ne (tty->index);if (unlikely (!port)) {pr_err ("VCC: break_ctl: Failed to find VCC port\n" );
@@ -976,11 +941,6 @@ static int vcc_install(struct tty_driver *driver, struct tty_struct *tty)struct tty_port *port_tty;int ret; -if (unlikely (!tty)) { -pr_err ("VCC: install: Invalid TTY handle\n" ); -return -ENXIO ; - } -if (tty->index >=VCC_MAX_PORTS )return -EINVAL ;
@@ -1015,11 +975,6 @@ static void vcc_cleanup(struct tty_struct *tty) {struct vcc_port *port; -if (unlikely (!tty)) { -pr_err ("VCC: cleanup: Invalid TTY handle\n" ); -return ; - } - port =vcc_get (tty->index, true);if (port) { port->tty =NULL ;
Signature · 1 line
2.30.1
PATCH 29/44 tty: xtensa/iss, drop serial_version & serial_name
In reply to Jiri SlabyThere is no need to print the information during module load. Neither to print some artificial version. So drop these strings and a print.
--- arch/xtensa/platforms/iss/console.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
arch/xtensa/platforms/iss/console.c +1 -6
@@ -37,9 +37,6 @@ static struct timer_list serial_timer;static DEFINE_SPINLOCK (timer_lock); -static char *serial_version ="0.1" ; -static char *serial_name ="ISS serial driver" ; -/* * This routine is called whenever a serial port is opened. It * enables interrupts for a serial port, linking in its async structure into
@@ -149,7 +146,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)static int rs_proc_show (struct seq_file *m,void *v) { -seq_printf (m,"serinfo:1.0 driver:%s\n" , serial_version); +seq_printf (m,"serinfo:1.0 driver:0.1\n" );return 0 ; }
@@ -172,8 +169,6 @@ int __init rs_init(void) serial_driver =alloc_tty_driver (SERIAL_MAX_NUM_LINES ); -pr_info ("%s %s\n" , serial_name, serial_version); -/* Initialize the tty_driver structure */ serial_driver->driver_name ="iss_serial" ;
Signature · 1 line
2.30.1
Re: [PATCH 29/44] tty: xtensa/iss, drop serial_version & serial_name
Quoted 11 lines · Jiri Slaby
There is no need to print the information during module load. Neither to print some artificial version. So drop these strings and a print.
Signed-off-by Jiri Slaby <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>--- arch/xtensa/platforms/iss/console.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
Signature · 2 lines
Thanks. -- Max
PATCH 30/44 tty: xtensa/iss, don't reassign to tty->port
In reply to Jiri SlabyWe already do tty_port_link_device in rs_init, so we don't need to reassign a port to tty->port. It would be too late in tty::ops::open anyway.
--- arch/xtensa/platforms/iss/console.c | 1 - 1 file changed, 1 deletion(-)
arch/xtensa/platforms/iss/console.c +0 -1
@@ -48,7 +48,6 @@ static void rs_poll(struct timer_list *);static int rs_open (struct tty_struct *tty,struct file * filp) { - tty->port = &serial_port;spin_lock_bh (&timer_lock);if (tty->count ==1 ) {timer_setup (&serial_timer, rs_poll,0 );
Signature · 1 line
2.30.1
Re: [PATCH 30/44] tty: xtensa/iss, don't reassign to tty->port
Quoted 5 lines · Jiri Slaby
We already do
tty_port_link_deviceinrs_init, so we don't need to reassign a port totty->port. It would be too late intty::ops::openanyway.
Quoted 7 lines
Signed-off-by Jiri Slaby <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>--- arch/xtensa/platforms/iss/console.c | 1 - 1 file changed, 1 deletion(-)
Signature · 2 lines
Thanks. -- Max
PATCH 31/44 tty: xtensa/iss, remove stale comments
In reply to Jiri SlabyThese are likely taken over from amiserial. iss doesn't do anything of that.
--- arch/xtensa/platforms/iss/console.c | 18 ------------------ 1 file changed, 18 deletions(-)
arch/xtensa/platforms/iss/console.c +0 -18
@@ -37,13 +37,6 @@ static struct timer_list serial_timer;static DEFINE_SPINLOCK (timer_lock); -/* -* This routine is called whenever a serial port is opened. It -* enables interrupts for a serial port, linking in its async structure into -* the IRQ chain. It also performs the serial-specific -* initialization for the tty structure. -*/ -static void rs_poll (struct timer_list *);static int rs_open (struct tty_struct *tty,struct file * filp)
@@ -58,17 +51,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)return 0 ; } - -/* -* ------------------------------------------------------------ -* iss_serial_close() -* -* This routine is called when the serial port gets closed. First, we -* wait for the last remaining data to be sent. Then, we unlink its -* async structure from the interrupt chain if necessary, and we free -* that IRQ if nothing is left in the chain. -* ------------------------------------------------------------ -*/ static void rs_close (struct tty_struct *tty,struct file * filp) {spin_lock_bh (&timer_lock);
Signature · 1 line
2.30.1
Re: [PATCH 31/44] tty: xtensa/iss, remove stale comments
Quoted 11 lines · Jiri Slaby
These are likely taken over from amiserial. iss doesn't do anything of that.
Signed-off-by Jiri Slaby <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>--- arch/xtensa/platforms/iss/console.c | 18 ------------------ 1 file changed, 18 deletions(-)
Signature · 2 lines
Thanks. -- Max
PATCH 32/44 tty: xtensa/iss, setup the timer statically
In reply to Jiri SlabyUse DEFINE_TIMER and avoid runtime initialization of the serial_timer.
--- arch/xtensa/platforms/iss/console.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
arch/xtensa/platforms/iss/console.c +4 -7
@@ -31,21 +31,18 @@#define SERIAL_MAX_NUM_LINES 1#define SERIAL_TIMER_VALUE (HZ / 10) +static void rs_poll (struct timer_list *); +static struct tty_driver *serial_driver;static struct tty_port serial_port; -static struct timer_list serial_timer; - +static DEFINE_TIMER(serial_timer, rs_poll);static DEFINE_SPINLOCK (timer_lock); -static void rs_poll (struct timer_list *); -static int rs_open (struct tty_struct *tty,struct file * filp) {spin_lock_bh (&timer_lock); -if (tty->count ==1 ) { -timer_setup (&serial_timer, rs_poll,0 ); +if (tty->count ==1 )mod_timer (&serial_timer, jiffies +SERIAL_TIMER_VALUE ); - }spin_unlock_bh (&timer_lock);return 0 ;
Signature · 1 line
2.30.1
Re: [PATCH 32/44] tty: xtensa/iss, setup the timer statically
Quoted 10 lines · Jiri Slaby
Use
DEFINE_TIMERand avoid runtime initialization of theserial_timer.Signed-off-by Jiri Slaby <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>--- arch/xtensa/platforms/iss/console.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
Signature · 2 lines
Thanks. -- Max
PATCH 33/44 tty: xtensa/iss, make rs_init static
In reply to Jiri SlabyTo fix the warning:
warning: no previous prototype for 'rs_init'
--- arch/xtensa/platforms/iss/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/xtensa/platforms/iss/console.c +1 -1
@@ -141,7 +141,7 @@ static const struct tty_operations serial_ops = { .proc_show = rs_proc_show, }; -int __init rs_init (void ) +static int __init rs_init (void ) {tty_port_init (&serial_port);
Signature · 1 line
2.30.1
Re: [PATCH 33/44] tty: xtensa/iss, make rs_init static
Quoted 11 lines · Jiri Slaby
To fix the warning:
warning: no previous prototype for 'rs_init'Signed-off-by Jiri Slaby <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>--- arch/xtensa/platforms/iss/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
Thanks. -- Max
PATCH 34/44 tty: do not check tty_unregister_driver's return value
In reply to Jiri SlabyThese drivers check tty_unregister_driver return value. But they don't handle a failure correctly (they free the driver in any case). So stop checking tty_unregister_driver return value and remove also the prints.
In the next patch, tty_unregister_driver's return type will be switched to void.
--- arch/xtensa/platforms/iss/console.c | 6 +----- drivers/tty/amiserial.c | 8 ++------ drivers/tty/ipwireless/tty.c | 7 +------ drivers/tty/moxa.c | 4 +--- drivers/tty/serial/kgdb_nmi.c | 4 +--- drivers/tty/synclink_gt.c | 5 +---- 6 files changed, 7 insertions(+), 27 deletions(-)
arch/xtensa/platforms/iss/console.c +1 -5
@@ -171,11 +171,7 @@ static int __init rs_init(void) static __exit void rs_exit(void) { -int error; - -if ((error =tty_unregister_driver (serial_driver))) -pr_err ("ISS_SERIAL: failed to unregister serial driver (%d)\n" , - error); +tty_unregister_driver (serial_driver);put_tty_driver (serial_driver);tty_port_destroy (&serial_port); }
drivers/tty/amiserial.c +2 -6
@@ -1622,21 +1622,17 @@ static int __init amiga_serial_probe(struct platform_device *pdev) static int __exit amiga_serial_remove(struct platform_device *pdev) { -int error;struct serial_state *state =platform_get_drvdata (pdev);/* printk("Unloading %s: version %s\n", serial_name, serial_version); */ - error =tty_unregister_driver (serial_driver); -if (error) -printk ("SERIAL: failed to unregister serial driver (%d)\n" , - error); +tty_unregister_driver (serial_driver);put_tty_driver (serial_driver);tty_port_destroy (&state->tport);free_irq (IRQ_AMIGA_TBE , state);free_irq (IRQ_AMIGA_RBF , state); -return error; +return 0 ; }static struct platform_driver amiga_serial_driver = {
drivers/tty/ipwireless/tty.c +1 -6
@@ -596,13 +596,8 @@ int ipwireless_tty_init(void)void ipwireless_tty_release (void ) { -int ret; - - ret =tty_unregister_driver (ipw_tty_driver); +tty_unregister_driver (ipw_tty_driver);put_tty_driver (ipw_tty_driver); -if (ret !=0 ) - printk(KERN_ERR IPWIRELESS_PCCARD_NAME -": tty_unregister_driver failed with code %d\n" , ret); }int ipwireless_tty_is_modem (struct ipw_tty *tty)
drivers/tty/moxa.c +1 -3
@@ -1118,9 +1118,7 @@ static void __exit moxa_exit(void)del_timer_sync (&moxaTimer); -if (tty_unregister_driver (moxaDriver)) -printk (KERN_ERR "Couldn't unregister MOXA Intellio family " -"serial driver\n" ); +tty_unregister_driver (moxaDriver);put_tty_driver (moxaDriver); }
drivers/tty/serial/kgdb_nmi.c +1 -3
@@ -373,9 +373,7 @@ int kgdb_unregister_nmi_console(void)if (ret)return ret; - ret =tty_unregister_driver (kgdb_nmi_tty_driver); -if (ret) -return ret; +tty_unregister_driver (kgdb_nmi_tty_driver);put_tty_driver (kgdb_nmi_tty_driver);return 0 ;
drivers/tty/synclink_gt.c +1 -4
@@ -3705,7 +3705,6 @@ static const struct tty_operations ops = {static void slgt_cleanup (void ) { -int rc;struct slgt_info *info;struct slgt_info *tmp;
@@ -3714,9 +3713,7 @@ static void slgt_cleanup(void)if (serial_driver) {for (info=slgt_device_list ; info !=NULL ; info=info->next_device)tty_unregister_device (serial_driver, info->line); - rc =tty_unregister_driver (serial_driver); -if (rc) -DBGERR (("tty_unregister_driver error=%d\n" , rc)); +tty_unregister_driver (serial_driver);put_tty_driver (serial_driver); }
Signature · 1 line
2.30.1
Re: [PATCH 34/44] tty: do not check tty_unregister_driver's return value
Quoted 14 lines · Jiri Slaby
These drivers check
tty_unregister_driverreturn value. But they don't handle a failure correctly (they free the driver in any case). So stop checkingtty_unregister_driverreturn value and remove also the prints.In the next patch, tty_unregister_driver's return type will be switched to void.
Signed-off-by Jiri Slaby <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>Cc Jiri Kosina <[email protected]>Cc David Sterba <[email protected]>
Quoted 8 lines
--- arch/xtensa/platforms/iss/console.c | 6 +----- drivers/tty/amiserial.c | 8 ++------ drivers/tty/ipwireless/tty.c | 7 +------ drivers/tty/moxa.c | 4 +--- drivers/tty/serial/kgdb_nmi.c | 4 +--- drivers/tty/synclink_gt.c | 5 +---- 6 files changed, 7 insertions(+), 27 deletions(-)
Signature · 2 lines
Thanks. -- Max
Re: [PATCH 34/44] tty: do not check tty_unregister_driver's return value
In reply to Jiri SlabyQuoted 7 lines · Jiri Slaby
These drivers check
tty_unregister_driverreturn value. But they don't handle a failure correctly (they free the driver in any case). So stop checkingtty_unregister_driverreturn value and remove also the prints.In the next patch, tty_unregister_driver's return type will be switched to void.
Quoted 7 lines
Signed-off-by Jiri Slaby <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>Cc Jiri Kosina <[email protected]>Cc David Sterba <[email protected]>---
For
Quoted 1 line
drivers/tty/ipwireless/tty.c | 7 +------
Thanks.
PATCH 35/44 tty: let tty_unregister_driver return void
In reply to Jiri SlabyNow that noone checks the return value, switch the return type of tty_unregister_driver to void. We can do that as we always return zero.
Generally, drivers are not allowed to call tty_unregister_driver while there are open devices.
--- drivers/tty/tty_io.c | 9 +-------- include/linux/tty.h | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-)
drivers/tty/tty_io.c +1 -8
@@ -3525,21 +3525,14 @@ EXPORT_SYMBOL(tty_register_driver);/* * Called by a tty driver to unregister itself. */ -int tty_unregister_driver (struct tty_driver *driver) +void tty_unregister_driver (struct tty_driver *driver) { -#if 0 -/* FIXME */ -if (driver->refcount) -return -EBUSY ; -#endif unregister_chrdev_region (MKDEV (driver->major, driver->minor_start), driver->num);mutex_lock (&tty_mutex);list_del (&driver->tty_drivers);mutex_unlock (&tty_mutex); -return 0 ; } -EXPORT_SYMBOL (tty_unregister_driver);dev_t tty_devnum (struct tty_struct *tty)
include/linux/tty.h +1 -1
@@ -482,7 +482,7 @@ extern void stop_tty(struct tty_struct *tty);extern void __start_tty (struct tty_struct *tty);extern void start_tty (struct tty_struct *tty);extern int tty_register_driver (struct tty_driver *driver); -extern int tty_unregister_driver (struct tty_driver *driver); +extern void tty_unregister_driver (struct tty_driver *driver);extern struct device *tty_register_device (struct tty_driver *driver,unsigned index,struct device *dev); extern struct device *tty_register_device_attr(struct tty_driver *driver,
Signature · 1 line
2.30.1
PATCH 36/44 tty: localise ptychar and make it const
In reply to Jiri Slabyptychar was not const, so mark it as such. And move this variable to the only place where it's used.
--- drivers/tty/tty_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/tty_io.c +1 -2
@@ -1196,8 +1196,6 @@ int tty_send_xchar(struct tty_struct *tty, char ch)return 0 ; } -static char ptychar[] ="pqrstuvwxyzabcde" ; -/** * pty_line_name - generate name for a pty * @driver: the tty driver in use
@@ -1211,6 +1209,7 @@ static char ptychar[] = "pqrstuvwxyzabcde";*/ static void pty_line_name (struct tty_driver *driver,int index,char *p) { +static const char ptychar[] ="pqrstuvwxyzabcde" ;int i = index + driver->name_base;/* ->name is initialized to "ttyp", but "tty" is expected */ sprintf(p, "%s%c%x",
Signature · 1 line
2.30.1
PATCH 37/44 USB: serial/keyspan, drop unneeded forward declarations
In reply to Jiri SlabyForward declarations make the code larger, harder to follow and rewrite. Harder as the declarations are often omitted from global changes. Remove forward declarations which are not really needed, i.e. when the definition of the function is before its first use.
--- drivers/usb/serial/keyspan.c | 20 -------------------- 1 file changed, 20 deletions(-)
drivers/usb/serial/keyspan.c +0 -20
@@ -41,27 +41,7 @@#define DRIVER_AUTHOR "Hugh Blemings <[email protected]"#define DRIVER_DESC "Keyspan USB to Serial Converter Driver" -/* Function prototypes for Keyspan serial converter */ -static int keyspan_open (struct tty_struct *tty,struct usb_serial_port *port); -static void keyspan_close (struct usb_serial_port *port); -static void keyspan_dtr_rts (struct usb_serial_port *port,int on); -static int keyspan_startup (struct usb_serial *serial); -static void keyspan_disconnect (struct usb_serial *serial); -static void keyspan_release (struct usb_serial *serial); -static int keyspan_port_probe (struct usb_serial_port *port); -static void keyspan_port_remove (struct usb_serial_port *port); -static int keyspan_write_room (struct tty_struct *tty); -static int keyspan_write (struct tty_struct *tty,struct usb_serial_port *port, -const unsigned char *buf,int count);static void keyspan_send_setup (struct usb_serial_port *port,int reset_port); -static void keyspan_set_termios (struct tty_struct *tty, -struct usb_serial_port *port, -struct ktermios *old); -static void keyspan_break_ctl (struct tty_struct *tty,int break_state); -static int keyspan_tiocmget (struct tty_struct *tty); -static int keyspan_tiocmset (struct tty_struct *tty,unsigned int set, -unsigned int clear); -static int keyspan_fake_startup (struct usb_serial *serial); static int keyspan_usa19_calc_baud(struct usb_serial_port *port, u32 baud_rate, u32 baudclk,
Signature · 1 line
2.30.1
Re: [PATCH 37/44] USB: serial/keyspan, drop unneeded forward declarations
Quoted 10 lines · Jiri Slaby
Forward declarations make the code larger, harder to follow and rewrite. Harder as the declarations are often omitted from global changes. Remove forward declarations which are not really needed, i.e. when the definition of the function is before its first use.
Signed-off-by Jiri Slaby <[email protected]>Cc Johan Hovold <[email protected]>--- drivers/usb/serial/keyspan.c | 20 -------------------- 1 file changed, 20 deletions(-)
I'll let Johan take this through his tree:
Johan Hovold
maintainerRe: [PATCH 37/44] USB: serial/keyspan, drop unneeded forward declarations
Quoted 12 lines · Greg Kroah-Hartman
Quoted 10 lines · Jiri Slaby
Forward declarations make the code larger, harder to follow and rewrite. Harder as the declarations are often omitted from global changes. Remove forward declarations which are not really needed, i.e. when the definition of the function is before its first use.
Signed-off-by Jiri Slaby <[email protected]>Cc Johan Hovold <[email protected]>--- drivers/usb/serial/keyspan.c | 20 -------------------- 1 file changed, 20 deletions(-)
Quoted 3 lines
I'll let Johan take this through his tree:
Reviewed-by Greg Kroah-Hartman <[email protected]>
Thanks, I'll pick these two up next week.
Jiri, was there ever a cover letter to this series? It took a while for all 44 (!) patches to hit the lists (or my inbox), but I never could figure out whether there was an overall theme to it that made you post it all as a single series in the first place.
Johan
Johan Hovold
maintainerRe: [PATCH 37/44] USB: serial/keyspan, drop unneeded forward declarations
In reply to Greg KHQuoted 12 lines · Greg Kroah-Hartman
Quoted 10 lines · Jiri Slaby
Forward declarations make the code larger, harder to follow and rewrite. Harder as the declarations are often omitted from global changes. Remove forward declarations which are not really needed, i.e. when the definition of the function is before its first use.
Signed-off-by Jiri Slaby <[email protected]>Cc Johan Hovold <[email protected]>--- drivers/usb/serial/keyspan.c | 20 -------------------- 1 file changed, 20 deletions(-)
Quoted 3 lines
I'll let Johan take this through his tree:
Reviewed-by Greg Kroah-Hartman <[email protected]>
Now applied.
Johan
PATCH 38/44 USB: serial/io_edgeport, drop unneeded forward declarations
In reply to Jiri SlabyForward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use.
--- drivers/usb/serial/io_edgeport.c | 41 -------------------------------- 1 file changed, 41 deletions(-)
drivers/usb/serial/io_edgeport.c +0 -41
@@ -265,35 +265,7 @@ static atomic_t CmdUrbs = ATOMIC_INIT(0);/* local function prototypes */ -/* function prototypes for all URB callbacks */ -static void edge_interrupt_callback (struct urb *urb); -static void edge_bulk_in_callback (struct urb *urb); -static void edge_bulk_out_data_callback (struct urb *urb); -static void edge_bulk_out_cmd_callback (struct urb *urb); - -/* function prototypes for the usbserial callbacks */ -static int edge_open (struct tty_struct *tty,struct usb_serial_port *port);static void edge_close (struct usb_serial_port *port); -static int edge_write (struct tty_struct *tty,struct usb_serial_port *port, -const unsigned char *buf,int count); -static int edge_write_room (struct tty_struct *tty); -static int edge_chars_in_buffer (struct tty_struct *tty); -static void edge_throttle (struct tty_struct *tty); -static void edge_unthrottle (struct tty_struct *tty); -static void edge_set_termios (struct tty_struct *tty, -struct usb_serial_port *port, -struct ktermios *old_termios); -static int edge_ioctl (struct tty_struct *tty, -unsigned int cmd,unsigned long arg); -static void edge_break (struct tty_struct *tty,int break_state); -static int edge_tiocmget (struct tty_struct *tty); -static int edge_tiocmset (struct tty_struct *tty, -unsigned int set,unsigned int clear); -static int edge_startup (struct usb_serial *serial); -static void edge_disconnect (struct usb_serial *serial); -static void edge_release (struct usb_serial *serial); -static int edge_port_probe (struct usb_serial_port *port); -static void edge_port_remove (struct usb_serial_port *port);/* function prototypes for all of our local functions */
@@ -309,8 +281,6 @@ static void handle_new_lsr(struct edgeport_port *edge_port, __u8 lsrData,static int send_iosp_ext_cmd (struct edgeport_port *edge_port,__u8 command,__u8 param);static int calc_baud_rate_divisor (struct device *dev,int baud_rate,int *divisor); -static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, -int baudRate);static void change_port_settings (struct tty_struct *tty,struct edgeport_port *edge_port,struct ktermios *old_termios);
@@ -321,19 +291,8 @@ static int write_cmd_usb(struct edgeport_port *edge_port,static void send_more_port_data (struct edgeport_serial *edge_serial,struct edgeport_port *edge_port); -static int sram_write (struct usb_serial *serial,__u16 extAddr,__u16 addr, -__u16 length,const __u8 *data); -static int rom_read (struct usb_serial *serial,__u16 extAddr,__u16 addr, -__u16 length,__u8 *data);static int rom_write (struct usb_serial *serial,__u16 extAddr,__u16 addr,__u16 length,const __u8 *data); -static void get_manufacturing_desc (struct edgeport_serial *edge_serial); -static void get_boot_desc (struct edgeport_serial *edge_serial); -static void load_application_firmware (struct edgeport_serial *edge_serial); - -static void unicode_to_ascii (char *string,int buflen, -__le16 *unicode,int unicode_size); -/* ************************************************************************ */ /* ************************************************************************ */
Signature · 1 line
2.30.1
Re: [PATCH 38/44] USB: serial/io_edgeport, drop unneeded forward declarations
Quoted 10 lines · Jiri Slaby
Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use.
Signed-off-by Jiri Slaby <[email protected]>Cc Johan Hovold <[email protected]>--- drivers/usb/serial/io_edgeport.c | 41 -------------------------------- 1 file changed, 41 deletions(-)
I'll let Johan take this through his tree:
PATCH 39/44 tty: synclink_gt, drop unneeded forward declarations
In reply to Jiri SlabyForward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use.
--- drivers/tty/synclink_gt.c | 57 +-------------------------------------- 1 file changed, 1 insertion(+), 56 deletions(-)
drivers/tty/synclink_gt.c +1 -56
@@ -137,37 +137,14 @@ MODULE_PARM_DESC(maxframe, "Maximum frame size used by device (4096 to 65535)");*/ static struct tty_driver *serial_driver; -static int open (struct tty_struct *tty,struct file * filp); -static void close (struct tty_struct *tty,struct file * filp); -static void hangup (struct tty_struct *tty); -static void set_termios (struct tty_struct *tty,struct ktermios *old_termios); - -static int write (struct tty_struct *tty,const unsigned char *buf,int count); -static int put_char (struct tty_struct *tty,unsigned char ch); -static void send_xchar (struct tty_struct *tty,char ch);static void wait_until_sent (struct tty_struct *tty,int timeout); -static int write_room (struct tty_struct *tty); -static void flush_chars (struct tty_struct *tty);static void flush_buffer (struct tty_struct *tty); -static void tx_hold (struct tty_struct *tty);static void tx_release (struct tty_struct *tty); -static int ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg); -static int chars_in_buffer (struct tty_struct *tty); -static void throttle (struct tty_struct * tty); -static void unthrottle (struct tty_struct * tty); -static int set_break (struct tty_struct *tty,int break_state); -/* -* generic HDLC support and callbacks +* generic HDLC support */ -#if SYNCLINK_GENERIC_HDLC #define dev_to_port (D ) (dev_to_hdlc(D)->priv) -static void hdlcdev_tx_done (struct slgt_info *info); -static void hdlcdev_rx (struct slgt_info *info,char *buf,int size); -static int hdlcdev_init (struct slgt_info *info); -static void hdlcdev_exit (struct slgt_info *info); -#endif /*
@@ -186,9 +163,6 @@ struct cond_wait {wait_queue_entry_t wait;unsigned int data; }; -static void init_cond_wait (struct cond_wait *w,unsigned int data); -static void add_cond_wait (struct cond_wait **head,struct cond_wait *w); -static void remove_cond_wait (struct cond_wait **head,struct cond_wait *w);static void flush_cond_wait (struct cond_wait **head);/*
@@ -443,12 +417,8 @@ static void shutdown(struct slgt_info *info);static void program_hw (struct slgt_info *info);static void change_params (struct slgt_info *info); -static int register_test (struct slgt_info *info); -static int irq_test (struct slgt_info *info); -static int loopback_test (struct slgt_info *info);static int adapter_test (struct slgt_info *info); -static void reset_adapter (struct slgt_info *info);static void reset_port (struct slgt_info *info);static void async_mode (struct slgt_info *info);static void sync_mode (struct slgt_info *info);
@@ -457,14 +427,12 @@ static void rx_stop(struct slgt_info *info);static void rx_start (struct slgt_info *info);static void reset_rbufs (struct slgt_info *info);static void free_rbufs (struct slgt_info *info,unsigned int first,unsigned int last); -static void rdma_reset (struct slgt_info *info);static bool rx_get_frame (struct slgt_info *info);static bool rx_get_buf (struct slgt_info *info);static void tx_start (struct slgt_info *info);static void tx_stop (struct slgt_info *info);static void tx_set_idle (struct slgt_info *info); -static unsigned int free_tbuf_count (struct slgt_info *info);static unsigned int tbuf_bytes (struct slgt_info *info);static void reset_tbufs (struct slgt_info *info);static void tdma_reset (struct slgt_info *info);
@@ -472,26 +440,10 @@ static bool tx_load(struct slgt_info *info, const char *buf, unsigned int count)static void get_signals (struct slgt_info *info);static void set_signals (struct slgt_info *info); -static void enable_loopback (struct slgt_info *info);static void set_rate (struct slgt_info *info,u32 data_rate); -static int bh_action (struct slgt_info *info); -static void bh_handler (struct work_struct *work);static void bh_transmit (struct slgt_info *info); -static void isr_serial (struct slgt_info *info); -static void isr_rdma (struct slgt_info *info);static void isr_txeom (struct slgt_info *info,unsigned short status); -static void isr_tdma (struct slgt_info *info); - -static int alloc_dma_bufs (struct slgt_info *info); -static void free_dma_bufs (struct slgt_info *info); -static int alloc_desc (struct slgt_info *info); -static void free_desc (struct slgt_info *info); -static int alloc_bufs (struct slgt_info *info,struct slgt_desc *bufs,int count); -static void free_bufs (struct slgt_info *info,struct slgt_desc *bufs,int count); - -static int alloc_tmp_rbuf (struct slgt_info *info); -static void free_tmp_rbuf (struct slgt_info *info);static void tx_timeout (struct timer_list *t);static void rx_timeout (struct timer_list *t);
@@ -509,10 +461,6 @@ static int tx_abort(struct slgt_info *info);static int rx_enable (struct slgt_info *info,int enable);static int modem_input_wait (struct slgt_info *info,int arg);static int wait_mgsl_event (struct slgt_info *info,int __user *mask_ptr); -static int tiocmget (struct tty_struct *tty); -static int tiocmset (struct tty_struct *tty, -unsigned int set,unsigned int clear); -static int set_break (struct tty_struct *tty,int break_state);static int get_interface (struct slgt_info *info,int __user *if_mode);static int set_interface (struct slgt_info *info,int if_mode);static int set_gpio (struct slgt_info *info,struct gpio_desc __user *gpio);
@@ -526,9 +474,6 @@ static int set_xctrl(struct slgt_info *info, int if_mode);/* * driver functions */ -static void add_device (struct slgt_info *info); -static void device_init (int adapter_num,struct pci_dev *pdev); -static int claim_resources (struct slgt_info *info);static void release_resources (struct slgt_info *info);/*
Signature · 1 line
2.30.1
PATCH 40/44 tty: hvc, drop unneeded forward declarations
In reply to Jiri SlabyForward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use.
--- drivers/tty/hvc/hvcs.c | 25 ------------------------- 1 file changed, 25 deletions(-)
drivers/tty/hvc/hvcs.c +0 -25
@@ -290,36 +290,11 @@ static LIST_HEAD(hvcs_structs);static DEFINE_SPINLOCK (hvcs_structs_lock);static DEFINE_MUTEX (hvcs_init_mutex); -static void hvcs_unthrottle (struct tty_struct *tty); -static void hvcs_throttle (struct tty_struct *tty); -static irqreturn_t hvcs_handle_interrupt (int irq,void *dev_instance); - -static int hvcs_write (struct tty_struct *tty, -const unsigned char *buf,int count); -static int hvcs_write_room (struct tty_struct *tty); -static int hvcs_chars_in_buffer (struct tty_struct *tty); - -static int hvcs_has_pi (struct hvcs_struct *hvcsd); -static void hvcs_set_pi (struct hvcs_partner_info *pi, -struct hvcs_struct *hvcsd);static int hvcs_get_pi (struct hvcs_struct *hvcsd);static int hvcs_rescan_devices_list (void ); -static int hvcs_partner_connect (struct hvcs_struct *hvcsd);static void hvcs_partner_free (struct hvcs_struct *hvcsd); -static int hvcs_enable_device (struct hvcs_struct *hvcsd, -uint32_t unit_address,unsigned int irq,struct vio_dev *dev); - -static int hvcs_open (struct tty_struct *tty,struct file *filp); -static void hvcs_close (struct tty_struct *tty,struct file *filp); -static void hvcs_hangup (struct tty_struct * tty); - -static int hvcs_probe (struct vio_dev *dev, -const struct vio_device_id *id); -static int hvcs_remove (struct vio_dev *dev); -static int __init hvcs_module_init (void ); -static void __exit hvcs_module_exit(void);static int hvcs_initialize (void );#define HVCS_SCHED_READ 0x00000001
Signature · 1 line
2.30.1
Re: [PATCH 40/44] tty: hvc, drop unneeded forward declarations
Quoted 7 lines · Jiri Slaby
Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use.
Signed-off-by Jiri Slaby <[email protected]>
Quoted 46 lines
--- drivers/tty/hvc/hvcs.c | 25 ------------------------- 1 file changed, 25 deletions(-)drivers/tty/hvc/hvcs.c +0
-25@@ -290,36 +290,11 @@ static LIST_HEAD(hvcs_structs);static DEFINE_SPINLOCK (hvcs_structs_lock);static DEFINE_MUTEX (hvcs_init_mutex); -static void hvcs_unthrottle (struct tty_struct *tty); -static void hvcs_throttle (struct tty_struct *tty); -static irqreturn_t hvcs_handle_interrupt (int irq,void *dev_instance); - -static int hvcs_write (struct tty_struct *tty, -const unsigned char *buf,int count); -static int hvcs_write_room (struct tty_struct *tty); -static int hvcs_chars_in_buffer (struct tty_struct *tty); - -static int hvcs_has_pi (struct hvcs_struct *hvcsd); -static void hvcs_set_pi (struct hvcs_partner_info *pi, -struct hvcs_struct *hvcsd);static int hvcs_get_pi (struct hvcs_struct *hvcsd);static int hvcs_rescan_devices_list (void ); -static int hvcs_partner_connect (struct hvcs_struct *hvcsd);static void hvcs_partner_free (struct hvcs_struct *hvcsd); -static int hvcs_enable_device (struct hvcs_struct *hvcsd, -uint32_t unit_address,unsigned int irq,struct vio_dev *dev); - -static int hvcs_open (struct tty_struct *tty,struct file *filp); -static void hvcs_close (struct tty_struct *tty,struct file *filp); -static void hvcs_hangup (struct tty_struct * tty); - -static int hvcs_probe (struct vio_dev *dev, -const struct vio_device_id *id); -static int hvcs_remove (struct vio_dev *dev); -static int __init hvcs_module_init (void ); -static void __exit hvcs_module_exit(void);static int hvcs_initialize (void );#define HVCS_SCHED_READ 0x00000001
Re: [PATCH 40/44] tty: hvc, drop unneeded forward declarations
In reply to Jiri SlabyHello Jiri,
Quoted 9 lines · Jiri Slaby
Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use.
Signed-off-by Jiri Slaby <[email protected]>--- drivers/tty/hvc/hvcs.c | 25 -------------------------
note this conflicts with commit 386a966f5ce71a0364b158c5d0a6971f4e418ea8 that currently sits in the powerpc tree. I think it's easy to resolve.
Other than that:
Best regards
Uwe
Quoted 47 lines
1 file changed, 25 deletions(-)drivers/tty/hvc/hvcs.c +0
-25@@ -290,36 +290,11 @@ static LIST_HEAD(hvcs_structs);static DEFINE_SPINLOCK (hvcs_structs_lock);static DEFINE_MUTEX (hvcs_init_mutex); -static void hvcs_unthrottle (struct tty_struct *tty); -static void hvcs_throttle (struct tty_struct *tty); -static irqreturn_t hvcs_handle_interrupt (int irq,void *dev_instance); - -static int hvcs_write (struct tty_struct *tty, -const unsigned char *buf,int count); -static int hvcs_write_room (struct tty_struct *tty); -static int hvcs_chars_in_buffer (struct tty_struct *tty); - -static int hvcs_has_pi (struct hvcs_struct *hvcsd); -static void hvcs_set_pi (struct hvcs_partner_info *pi, -struct hvcs_struct *hvcsd);static int hvcs_get_pi (struct hvcs_struct *hvcsd);static int hvcs_rescan_devices_list (void ); -static int hvcs_partner_connect (struct hvcs_struct *hvcsd);static void hvcs_partner_free (struct hvcs_struct *hvcsd); -static int hvcs_enable_device (struct hvcs_struct *hvcsd, -uint32_t unit_address,unsigned int irq,struct vio_dev *dev); - -static int hvcs_open (struct tty_struct *tty,struct file *filp); -static void hvcs_close (struct tty_struct *tty,struct file *filp); -static void hvcs_hangup (struct tty_struct * tty); - -static int hvcs_probe (struct vio_dev *dev, -const struct vio_device_id *id); -static int hvcs_remove (struct vio_dev *dev); -static int __init hvcs_module_init (void ); -static void __exit hvcs_module_exit(void);static int hvcs_initialize (void );#define HVCS_SCHED_READ 0x00000001Signature · 1 line
2.30.1
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
PATCH 41/44 tty: n_gsm, remove duplicates of parameters
In reply to Jiri Slabydp, f, and i are only duplicates of gsmld_receive_buf's parameters. Use the parameters directly (cp, fp, and count) and delete these local variables.
--- drivers/tty/n_gsm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/tty/n_gsm.c +5 -8
@@ -2416,27 +2416,24 @@ static void gsmld_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {struct gsm_mux *gsm = tty->disc_data; -const unsigned char *dp; -char *f; -int i;char flags =TTY_NORMAL ;if (debug &4 )print_hex_dump_bytes ("gsmld_receive: " ,DUMP_PREFIX_OFFSET , cp, count); -for (i = count, dp = cp, f = fp; i; i--, dp++) { -if (f) - flags = *f++; +for (; count; count--, cp++) { +if (fp) + flags = *fp++;switch (flags) {case TTY_NORMAL : - gsm->receive (gsm, *dp); + gsm->receive (gsm, *cp);break ;case TTY_OVERRUN :case TTY_BREAK :case TTY_PARITY :case TTY_FRAME : -gsm_error (gsm, *dp, flags); +gsm_error (gsm, *cp, flags);break ;default : WARN_ONCE(1, "%s: unknown flag %d\n",
Signature · 1 line
2.30.1
PATCH 42/44 tty: cleanup tty_chars_in_buffer
In reply to Jiri SlabyThere is no need for 'else' when the 'if' part already returned. This makes tty_chars_in_buffer similar to tty_write_room too.
--- drivers/tty/tty_ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/tty_ioctl.c +1 -2
@@ -57,8 +57,7 @@ int tty_chars_in_buffer(struct tty_struct *tty) {if (tty->ops->chars_in_buffer)return tty->ops->chars_in_buffer (tty); -else -return 0 ; +return 0 ; }EXPORT_SYMBOL (tty_chars_in_buffer);
Signature · 1 line
2.30.1
PATCH 43/44 tty: make everyone's chars_in_buffer return >= 0
In reply to Jiri SlabyThe tty line disciplines don't expect tty_operations::chars_in_buffer to return negative values. Fix the two drivers which violate this.
--- drivers/tty/n_gsm.c | 2 +- drivers/tty/vcc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/tty/n_gsm.c +1 -1
@@ -3056,7 +3056,7 @@ static int gsmtty_chars_in_buffer(struct tty_struct *tty) {struct gsm_dlci *dlci = tty->driver_data;if (dlci->state ==DLCI_CLOSED ) -return -EINVAL ; +return 0 ;return kfifo_len (&dlci->fifo); }
drivers/tty/vcc.c +1 -1
@@ -896,7 +896,7 @@ static int vcc_chars_in_buffer(struct tty_struct *tty) port =vcc_get_ne (tty->index);if (unlikely (!port)) {pr_err ("VCC: chars_in_buffer: Failed to find VCC port\n" ); -return -ENODEV ; +return 0 ; } num = port->chars_in_buffer;
Signature · 1 line
2.30.1
PATCH 44/44 tty: make everyone's write_room return >= 0
In reply to Jiri SlabyThe tty line disciplines don't expect tty_operations::write_room to return negative values. Fix the five drivers which violate this.
--- drivers/staging/gdm724x/gdm_tty.c | 2 +- drivers/tty/ipwireless/tty.c | 4 ++-- drivers/tty/n_gsm.c | 2 +- drivers/tty/vcc.c | 2 +- drivers/usb/serial/mos7720.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/gdm724x/gdm_tty.c +1 -1
@@ -188,7 +188,7 @@ static int gdm_tty_write_room(struct tty_struct *tty)struct gdm *gdm = tty->driver_data;if (!GDM_TTY_READY (gdm)) -return -ENODEV ; +return 0 ;return WRITE_SIZE ; }
drivers/tty/ipwireless/tty.c +2 -2
@@ -235,10 +235,10 @@ static int ipw_write_room(struct tty_struct *linux_tty)/* FIXME: Exactly how is the tty object locked here .. */ if (!tty) -return -ENODEV ; +return 0 ;if (!tty->port.count) -return -EINVAL ; +return 0 ; room =IPWIRELESS_TX_QUEUE_SIZE - tty->tx_bytes_queued;if (room <0 )
drivers/tty/n_gsm.c +1 -1
@@ -3048,7 +3048,7 @@ static int gsmtty_write_room(struct tty_struct *tty) {struct gsm_dlci *dlci = tty->driver_data;if (dlci->state ==DLCI_CLOSED ) -return -EINVAL ; +return 0 ;return TX_SIZE -kfifo_len (&dlci->fifo); }
drivers/tty/vcc.c +1 -1
@@ -878,7 +878,7 @@ static int vcc_write_room(struct tty_struct *tty) port =vcc_get_ne (tty->index);if (unlikely (!port)) {pr_err ("VCC: write_room: Failed to find VCC port\n" ); -return -ENODEV ; +return 0 ; } num =VCC_BUFF_LEN - port->chars_in_buffer;
drivers/usb/serial/mos7720.c +1 -1
@@ -1042,7 +1042,7 @@ static int mos7720_write_room(struct tty_struct *tty) mos7720_port =usb_get_serial_port_data (port);if (mos7720_port ==NULL ) -return -ENODEV ; +return 0 ;/* FIXME: Locking */ for (i =0 ; i <NUM_URBS ; ++i) {
Signature · 1 line
2.30.1
Johan Hovold
maintainerRe: [PATCH 44/44] tty: make everyone's write_room return >= 0
Quoted 17 lines · Jiri Slaby
The tty line disciplines don't expect
tty_operations::write_roomto return negative values. Fix the five drivers which violate this.Signed-off-by Jiri Slaby <[email protected]>--- drivers/staging/gdm724x/gdm_tty.c | 2 +- drivers/tty/ipwireless/tty.c | 4 ++-- drivers/tty/n_gsm.c | 2 +- drivers/tty/vcc.c | 2 +- drivers/usb/serial/mos7720.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)drivers/usb/serial/mos7720.c +0
-0
drivers/usb/serial/mos7720.c static int mos7720_write_room(struct tty_struct *tty) · line 1045
Quoted 5 lines
drivers/usb/serial/mos7720.c +1
-1@@ -1042,7 +1042,7 @@ static int mos7720_write_room(struct tty_struct *tty) mos7720_port =usb_get_serial_port_data (port);if (mos7720_port ==NULL ) -return -ENODEV ; +return 0 ;
This test is bogus and could just be removed, but that's for another patch.
drivers/usb/serial/mos7720.c static int mos7720_write_room(struct tty_struct *tty) · line 1048
Quoted 3 lines
drivers/usb/serial/mos7720.c +0
-0/* FIXME: Locking */ for (i =0 ; i <NUM_URBS ; ++i) {
Johan
Greg KH
maintainerQuoted 9 lines · Jiri Slaby
I cannot maintain this driver for years due to missing HW. Let's orphan the entry in
MAINTAINERS. And likely drop the driver later as these devices are likely gone from this world. Mxser provides different (out-of-tree) drivers for their current devices.Signed-off-by Jiri Slaby <[email protected]>--- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks for the series, and dropping the abandonded drivers. All now queued up except for the 2 usb-serial driver cleanups.
thanks,
greg k-h