TTY/serial driver patches for .39
Subsystems (33)
PATCH 1/1 TTY/serial driver patches for .39
Here's the big tty/serial merge for .39
Lots of file movements, as we are depreciating a number of broken and obsolete serial drivers that haven't been used in years by moving them to the staging directory. If no one speaks up in the next 6 months they will be removed then.
Other than that, nothing major, some new drivers and some tty api changes to try to make the api a bit more sane (removing the file handle from the ioctl calls). A new tty core ioctl was added to make console controller lives easier as well.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/ tty-next
All of these patches have been in the -mm and -next trees for a number of weeks.
Patches will be sent to the linux-serial mailing list, if anyone wants to see them.
thanks,
greg k-h
------------
Documentation/serial/n_gsm.txt | 89 +
MAINTAINERS | 16 +-
arch/alpha/include/asm/ioctls.h | 1 +
arch/ia64/hp/sim/simserial.c | 3 +-
arch/m68k/Kconfig | 8 -
arch/mips/include/asm/ioctls.h | 1 +
arch/parisc/include/asm/ioctls.h | 1 +
arch/powerpc/include/asm/ioctls.h | 1 +
arch/sh/include/asm/ioctls.h | 1 +
arch/sparc/include/asm/ioctls.h | 1 +
arch/xtensa/include/asm/ioctls.h | 1 +
drivers/bluetooth/hci_ath.c | 26 +-
drivers/char/Kconfig | 540 +------
drivers/char/Makefile | 24 -
drivers/char/pcmcia/Makefile | 2 -
drivers/char/pcmcia/synclink_cs.c | 13 +-
drivers/char/ttyprintk.c | 2 +-
drivers/isdn/capi/capi.c | 10 +-
drivers/isdn/gigaset/interface.c | 12 +-
drivers/isdn/gigaset/ser-gigaset.c | 2 +-
drivers/isdn/i4l/isdn_tty.c | 7 +-
drivers/misc/Kconfig | 7 +-
drivers/misc/pch_phub.c | 85 +-
drivers/mmc/card/sdio_uart.c | 4 +-
drivers/net/irda/irtty-sir.c | 2 +-
drivers/net/usb/hso.c | 10 +-
drivers/net/wan/pc300_tty.c | 9 +-
drivers/s390/char/keyboard.c | 4 +-
drivers/s390/char/keyboard.h | 2 +-
drivers/s390/char/tty3270.c | 14 +-
drivers/staging/Kconfig | 4 +
drivers/staging/Makefile | 2 +
drivers/staging/generic_serial/Kconfig | 45 +
drivers/staging/generic_serial/Makefile | 6 +
drivers/staging/generic_serial/TODO | 6 +
.../generic_serial}/generic_serial.c | 4 +-
.../{char => staging/generic_serial}/rio/Makefile | 0
.../{char => staging/generic_serial}/rio/board.h | 0
.../{char => staging/generic_serial}/rio/cirrus.h | 0
.../{char => staging/generic_serial}/rio/cmdblk.h | 0
.../{char => staging/generic_serial}/rio/cmdpkt.h | 0
.../{char => staging/generic_serial}/rio/daemon.h | 0
.../{char => staging/generic_serial}/rio/errors.h | 0
.../{char => staging/generic_serial}/rio/func.h | 0
.../{char => staging/generic_serial}/rio/host.h | 0
.../{char => staging/generic_serial}/rio/link.h | 0
.../generic_serial}/rio/linux_compat.h | 0
drivers/{char => staging/generic_serial}/rio/map.h | 0
.../{char => staging/generic_serial}/rio/param.h | 0
.../{char => staging/generic_serial}/rio/parmmap.h | 0
drivers/{char => staging/generic_serial}/rio/pci.h | 0
drivers/{char => staging/generic_serial}/rio/phb.h | 0
drivers/{char => staging/generic_serial}/rio/pkt.h | 0
.../{char => staging/generic_serial}/rio/port.h | 0
.../{char => staging/generic_serial}/rio/protsts.h | 0
drivers/{char => staging/generic_serial}/rio/rio.h | 0
.../generic_serial}/rio/rio_linux.c | 0
.../generic_serial}/rio/rio_linux.h | 0
.../generic_serial}/rio/rioboard.h | 0
.../{char => staging/generic_serial}/rio/rioboot.c | 0
.../{char => staging/generic_serial}/rio/riocmd.c | 0
.../{char => staging/generic_serial}/rio/rioctrl.c | 0
.../{char => staging/generic_serial}/rio/riodrvr.h | 0
.../{char => staging/generic_serial}/rio/rioinfo.h | 0
.../{char => staging/generic_serial}/rio/rioinit.c | 0
.../{char => staging/generic_serial}/rio/riointr.c | 0
.../generic_serial}/rio/rioioctl.h | 0
.../generic_serial}/rio/rioparam.c | 0
.../generic_serial}/rio/rioroute.c | 0
.../generic_serial}/rio/riospace.h | 0
.../generic_serial}/rio/riotable.c | 0
.../{char => staging/generic_serial}/rio/riotty.c | 0
.../{char => staging/generic_serial}/rio/route.h | 0
drivers/{char => staging/generic_serial}/rio/rup.h | 0
.../{char => staging/generic_serial}/rio/unixrup.h | 0
.../{char => staging/generic_serial}/ser_a2232.c | 6 +-
.../{char => staging/generic_serial}/ser_a2232.h | 0
.../generic_serial}/ser_a2232fw.ax | 0
.../{char => staging/generic_serial}/ser_a2232fw.h | 0
drivers/{char => staging/generic_serial}/sx.c | 8 +-
drivers/{char => staging/generic_serial}/sx.h | 0
.../{char => staging/generic_serial}/sxboards.h | 0
.../{char => staging/generic_serial}/sxwindow.h | 0
drivers/{char => staging/generic_serial}/vme_scc.c | 4 +-
drivers/staging/quatech_usb2/quatech_usb2.c | 6 +-
drivers/staging/serqt_usb2/serqt_usb2.c | 13 +-
drivers/staging/tty/Kconfig | 87 +
drivers/staging/tty/Makefile | 7 +
drivers/staging/tty/TODO | 6 +
drivers/{char => staging/tty}/cd1865.h | 0
drivers/{char => staging/tty}/digi1.h | 0
drivers/{char => staging/tty}/digiFep1.h | 0
drivers/{char => staging/tty}/digiPCI.h | 0
drivers/{char => staging/tty}/epca.c | 16 +-
drivers/{char => staging/tty}/epca.h | 0
drivers/{char => staging/tty}/epcaconfig.h | 0
drivers/{char => staging/tty}/ip2/Makefile | 0
drivers/{char => staging/tty}/ip2/i2cmd.c | 0
drivers/{char => staging/tty}/ip2/i2cmd.h | 0
drivers/{char => staging/tty}/ip2/i2ellis.c | 0
drivers/{char => staging/tty}/ip2/i2ellis.h | 0
drivers/{char => staging/tty}/ip2/i2hw.h | 0
drivers/{char => staging/tty}/ip2/i2lib.c | 0
drivers/{char => staging/tty}/ip2/i2lib.h | 0
drivers/{char => staging/tty}/ip2/i2pack.h | 0
drivers/{char => staging/tty}/ip2/ip2.h | 0
drivers/{char => staging/tty}/ip2/ip2ioctl.h | 0
drivers/{char => staging/tty}/ip2/ip2main.c | 12 +-
drivers/{char => staging/tty}/ip2/ip2trace.h | 0
drivers/{char => staging/tty}/ip2/ip2types.h | 0
drivers/{char => staging/tty}/istallion.c | 8 +-
drivers/{char => staging/tty}/riscom8.c | 8 +-
drivers/{char => staging/tty}/riscom8.h | 0
drivers/{char => staging/tty}/riscom8_reg.h | 0
drivers/{char => staging/tty}/serial167.c | 7 +-
drivers/{char => staging/tty}/specialix.c | 6 +-
drivers/{char => staging/tty}/specialix_io8.h | 0
drivers/{char => staging/tty}/stallion.c | 9 +-
drivers/tty/Kconfig | 321 ++++
drivers/tty/Makefile | 15 +
drivers/{char => tty}/amiserial.c | 8 +-
drivers/{char => tty}/bfin_jtag_comm.c | 0
drivers/{char => tty}/cyclades.c | 6 +-
drivers/tty/hvc/Kconfig | 105 ++
drivers/tty/hvc/Makefile | 1 +
drivers/tty/hvc/hvc_bfin_jtag.c | 105 ++
drivers/tty/hvc/hvc_dcc.c | 43 +-
drivers/tty/hvc/hvsi.c | 6 +-
drivers/{char/pcmcia => tty}/ipwireless/Makefile | 0
drivers/{char/pcmcia => tty}/ipwireless/hardware.c | 0
drivers/{char/pcmcia => tty}/ipwireless/hardware.h | 0
drivers/{char/pcmcia => tty}/ipwireless/main.c | 0
drivers/{char/pcmcia => tty}/ipwireless/main.h | 0
drivers/{char/pcmcia => tty}/ipwireless/network.c | 0
drivers/{char/pcmcia => tty}/ipwireless/network.h | 0
.../pcmcia => tty}/ipwireless/setup_protocol.h | 0
drivers/{char/pcmcia => tty}/ipwireless/tty.c | 8 +-
drivers/{char/pcmcia => tty}/ipwireless/tty.h | 0
drivers/{char => tty}/isicom.c | 8 +-
drivers/{char => tty}/moxa.c | 10 +-
drivers/{char => tty}/moxa.h | 0
drivers/{char => tty}/mxser.c | 6 +-
drivers/{char => tty}/mxser.h | 0
drivers/tty/n_gsm.c | 9 +-
drivers/{char => tty}/nozomi.c | 10 +-
drivers/tty/pty.c | 4 +-
drivers/{char => tty}/rocket.c | 8 +-
drivers/{char => tty}/rocket.h | 0
drivers/{char => tty}/rocket_int.h | 0
drivers/tty/serial/68328serial.c | 25 +-
drivers/tty/serial/68328serial.h | 1 -
drivers/tty/serial/68360serial.c | 6 +-
drivers/tty/serial/8250.c | 33 +-
drivers/tty/serial/Kconfig | 31 +-
drivers/tty/serial/Makefile | 2 +
drivers/tty/serial/altera_jtaguart.c | 85 +-
drivers/tty/serial/altera_uart.c | 22 +-
drivers/tty/serial/atmel_serial.c | 16 +
drivers/tty/serial/bfin_sport_uart.c | 2 +-
drivers/tty/serial/crisv10.c | 7 +-
drivers/tty/serial/ifx6x60.c | 68 +-
drivers/tty/serial/ifx6x60.h | 6 +-
drivers/tty/serial/mfd.c | 73 +-
drivers/tty/serial/mrst_max3110.c | 2 +-
drivers/tty/serial/msm_serial_hs.c | 1880 ++++++++++++++++++++
drivers/tty/serial/msm_smd_tty.c | 236 +++
drivers/tty/serial/of_serial.c | 18 +-
drivers/tty/serial/omap-serial.c | 11 +-
drivers/tty/serial/pch_uart.c | 329 +++-
drivers/tty/serial/serial_core.c | 22 +-
drivers/{char => tty}/synclink.c | 13 +-
drivers/{char => tty}/synclink_gt.c | 19 +-
drivers/{char => tty}/synclinkmp.c | 17 +-
drivers/tty/tty_audit.c | 4 +-
drivers/tty/tty_io.c | 22 +-
drivers/tty/tty_ioctl.c | 14 +-
drivers/tty/tty_ldisc.c | 17 +-
drivers/tty/vt/keyboard.c | 5 +-
drivers/tty/vt/vc_screen.c | 110 +-
drivers/tty/vt/vt.c | 27 +-
drivers/tty/vt/vt_ioctl.c | 12 +-
drivers/usb/class/cdc-acm.c | 6 +-
drivers/usb/serial/ark3116.c | 6 +-
drivers/usb/serial/belkin_sa.c | 8 +-
drivers/usb/serial/ch341.c | 7 +-
drivers/usb/serial/cp210x.c | 19 +-
drivers/usb/serial/cypress_m8.c | 12 +-
drivers/usb/serial/digi_acceleport.c | 14 +-
drivers/usb/serial/ftdi_sio.c | 12 +-
drivers/usb/serial/io_edgeport.c | 12 +-
drivers/usb/serial/io_ti.c | 6 +-
drivers/usb/serial/iuu_phoenix.c | 4 +-
drivers/usb/serial/keyspan.c | 4 +-
drivers/usb/serial/keyspan.h | 5 +-
drivers/usb/serial/keyspan_pda.c | 4 +-
drivers/usb/serial/kl5kusb105.c | 8 +-
drivers/usb/serial/kobil_sct.c | 12 +-
drivers/usb/serial/mct_u232.c | 8 +-
drivers/usb/serial/mos7720.c | 8 +-
drivers/usb/serial/mos7840.c | 6 +-
drivers/usb/serial/opticon.c | 4 +-
drivers/usb/serial/oti6858.c | 12 +-
drivers/usb/serial/pl2303.c | 6 +-
drivers/usb/serial/sierra.c | 4 +-
drivers/usb/serial/spcp8x5.c | 6 +-
drivers/usb/serial/ssu100.c | 6 +-
drivers/usb/serial/ti_usb_3410_5052.c | 14 +-
drivers/usb/serial/usb-serial.c | 12 +-
drivers/usb/serial/usb-wwan.h | 6 +-
drivers/usb/serial/usb_wwan.c | 6 +-
drivers/usb/serial/whiteheat.c | 12 +-
include/asm-generic/ioctls.h | 1 +
include/linux/kbd_kern.h | 3 +-
include/linux/kd.h | 1 +
include/linux/platform_data/msm_serial_hs.h | 49 +
include/linux/spi/ifx_modem.h | 19 +-
include/linux/tty.h | 5 +-
include/linux/tty_driver.h | 13 +-
include/linux/usb/serial.h | 6 +-
include/linux/vt_kern.h | 8 -
include/net/irda/ircomm_tty.h | 6 +-
net/bluetooth/rfcomm/tty.c | 6 +-
net/irda/ircomm/ircomm_tty_ioctl.c | 12 +-
223 files changed, 3974 insertions(+), 1380 deletions(-)
create mode 100644 Documentation/serial/n_gsm.txt
create mode 100644 drivers/staging/generic_serial/Kconfig
create mode 100644 drivers/staging/generic_serial/Makefile
create mode 100644 drivers/staging/generic_serial/TODO
rename drivers/{char => staging/generic_serial}/generic_serial.c (99%)
rename drivers/{char => staging/generic_serial}/rio/Makefile (100%)
rename drivers/{char => staging/generic_serial}/rio/board.h (100%)
rename drivers/{char => staging/generic_serial}/rio/cirrus.h (100%)
rename drivers/{char => staging/generic_serial}/rio/cmdblk.h (100%)
rename drivers/{char => staging/generic_serial}/rio/cmdpkt.h (100%)
rename drivers/{char => staging/generic_serial}/rio/daemon.h (100%)
rename drivers/{char => staging/generic_serial}/rio/errors.h (100%)
rename drivers/{char => staging/generic_serial}/rio/func.h (100%)
rename drivers/{char => staging/generic_serial}/rio/host.h (100%)
rename drivers/{char => staging/generic_serial}/rio/link.h (100%)
rename drivers/{char => staging/generic_serial}/rio/linux_compat.h (100%)
rename drivers/{char => staging/generic_serial}/rio/map.h (100%)
rename drivers/{char => staging/generic_serial}/rio/param.h (100%)
rename drivers/{char => staging/generic_serial}/rio/parmmap.h (100%)
rename drivers/{char => staging/generic_serial}/rio/pci.h (100%)
rename drivers/{char => staging/generic_serial}/rio/phb.h (100%)
rename drivers/{char => staging/generic_serial}/rio/pkt.h (100%)
rename drivers/{char => staging/generic_serial}/rio/port.h (100%)
rename drivers/{char => staging/generic_serial}/rio/protsts.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rio.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rio_linux.c (100%)
rename drivers/{char => staging/generic_serial}/rio/rio_linux.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioboard.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioboot.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riocmd.c (100%)
rename drivers/{char => staging/generic_serial}/rio/rioctrl.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riodrvr.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioinfo.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioinit.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riointr.c (100%)
rename drivers/{char => staging/generic_serial}/rio/rioioctl.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioparam.c (100%)
rename drivers/{char => staging/generic_serial}/rio/rioroute.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riospace.h (100%)
rename drivers/{char => staging/generic_serial}/rio/riotable.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riotty.c (100%)
rename drivers/{char => staging/generic_serial}/rio/route.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rup.h (100%)
rename drivers/{char => staging/generic_serial}/rio/unixrup.h (100%)
rename drivers/{char => staging/generic_serial}/ser_a2232.c (99%)
rename drivers/{char => staging/generic_serial}/ser_a2232.h (100%)
rename drivers/{char => staging/generic_serial}/ser_a2232fw.ax (100%)
rename drivers/{char => staging/generic_serial}/ser_a2232fw.h (100%)
rename drivers/{char => staging/generic_serial}/sx.c (99%)
rename drivers/{char => staging/generic_serial}/sx.h (100%)
rename drivers/{char => staging/generic_serial}/sxboards.h (100%)
rename drivers/{char => staging/generic_serial}/sxwindow.h (100%)
rename drivers/{char => staging/generic_serial}/vme_scc.c (99%)
create mode 100644 drivers/staging/tty/Kconfig
create mode 100644 drivers/staging/tty/Makefile
create mode 100644 drivers/staging/tty/TODO
rename drivers/{char => staging/tty}/cd1865.h (100%)
rename drivers/{char => staging/tty}/digi1.h (100%)
rename drivers/{char => staging/tty}/digiFep1.h (100%)
rename drivers/{char => staging/tty}/digiPCI.h (100%)
rename drivers/{char => staging/tty}/epca.c (99%)
rename drivers/{char => staging/tty}/epca.h (100%)
rename drivers/{char => staging/tty}/epcaconfig.h (100%)
rename drivers/{char => staging/tty}/ip2/Makefile (100%)
rename drivers/{char => staging/tty}/ip2/i2cmd.c (100%)
rename drivers/{char => staging/tty}/ip2/i2cmd.h (100%)
rename drivers/{char => staging/tty}/ip2/i2ellis.c (100%)
rename drivers/{char => staging/tty}/ip2/i2ellis.h (100%)
rename drivers/{char => staging/tty}/ip2/i2hw.h (100%)
rename drivers/{char => staging/tty}/ip2/i2lib.c (100%)
rename drivers/{char => staging/tty}/ip2/i2lib.h (100%)
rename drivers/{char => staging/tty}/ip2/i2pack.h (100%)
rename drivers/{char => staging/tty}/ip2/ip2.h (100%)
rename drivers/{char => staging/tty}/ip2/ip2ioctl.h (100%)
rename drivers/{char => staging/tty}/ip2/ip2main.c (99%)
rename drivers/{char => staging/tty}/ip2/ip2trace.h (100%)
rename drivers/{char => staging/tty}/ip2/ip2types.h (100%)
rename drivers/{char => staging/tty}/istallion.c (99%)
rename drivers/{char => staging/tty}/riscom8.c (99%)
rename drivers/{char => staging/tty}/riscom8.h (100%)
rename drivers/{char => staging/tty}/riscom8_reg.h (100%)
rename drivers/{char => staging/tty}/serial167.c (99%)
rename drivers/{char => staging/tty}/specialix.c (99%)
rename drivers/{char => staging/tty}/specialix_io8.h (100%)
rename drivers/{char => staging/tty}/stallion.c (99%)
create mode 100644 drivers/tty/Kconfig
rename drivers/{char => tty}/amiserial.c (99%)
rename drivers/{char => tty}/bfin_jtag_comm.c (100%)
rename drivers/{char => tty}/cyclades.c (99%)
create mode 100644 drivers/tty/hvc/Kconfig
create mode 100644 drivers/tty/hvc/hvc_bfin_jtag.c
rename drivers/{char/pcmcia => tty}/ipwireless/Makefile (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/hardware.c (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/hardware.h (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/main.c (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/main.h (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/network.c (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/network.h (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/setup_protocol.h (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/tty.c (98%)
rename drivers/{char/pcmcia => tty}/ipwireless/tty.h (100%)
rename drivers/{char => tty}/isicom.c (99%)
rename drivers/{char => tty}/moxa.c (99%)
rename drivers/{char => tty}/moxa.h (100%)
rename drivers/{char => tty}/mxser.c (99%)
rename drivers/{char => tty}/mxser.h (100%)
rename drivers/{char => tty}/nozomi.c (99%)
rename drivers/{char => tty}/rocket.c (99%)
rename drivers/{char => tty}/rocket.h (100%)
rename drivers/{char => tty}/rocket_int.h (100%)
create mode 100644 drivers/tty/serial/msm_serial_hs.c
create mode 100644 drivers/tty/serial/msm_smd_tty.c
rename drivers/{char => tty}/synclink.c (99%)
rename drivers/{char => tty}/synclink_gt.c (99%)
rename drivers/{char => tty}/synclinkmp.c (99%)
create mode 100644 include/linux/platform_data/msm_serial_hs.h---------------
Alan Cox (6):
tiocmget: kill off the passing of the struct file
tiocmset: kill the file pointer argument
tty: remove filp from the USB tty ioctls
tty: now phase out the ioctl file pointer for good
tty: add a helper for setting termios data from kernel side
hci_ath: Fix the mess in this driver
Arnd Bergmann (1):
tty: move cd1865.h to drivers/staging/tty/
Arthur Taylor (1):
vt: Add virtual console keyboard mode OFF
Axel Lin (1):
pcmcia: synclink_cs: fix prototype for mgslpc_ioctl()
Dan Carpenter (2):
serial: mrst_max3110: make buffer larger
Staging: generic_serial: fix double locking bug
Denis Turischev (1):
pch_uart: reference clock on CM-iTC
Eric Bénard (2):
n_gsm: add a documentation
n_gsm: fix UIH control byte : P bit should be 0
Feng Tang (3):
serial: mfd: remove the timeout workaround for A0
serial: mfd: remove the TX full-empty interrupts workaround
serial: mfd: add a module parameter for setting each port's working mode
Grant Likely (1):
tty/serial: Relax the device_type restriction from of_serial
Greg Kroah-Hartman (8):
tty: fix build error in vt_ioctl.c if CONFIG_COMPAT is enabled
tty: move Kconfig entries into drivers/tty from drivers/char
tty: move a number of tty drivers from drivers/char/ to drivers/tty/
tty: move ipwireless driver from drivers/char/pcmcia/ to drivers/tty/
tty: move obsolete and broken tty drivers to drivers/staging/tty/
tty: move obsolete and broken generic_serial drivers to drivers/staging/generic_serial/
tty: forgot to remove ipwireless from drivers/char/pcmcia/Makefile
Staging: tty: fix build with epca.c driver
Heiko Carstens (1):
tty: phase out of ioctl file pointer for tty3270 as well
Jarkko Nikula (1):
serial: omap-serial: Enable the UART wake-up bits always
Jiri Olsa (3):
tty,vcs: lseek/VC-release race fix
tty,vcs removing con_buf/conf_buf_mtx
tty,vt: fix VT_SETACTIVATE console switch
Joe Perches (1):
MAINTAINERS: Update HVC file patterns
Kay Sievers (1):
tty: add TIOCVHANGUP to allow clean tty shutdown of all ttys
Mandeep Singh Baines (1):
TTY: use appropriate printk priority level
Mayank Rana (1):
serial: msm_serial_hs: Add MSM high speed UART driver
Mike Frysinger (1):
hvc: add Blackfin JTAG console support
Niranjana Vishwanathapura (1):
tty: Add msm_smd_tty driver
Russ Gorby (7):
serial: ifx6x60: expanded info available from platform data
serial: ifx6x60: fixed call to tty_port_init
serial: ifx6x60: dma_alloc_coherent must use parent dev
serial: ifx6x60: changed internal bpw from boolean to int
serial: ifx6x60: set SPI max_speed_hz based on platform type
serial: ifx6x60: probe routine needs to call spi_setup
serial: ifx6x60: minor cleanup
Stephen Boyd (3):
hvc_dcc: Fix bad code generation by marking assembly volatile
hvc_dcc: Simplify put_chars()/get_chars() loops
hvc_dcc: Simplify assembly for v6 and v7 ARM
Tejun Heo (3):
tty_ldisc: don't use flush_scheduled_work() 68328serial: remove unsed m68k_serial->tqueue_hangup
nozomi: don't use flush_scheduled_work()
Thomas Weber (1):
OMAP: Enable Magic SysRq on serial console ttyOx
Tobias Klauser (7):
tty: serial: altera_uart: Handle pdev->id == -1 in altera_uart_remove
tty: serial: altera_uart: Use port->regshift to store bus shift
MAINTAINERS: Add myself as a maintainer for altera_uart/altera_jtaguart
tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
tty: serial: altera_jtaguart: Remove unused function early_altera_jtaguart_setup
tty: serial: altera_jtaguart: Support getting mapbase and IRQ from resources
tty: serial: altera_jtaguart: Fixup type usage of port flags
Tomoya MORINAGA (11):
serial: pch_uart: support new device ML7213
serial: pch_uart: revert Kconfig for non-DMA mode
pch_uart: add multi-scatter processing
pch_uart: add spin_lock_init
pch_uart : Reduce memcpy
pch_uart : Use dev_xxx not pr_xxx
pch_uart: fix uart clock setting issue
pch_uart: fix auto flow control miss-setting issue
pch_uart: fix exclusive access issue
pch_uart: Fix DMA channel miss-setting issue.
pch_phub: add new device ML7213
Tony Luck (1):
tty: simserial: now phase out the ioctl file pointer for good
Vasiliy Kulikov (1):
tty: serial: bfin_sport_uart: fix signedness error
Viktar Palstsiuk (1):
atmel_serial: enable PPS support
Xiaotian Feng (1):
tty_audit: fix tty_audit_add_data live lock on audit disabled
Yin Kangkai (3):
serial-core: reset the console speed on resume
serial: also set the uartclk value in resume after goes to highspeed
serial: change the divisor latch only when prescalar actually changed
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/76 tty: serial: bfin_sport_uart: fix signedness error
From: Vasiliy Kulikov <[email protected]>
sport->port.irq is unsigned, check for <0 doesn't make sense. Explicitly cast it to int to check for error.
--- drivers/tty/serial/bfin_sport_uart.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/serial/bfin_sport_uart.c +1 -1
@@ -788,7 +788,7 @@ static int __devinit sport_uart_probe(struct platform_device *pdev) sport->port.mapbase = res->start; sport->port.irq =platform_get_irq (pdev,0 ); -if (sport->port.irq <0 ) { +if ((int )sport->port.irq <0 ) {dev_err (&pdev->dev,"No sport RX/TX IRQ specified\n" ); ret = -ENOENT ; goto out_error_unmap;
Signature · 1 line
1.7.4.1
PATCH 2/76 serial: mfd: remove the timeout workaround for A0
From: Feng Tang <[email protected]>
This is kind of a revert for commit 669b7a0938e "hsu: add a periodic timer to check dma rx channel", which is a workaround for a bug in A0 stepping silicon, where a dma rx data timeout is missing for some case. Since new silicon has fixed it and the old version is phasing out, no need to carry on it any more.
--- drivers/tty/serial/mfd.c | 38 -------------------------------------- 1 files changed, 0 insertions(+), 38 deletions(-)
drivers/tty/serial/mfd.c +0 -38
@@ -51,8 +51,6 @@#define mfd_readl (obj, offset) readl(obj->reg + offset)#define mfd_writel (obj, offset, val) writel(val, obj->reg + offset) -#define HSU_DMA_TIMEOUT_CHECK_FREQ (HZ/10) -struct hsu_dma_buffer {u8 *buf;dma_addr_t dma_addr;
@@ -65,7 +63,6 @@ struct hsu_dma_chan {enum dma_data_direction dirt;struct uart_hsu_port *uport;void __iomem *reg; -struct timer_list rx_timer;/* only needed by RX channel */ };struct uart_hsu_port {
@@ -355,8 +352,6 @@ void hsu_dma_start_rx_chan(struct hsu_dma_chan *rxc, struct hsu_dma_buffer *dbuf | (0x1 << 24) /* timeout bit, see HSU Errata 1 */ );chan_writel (rxc,HSU_CH_CR ,0x3 ); - -mod_timer (&rxc->rx_timer, jiffies +HSU_DMA_TIMEOUT_CHECK_FREQ ); }/* Protected by spin_lock_irqsave(port->lock) */
@@ -420,7 +415,6 @@ void hsu_dma_rx(struct uart_hsu_port *up, u32 int_sts)chan_writel (chan,HSU_CH_CR ,0x3 );return ; } -del_timer (&chan->rx_timer);dma_sync_single_for_cpu (port->dev, dbuf->dma_addr, dbuf->dma_size,DMA_FROM_DEVICE );
@@ -448,8 +442,6 @@ void hsu_dma_rx(struct uart_hsu_port *up, u32 int_sts)tty_flip_buffer_push (tty);chan_writel (chan,HSU_CH_CR ,0x3 ); - chan->rx_timer.expires = jiffies +HSU_DMA_TIMEOUT_CHECK_FREQ ; -add_timer (&chan->rx_timer); }
@@ -870,8 +862,6 @@ static void serial_hsu_shutdown(struct uart_port *port) container_of(port, struct uart_hsu_port, port);unsigned long flags; -del_timer_sync (&up->rxc->rx_timer); -/* Disable interrupts from this port */ up->ier =0 ;serial_out (up,UART_IER ,0 );
@@ -1343,28 +1333,6 @@ err_disable:return ret; } -static void hsu_dma_rx_timeout (unsigned long data) -{ -struct hsu_dma_chan *chan = (void *)data; -struct uart_hsu_port *up = chan->uport; -struct hsu_dma_buffer *dbuf = &up->rxbuf; -int count =0 ; -unsigned long flags; - -spin_lock_irqsave (&up->port.lock, flags); - - count =chan_readl (chan,HSU_CH_D0SAR ) - dbuf->dma_addr; - -if (!count) { -mod_timer (&chan->rx_timer, jiffies +HSU_DMA_TIMEOUT_CHECK_FREQ ); - goto exit; - } - -hsu_dma_rx (up,0 ); -exit: -spin_unlock_irqrestore (&up->port.lock, flags); -} -static void hsu_global_init (void ) {struct hsu_port *hsu;
@@ -1427,12 +1395,6 @@ static void hsu_global_init(void) dchan->reg = hsu->reg +HSU_DMA_CHANS_REG_OFFSET + i *HSU_DMA_CHANS_REG_LENGTH ; -/* Work around for RX */ -if (dchan->dirt ==DMA_FROM_DEVICE ) { -init_timer (&dchan->rx_timer); - dchan->rx_timer.function = hsu_dma_rx_timeout; - dchan->rx_timer.data = (unsigned long )dchan; - } dchan++; }
Signature · 1 line
1.7.4.1
PATCH 3/76 serial: ifx6x60: expanded info available from platform data
In reply to Greg Kroah-HartmanFrom: Russ Gorby <[email protected]>
Some platform attributes (e.g. max_hz, use_dma) were being intuited from the modem type. These things should be specified by the platform data.
Added max_hz, use_dma to ifx_modem_platform_data definition, replaced is_6160 w/ modem_type, and changed clients accordingly
--- drivers/tty/serial/ifx6x60.c | 33 +++++++++++++++++---------------- drivers/tty/serial/ifx6x60.h | 4 +++- include/linux/spi/ifx_modem.h | 19 ++++++++++++------- 3 files changed, 32 insertions(+), 24 deletions(-)
drivers/tty/serial/ifx6x60.c +17 -16
@@ -8,7 +8,7 @@* Jan Dumon <[email protected]> * * Copyright (C) 2009, 2010 Intel Corp -* Russ Gorby <[email protected]> +* Russ Gorby <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -732,7 +732,7 @@ static void ifx_spi_io(unsigned long data)/* * setup dma pointers */ -if (ifx_dev->is_6160) { +if (ifx_dev->use_dma) { ifx_dev->spi_msg.is_dma_mapped =1 ; ifx_dev->tx_dma = ifx_dev->tx_bus; ifx_dev->rx_dma = ifx_dev->rx_bus;
@@ -960,7 +960,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi) {int ret;int srdy; -struct ifx_modem_platform_data *pl_data =NULL ; +struct ifx_modem_platform_data *pl_data;struct ifx_spi_device *ifx_dev;if (saved_ifx_dev) {
@@ -968,6 +968,12 @@ static int ifx_spi_spi_probe(struct spi_device *spi)return -ENODEV ; } + pl_data = (struct ifx_modem_platform_data *)spi->dev.platform_data; +if (!pl_data) { +dev_err (&spi->dev,"missing platform data!" ); +return -ENODEV ; + } +/* initialize structure to hold our device variables */ ifx_dev =kzalloc (sizeof (struct ifx_spi_device ),GFP_KERNEL );if (!ifx_dev) {
@@ -983,7 +989,9 @@ static int ifx_spi_spi_probe(struct spi_device *spi)init_timer (&ifx_dev->spi_timer); ifx_dev->spi_timer.function = ifx_spi_timeout; ifx_dev->spi_timer.data = (unsigned long )ifx_dev; - ifx_dev->is_6160 = pl_data->is_6160; + ifx_dev->modem = pl_data->modem_type; + ifx_dev->use_dma = pl_data->use_dma; + ifx_dev->max_hz = pl_data->max_hz;/* ensure SPI protocol flags are initialized to enable transfer */ ifx_dev->spi_more =0 ;
@@ -1025,18 +1033,11 @@ static int ifx_spi_spi_probe(struct spi_device *spi) goto error_ret; } - pl_data = (struct ifx_modem_platform_data *)spi->dev.platform_data; -if (pl_data) { - ifx_dev->gpio.reset = pl_data->rst_pmu; - ifx_dev->gpio.po = pl_data->pwr_on; - ifx_dev->gpio.mrdy = pl_data->mrdy; - ifx_dev->gpio.srdy = pl_data->srdy; - ifx_dev->gpio.reset_out = pl_data->rst_out; - }else { -dev_err (&spi->dev,"missing platform data!" ); - ret = -ENODEV ; - goto error_ret; - } + ifx_dev->gpio.reset = pl_data->rst_pmu; + ifx_dev->gpio.po = pl_data->pwr_on; + ifx_dev->gpio.mrdy = pl_data->mrdy; + ifx_dev->gpio.srdy = pl_data->srdy; + ifx_dev->gpio.reset_out = pl_data->rst_out; dev_info(&spi->dev, "gpios %d, %d, %d, %d, %d", ifx_dev->gpio.reset, ifx_dev->gpio.po, ifx_dev->gpio.mrdy,
drivers/tty/serial/ifx6x60.h +3 -1
@@ -88,7 +88,9 @@ struct ifx_spi_device {dma_addr_t rx_dma;dma_addr_t tx_dma; -int is_6160;/* Modem type */ +int modem;/* Modem type */ +int use_dma;/* provide dma-able addrs in SPI msg */ +long max_hz;/* max SPI frequency */ spinlock_t write_lock;int write_pending;
include/linux/spi/ifx_modem.h +12 -7
@@ -2,13 +2,18 @@#define LINUX_IFX_MODEM_H struct ifx_modem_platform_data { -unsigned short rst_out;/* modem reset out */ -unsigned short pwr_on;/* power on */ -unsigned short rst_pmu;/* reset modem */ -unsigned short tx_pwr;/* modem power threshold */ -unsigned short srdy;/* SRDY */ -unsigned short mrdy;/* MRDY */ -unsigned short is_6160;/* Modem type */ +unsigned short rst_out;/* modem reset out */ +unsigned short pwr_on;/* power on */ +unsigned short rst_pmu;/* reset modem */ +unsigned short tx_pwr;/* modem power threshold */ +unsigned short srdy;/* SRDY */ +unsigned short mrdy;/* MRDY */ +unsigned char modem_type;/* Modem type */ +unsigned long max_hz;/* max SPI frequency */ +unsigned short use_dma:1 ;/* spi protocol driver supplies +dma-able addrs */ }; +#define IFX_MODEM_6160 1 +#define IFX_MODEM_6260 2#endif
Signature · 1 line
1.7.4.1
PATCH 4/76 OMAP: Enable Magic SysRq on serial console ttyOx
In reply to Greg Kroah-HartmanFrom: Thomas Weber <[email protected]>
Magic SysRq key is not working for OMAP on new serial console ttyOx because SUPPORT_SYSRQ is not defined for omap-serial.
This patch defines SUPPORT_SYSRQ in omap-serial and enables handling of Magic SysRq character.
Further there is an issue of losing first break character. Removing the reset of the lsr_break_flag fixes this issue.
--- drivers/tty/serial/omap-serial.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/tty/serial/omap-serial.c +4 -1
@@ -20,6 +20,10 @@* this driver as required for the omap-platform. */ +#if defined(CONFIG_SERIAL_OMAP_CONSOLE ) && defined(CONFIG_MAGIC_SYSRQ ) +#define SUPPORT_SYSRQ +#endif +#include <linux/module.h> #include <linux/init.h> #include <linux/console.h>
@@ -190,7 +194,6 @@ static inline void receive_chars(struct uart_omap_port *up, int *status)if (up->port.line == up->port.cons->index) {/* Recover the break flag from console xmit */ lsr |= up->lsr_break_flag; - up->lsr_break_flag =0 ; }#endif if (lsr &UART_LSR_BI )
Signature · 1 line
1.7.4.1
PATCH 5/76 serial: omap-serial: Enable the UART wake-up bits always
In reply to Greg Kroah-HartmanFrom: Jarkko Nikula <[email protected]>
OMAP can do also dynamic idling so wake-up enable register should be set also while system is running. If UART_OMAP_WER is not set, then for instance the RX activity cannot wake up the UART port that is sleeping.
This RX wake-up feature was working when the 8250 driver was used instead of omap-serial. Reason for this is that the 8250 doesn't set the UART_OMAP_WER and then arch/arm/mach-omap2/pm34xx.c ends up saving and restoring the reset default which is the same than value OMAP_UART_WER_MOD_WKUP here.
Fix this by moving the conditional UART_OMAP_WER write from serial_omap_pm into serial_omap_startup where wake-up bits are set unconditionally.
--- drivers/tty/serial/omap-serial.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/tty/serial/omap-serial.c +3 -3
@@ -520,6 +520,9 @@ static int serial_omap_startup(struct uart_port *port) up->ier =UART_IER_RLSI |UART_IER_RDI ;serial_out (up,UART_IER , up->ier); +/* Enable module level wake up */ +serial_out (up,UART_OMAP_WER ,OMAP_UART_WER_MOD_WKUP ); + up->port_activity = jiffies;return 0 ; }
@@ -827,9 +830,6 @@ serial_omap_pm(struct uart_port *port, unsigned int state,serial_out (up,UART_LCR ,UART_LCR_CONF_MODE_B );serial_out (up,UART_EFR , efr);serial_out (up,UART_LCR ,0 ); -/* Enable module level wake up */ -serial_out (up,UART_OMAP_WER , - (state !=0 ) ?OMAP_UART_WER_MOD_WKUP :0 ); }static void serial_omap_release_port (struct uart_port *port)
Signature · 1 line
1.7.4.1
PATCH 6/76 tty_ldisc: don't use flush_scheduled_work()
In reply to Greg Kroah-HartmanFrom: Tejun Heo <[email protected]>
flush_scheduled_work() is scheduled to be deprecated. Explicitly sync flush the used work items instead. Note that before this change, flush_scheduled_work() wouldn't have properly flushed tty->buf.work if it were on timer.
--- drivers/tty/tty_ldisc.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-)
drivers/tty/tty_ldisc.c +15 -2
@@ -535,6 +535,19 @@ static int tty_ldisc_halt(struct tty_struct *tty) }/** +* tty_ldisc_flush_works - flush all works of a tty +* @tty: tty device to flush works for +* +* Sync flush all works belonging to @tty. +*/ +static void tty_ldisc_flush_works (struct tty_struct *tty) +{ +flush_work_sync (&tty->hangup_work); +flush_work_sync (&tty->SAK_work); +flush_delayed_work_sync (&tty->buf.work); +} + +/** * tty_ldisc_wait_idle - wait for the ldisc to become idle * @tty: tty to wait for *
@@ -653,7 +666,7 @@ int tty_set_ldisc(struct tty_struct *tty, int ldisc)mutex_unlock (&tty->ldisc_mutex); -flush_scheduled_work (); +tty_ldisc_flush_works (tty); retval =tty_ldisc_wait_idle (tty);
@@ -905,7 +918,7 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)tty_unlock ();tty_ldisc_halt (tty); -flush_scheduled_work (); +tty_ldisc_flush_works (tty);tty_lock ();mutex_lock (&tty->ldisc_mutex);
Signature · 1 line
1.7.4.1
PATCH 7/76 serial: mrst_max3110: make buffer larger
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
This is used to store the spi_device ->modalias so they have to be the same size. SPI_NAME_SIZE is 32.
--- drivers/tty/serial/mrst_max3110.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/serial/mrst_max3110.c +1 -1
@@ -51,7 +51,7 @@struct uart_max3110 {struct uart_port port;struct spi_device *spi; -char name[24 ]; +char name[SPI_NAME_SIZE ];wait_queue_head_t wq;struct task_struct *main_thread;
Signature · 1 line
1.7.4.1
PATCH 8/76 serial-core: reset the console speed on resume
In reply to Greg Kroah-HartmanFrom: Yin Kangkai <[email protected]>
On some platforms, we need to restore the console speed on resume even it was not suspended (no_console_suspend), and on others we don't have to do that.
So don't care about the "console_suspend_enabled" and unconditionally reset the console speed if it is a console.
This is actually a redo of ba15ab0 (Set proper console speed on resume if console suspend is disabled) from Deepak Saxena. I also tried to investigate more to find out if this change will break others, here is what I've found out:
commit 891b9dd10764352926e1e107756aa229dfa2c210
Author: Jason Wang <[email protected]>
serial-core: restore termios settings when resume console ports
commit ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1
Author: Jason Wang <[email protected]>
serial-core: skip call set_termios/console_start when no_console_suspend
commit 4547be7809a3b775ce750ec7f8b5748954741523
Author: Stanislav Brabec <[email protected]>
serial-core: resume serial hardware with no_console_suspend
commit ba15ab0e8de0d4439a91342ad52d55ca9e313f3d
Author: Deepak Saxena <[email protected]>
Set proper console speed on resume if console suspend is disabled
from ba15ab0, we learned that, even if the console suspend is disabled (when no_console_suspend is set), we may still need to "reset the port to the state it was in before we suspended."
Then with 4547be7, this piece of code is removed.
And then Jason Wang added that back in ca2e71a and 891b9dd, to fix some breakage on OMAP3EVM platform. From ca2e71a we learned that the "set_termios" things is actually needed by both console is suspended and not suspended.
That's why I removed the console_suspended_enabled condition, and only call console_start() when we actually suspeneded it.
I also noticed in this thread:
http://marc.info/?t=129079257100004&r=1&w=2, which talked about on some platforms, UART HW will be cut power whether or not we set no_console_suspend, and then on resume it does not work quite well. I have a similar HW, and this patch fixed this issue, don't know if this patch also works on their platforms.
[Update: Stanislav tested this patch on Zaurus and reported it improves the situation. Thanks.]
--- drivers/tty/serial/serial_core.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/tty/serial/serial_core.c +3 -3
@@ -2064,7 +2064,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)/* * Re-enable the console device after suspending. */ -if (console_suspend_enabled &&uart_console (uport)) { +if (uart_console (uport)) {/* * First try to use the console cflag setting. */
@@ -2077,9 +2077,9 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)if (port->tty && port->tty->termios && termios.c_cflag ==0 ) termios = *(port->tty->termios); -uart_change_pm (state,0 ); uport->ops->set_termios (uport, &termios,NULL ); -console_start (uport->cons); +if (console_suspend_enabled) +console_start (uport->cons); }if (port->flags &ASYNC_SUSPENDED ) {
Signature · 1 line
1.7.4.1
PATCH 9/76 68328serial: remove unsed m68k_serial->tqueue_hangup
In reply to Greg Kroah-HartmanFrom: Tejun Heo <[email protected]>
m68k_serial->tqueue_hangup is unused. Remove it.
--- drivers/tty/serial/68328serial.c | 23 ----------------------- drivers/tty/serial/68328serial.h | 1 - 2 files changed, 0 insertions(+), 24 deletions(-)
drivers/tty/serial/68328serial.c +0 -23
@@ -393,28 +393,6 @@ static void do_softint(struct work_struct *work)#endif } -/* -* This routine is called from the scheduler tqueue when the interrupt -* routine has signalled that a hangup has occurred. The path of -* hangup processing is: -* -* serial interrupt routine -> (scheduler tqueue) -> -* do_serial_hangup() -> tty->hangup() -> rs_hangup() -* -*/ -static void do_serial_hangup (struct work_struct *work) -{ - struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue_hangup); -struct tty_struct *tty; - - tty = info->port.tty; -if (!tty) -return ; - -tty_hangup (tty); -} - -static int startup (struct m68k_serial * info) {m68328_uart *uart = &uart_addr[info->line];
@@ -1348,7 +1326,6 @@ rs68328_init(void) info->count =0 ; info->blocked_open =0 ;INIT_WORK (&info->tqueue, do_softint); -INIT_WORK (&info->tqueue_hangup, do_serial_hangup);init_waitqueue_head (&info->open_wait);init_waitqueue_head (&info->close_wait); info->line = i;
drivers/tty/serial/68328serial.h +0 -1
@@ -159,7 +159,6 @@ struct m68k_serial {int xmit_tail;int xmit_cnt;struct work_struct tqueue; -struct work_struct tqueue_hangup;wait_queue_head_t open_wait;wait_queue_head_t close_wait; };
Signature · 1 line
1.7.4.1
Re: [PATCH 09/76] 68328serial: remove unsed m68k_serial->tqueue_hangup
Quoted 6 lines · Greg Kroah-Hartman
From: Tejun Heo<[email protected]>
m68k_serial->tqueue_hangupis unused. Remove it.Signed-off-by Tejun Heo<[email protected]>Cc Greg Ungerer<[email protected]>
Quoted 59 lines
Signed-off-by Greg Kroah-Hartman<[email protected]>--- drivers/tty/serial/68328serial.c | 23 ----------------------- drivers/tty/serial/68328serial.h | 1 - 2 files changed, 0 insertions(+), 24 deletions(-)drivers/tty/serial/68328serial.c +0
-23@@ -393,28 +393,6 @@ static void do_softint(struct work_struct *work)#endif } -/* -* This routine is called from the scheduler tqueue when the interrupt -* routine has signalled that a hangup has occurred. The path of -* hangup processing is: -* -* serial interrupt routine -> (scheduler tqueue) -> -* do_serial_hangup() -> tty->hangup() -> rs_hangup() -* -*/ -static void do_serial_hangup (struct work_struct *work) -{ - struct m68k_serial *info = container_of(work, struct m68k_serial, tqueue_hangup); -struct tty_struct *tty; - - tty = info->port.tty; -if (!tty) -return ; - -tty_hangup (tty); -} - -static int startup (struct m68k_serial * info) {m68328_uart *uart =&uart_addr[info->line];@@ -1348,7 +1326,6 @@ rs68328_init(void) info->count =0 ; info->blocked_open =0 ;INIT_WORK (&info->tqueue, do_softint); -INIT_WORK (&info->tqueue_hangup, do_serial_hangup);init_waitqueue_head (&info->open_wait);init_waitqueue_head (&info->close_wait); info->line = i;drivers/tty/serial/68328serial.h +0
-1@@ -159,7 +159,6 @@ struct m68k_serial {int xmit_tail;int xmit_cnt;struct work_struct tqueue; -struct work_struct tqueue_hangup;wait_queue_head_t open_wait;wait_queue_head_t close_wait; };
Signature · 5 lines
------------------------------------------------------------------------ Greg Ungerer -- Principal Engineer EMAIL: [email protected] SnapGear Group, McAfee PHONE: +61 7 3435 2888 8 Gardner Close FAX: +61 7 3217 5323 Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
PATCH 10/76 serial: pch_uart: support new device ML7213
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
Support ML7213 device of OKI SEMICONDUCTOR.
ML7213 is companion chip of Intel Atom E6xx series for IVI(In-Vehicle Infotainment). ML7213 is completely compatible for Intel EG20T PCH.
--- drivers/tty/serial/Kconfig | 5 +++++ drivers/tty/serial/pch_uart.c | 27 +++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-)
drivers/tty/serial/Kconfig +5 -0
@@ -1596,4 +1596,9 @@ config SERIAL_PCH_UART This driver is for PCH(Platform controller Hub) UART of Intel EG20T which is an IOH(Input/Output Hub) for x86 embedded processor. Enabling PCH_DMA, this PCH UART works as DMA mode. + + This driver also can be used for OKI SEMICONDUCTOR ML7213 IOH(Input/ + Output Hub) which is for IVI(In-Vehicle Infotainment) use. + ML7213 is companion chip for Intel Atom E6xx series. + ML7213 is completely compatible for Intel EG20T PCH. endmenu
drivers/tty/serial/pch_uart.c +19 -8
@@ -40,10 +40,11 @@ enum {#define PCH_UART_DRIVER_DEVICE "ttyPCH" -#define PCH_UART_NR_GE_256FIFO 1 -#define PCH_UART_NR_GE_64FIFO 3 -#define PCH_UART_NR_GE (PCH_UART_NR_GE_256FIFO+PCH_UART_NR_GE_64FIFO) -#define PCH_UART_NR PCH_UART_NR_GE +/* Set the max number of UART port +* Intel EG20T PCH: 4 port +* OKI SEMICONDUCTOR ML7213 IOH: 3 port +*/ +#define PCH_UART_NR 4#define PCH_UART_HANDLED_RX_INT (1<<((PCH_UART_HANDLED_RX_INT_SHIFT)<<1))#define PCH_UART_HANDLED_TX_INT (1<<((PCH_UART_HANDLED_TX_INT_SHIFT)<<1))
@@ -192,6 +193,8 @@ enum {#define PCH_UART_HAL_LOOP (PCH_UART_MCR_LOOP)#define PCH_UART_HAL_AFE (PCH_UART_MCR_AFE) +#define PCI_VENDOR_ID_ROHM 0x10DB +struct pch_uart_buffer {unsigned char *buf;int size;
@@ -1249,7 +1252,7 @@ static struct uart_driver pch_uart_driver = { };static struct eg20t_port *pch_uart_init_port (struct pci_dev *pdev, -int port_type) +const struct pci_device_id *id) {struct eg20t_port *priv;int ret;
@@ -1258,6 +1261,7 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,unsigned char *rxbuf;int fifosize, base_baud;static int num; +int port_type = id->driver_data; priv =kzalloc (sizeof (struct eg20t_port ),GFP_KERNEL );if (priv ==NULL )
@@ -1269,11 +1273,11 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,switch (port_type) {case PORT_UNKNOWN : - fifosize =256 ;/* UART0 */ + fifosize =256 ;/* EG20T/ML7213: UART0 */ base_baud =1843200 ;/* 1.8432MHz */ break ;case PORT_8250 : - fifosize =64 ;/* UART1~3 */ + fifosize =64 ;/* EG20T:UART1~3 ML7213: UART1~2*/ base_baud =1843200 ;/* 1.8432MHz */ break ;default :
@@ -1307,6 +1311,7 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,pci_set_drvdata (pdev, priv);pch_uart_hal_request (pdev, fifosize, base_baud); + ret =uart_add_one_port (&pch_uart_driver, &priv->port);if (ret <0 ) goto init_port_hal_free;
@@ -1384,6 +1389,12 @@ static DEFINE_PCI_DEVICE_TABLE(pch_uart_pci_id) = { .driver_data = PCH_UART_2LINE}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8814), .driver_data = PCH_UART_2LINE}, + {PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8027), + .driver_data = PCH_UART_8LINE}, + {PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8028), + .driver_data = PCH_UART_2LINE}, + {PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8029), + .driver_data = PCH_UART_2LINE}, {0,}, };
@@ -1397,7 +1408,7 @@ static int __devinit pch_uart_pci_probe(struct pci_dev *pdev,if (ret <0 ) goto probe_error; - priv =pch_uart_init_port (pdev, id->driver_data); + priv =pch_uart_init_port (pdev, id);if (!priv) { ret = -EBUSY ; goto probe_disable_device;
Signature · 1 line
1.7.4.1
PATCH 11/76 serial: pch_uart: revert Kconfig for non-DMA mode
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
PCH_DMA is not always enabled when a user uses PCH_UART. Since overhead of DMA is not small, in case of low frequent communication, without DMA is better.
Thus, "select PCH_DMA" and DMADEVICES are unnecessary
--- drivers/tty/serial/Kconfig | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/tty/serial/Kconfig +2 -3
@@ -1588,10 +1588,9 @@ config SERIAL_IFX6X60 Support for the IFX6x60 modem devices on Intel MID platforms. config SERIAL_PCH_UART - tristate "Intel EG20T PCH UART" - depends on PCI && DMADEVICES + tristate "Intel EG20T PCH UART/OKI SEMICONDUCTOR ML7213 IOH" + depends on PCI select SERIAL_CORE - select PCH_DMA help This driver is for PCH(Platform controller Hub) UART of Intel EG20T which is an IOH(Input/Output Hub) for x86 embedded processor.
Signature · 1 line
1.7.4.1
PATCH 12/76 hvc_dcc: Fix bad code generation by marking assembly volatile
In reply to Greg Kroah-HartmanFrom: Stephen Boyd <[email protected]>
Without marking the asm __dcc_getstatus() volatile my compiler decides it can cache the value of __ret in a register and then check the value of it continually in hvc_dcc_put_chars() (I had to replace get_wait/put_wait with 1 and fixup the branch otherwise my disassembler barfed on __dcc_(get|put)char).
00000000 <hvc_dcc_put_chars>:
0: ee103e11 mrc 14, 0, r3, cr0, cr1, {0}
4: e3a0c000 mov ip, #0 ; 0x0
8: e2033202 and r3, r3, #536870912 ; 0x20000000
c: ea000006 b 2c <hvc_dcc_put_chars+0x2c>
10: e3530000 cmp r3, #0 ; 0x0
14: 1afffffd bne 10 <hvc_dcc_put_chars+0x10>
18: e7d1000c ldrb r0, [r1, ip]
1c: ee10fe11 mrc 14, 0, pc, cr0, cr1, {0}
20: 2afffffd bcs 1c <hvc_dcc_put_chars+0x1c>
24: ee000e15 mcr 14, 0, r0, cr0, cr5, {0}
28: e28cc001 add ip, ip, #1 ; 0x1
2c: e15c0002 cmp ip, r2
30: bafffff6 blt 10 <hvc_dcc_put_chars+0x10>
34: e1a00002 mov r0, r2
38: e12fff1e bx lrAs you can see, the value of the mrc is checked against DCC_STATUS_TX (bit 29) and then stored in r3 for later use. Marking the asm volatile produces the following:
00000000 <hvc_dcc_put_chars>:
0: e3a03000 mov r3, #0 ; 0x0
4: ea000007 b 28 <hvc_dcc_put_chars+0x28>
8: ee100e11 mrc 14, 0, r0, cr0, cr1, {0}
c: e3100202 tst r0, #536870912 ; 0x20000000
10: 1afffffc bne 8 <hvc_dcc_put_chars+0x8>
14: e7d10003 ldrb r0, [r1, r3]
18: ee10fe11 mrc 14, 0, pc, cr0, cr1, {0}
1c: 2afffffd bcs 18 <hvc_dcc_put_chars+0x18>
20: ee000e15 mcr 14, 0, r0, cr0, cr5, {0}
24: e2833001 add r3, r3, #1 ; 0x1
28: e1530002 cmp r3, r2
2c: bafffff5 blt 8 <hvc_dcc_put_chars+0x8>
30: e1a00002 mov r0, r2
34: e12fff1e bx lrwhich looks better and actually works. Mark all the inline assembly in this file as volatile since we don't want the compiler to optimize away these statements or move them around in any way.
--- drivers/tty/hvc/hvc_dcc.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
drivers/tty/hvc/hvc_dcc.c +5 -6
@@ -33,8 +33,7 @@static inline u32 __dcc_getstatus (void ) {u32 __ret; - - asm("mrc p14, 0, %0, c0, c1, 0 @ read comms ctrl reg" + asmvolatile ("mrc p14, 0, %0, c0, c1, 0 @ read comms ctrl reg" :"=r" (__ret) : :"cc" );return __ret;
@@ -46,7 +45,7 @@ static inline char __dcc_getchar(void) {char __c; - asm("get_wait: mrc p14, 0, pc, c0, c1, 0 \n\ + asmvolatile ("get_wait: mrc p14, 0, pc, c0, c1, 0 \n\ bne get_wait \n\ mrc p14, 0, %0, c0, c5, 0 @ read comms data reg" :"=r" (__c) : :"cc" );
@@ -58,7 +57,7 @@ static inline char __dcc_getchar(void) {char __c; - asm("mrc p14, 0, %0, c0, c5, 0 @ read comms data reg" + asmvolatile ("mrc p14, 0, %0, c0, c5, 0 @ read comms data reg" :"=r" (__c));return __c;
@@ -68,7 +67,7 @@ static inline char __dcc_getchar(void)#if defined(CONFIG_CPU_V7 )static inline void __dcc_putchar (char c) { - asm("put_wait: mrc p14, 0, pc, c0, c1, 0 \n\ + asmvolatile ("put_wait: mrc p14, 0, pc, c0, c1, 0 \n\ bcs put_wait \n\ mcr p14, 0, %0, c0, c5, 0 " : :"r" (c) :"cc" );
@@ -76,7 +75,7 @@ static inline void __dcc_putchar(char c)#else static inline void __dcc_putchar (char c) { - asm("mcr p14, 0, %0, c0, c5, 0 @ write a char" + asmvolatile ("mcr p14, 0, %0, c0, c5, 0 @ write a char" :/* no output register */ :"r" (c)); }
Signature · 1 line
1.7.4.1
PATCH 13/76 hvc_dcc: Simplify put_chars()/get_chars() loops
In reply to Greg Kroah-HartmanFrom: Stephen Boyd <[email protected]>
Casting and anding with 0xff is unnecessary in hvc_dcc_put_chars() since buf is already a char[]. __dcc_get_char() can't return an int less than 0 since it only returns a char. Simplify the if statement in hvc_dcc_get_chars() to take this into account.
--- drivers/tty/hvc/hvc_dcc.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
drivers/tty/hvc/hvc_dcc.c +4 -8
@@ -89,7 +89,7 @@ static int hvc_dcc_put_chars(uint32_t vt, const char *buf, int count)while (__dcc_getstatus () &DCC_STATUS_TX )cpu_relax (); -__dcc_putchar ((char )(buf[i] &0xFF )); +__dcc_putchar (buf[i]); }return count;
@@ -99,15 +99,11 @@ static int hvc_dcc_get_chars(uint32_t vt, char *buf, int count) {int i; -for (i =0 ; i < count; ++i) { -int c =-1 ; - +for (i =0 ; i < count; ++i)if (__dcc_getstatus () &DCC_STATUS_RX ) - c =__dcc_getchar (); -if (c <0 ) + buf[i] =__dcc_getchar (); +else break ; - buf[i] = c; - }return i; }
Signature · 1 line
1.7.4.1
PATCH 14/76 hvc_dcc: Simplify assembly for v6 and v7 ARM
In reply to Greg Kroah-HartmanFrom: Stephen Boyd <[email protected]>
The inline assembly differences for v6 vs. v7 in the hvc_dcc driver are purely optimizations. On a v7 processor, an mrc with the pc sets the condition codes to the 28-31 bits of the register being read. It just so happens that the TX/RX full bits the DCC driver is testing for are high enough in the register to be put into the condition codes. On a v6 processor, this "feature" isn't implemented and thus we have to do the usual read, mask, test operations to check for TX/RX full.
Since we already test the RX/TX full bits before calling __dcc_getchar() and __dcc_putchar() we don't actually need to do anything special for v7 over v6. The only difference is in hvc_dcc_get_chars(). We would test RX full, poll RX full, and then read a character from the buffer, whereas now we will test RX full, read a character from the buffer, and then test RX full again for the second iteration of the loop. It doesn't seem possible for the buffer to go from full to empty between testing the RX full and reading a character. Therefore, replace the v7 versions with the v6 versions and everything works the same.
--- drivers/tty/hvc/hvc_dcc.c | 24 ------------------------ 1 files changed, 0 insertions(+), 24 deletions(-)
drivers/tty/hvc/hvc_dcc.c +0 -24
@@ -40,19 +40,6 @@ static inline u32 __dcc_getstatus(void) } -#if defined(CONFIG_CPU_V7 ) -static inline char __dcc_getchar (void ) -{ -char __c; - - asmvolatile ("get_wait: mrc p14, 0, pc, c0, c1, 0 \n\ -bne get_wait \n\ -mrc p14, 0, %0, c0, c5, 0 @ read comms data reg" - :"=r" (__c) : :"cc" ); - -return __c; -} -#else static inline char __dcc_getchar (void ) {char __c;
@@ -62,24 +49,13 @@ static inline char __dcc_getchar(void)return __c; } -#endif -#if defined(CONFIG_CPU_V7 ) -static inline void __dcc_putchar (char c) -{ - asmvolatile ("put_wait: mrc p14, 0, pc, c0, c1, 0 \n\ -bcs put_wait \n\ -mcr p14, 0, %0, c0, c5, 0 " - : :"r" (c) :"cc" ); -} -#else static inline void __dcc_putchar (char c) { asmvolatile ("mcr p14, 0, %0, c0, c5, 0 @ write a char" :/* no output register */ :"r" (c)); } -#endif static int hvc_dcc_put_chars (uint32_t vt,const char *buf,int count) {
Signature · 1 line
1.7.4.1
PATCH 15/76 vt: Add virtual console keyboard mode OFF
In reply to Greg Kroah-HartmanFrom: Arthur Taylor <[email protected]>
virtual console: add keyboard mode OFF
Add a new mode for the virtual console keyboard OFF in which all input other than shift keys is ignored. Prevents vt input buffers from overflowing when a program opens but doesn't read from a tty, like X11 using evdev for input.
--- drivers/tty/vt/keyboard.c | 5 +++-- drivers/tty/vt/vt_ioctl.c | 3 +++ include/linux/kbd_kern.h | 3 ++- include/linux/kd.h | 1 + 4 files changed, 9 insertions(+), 3 deletions(-)
drivers/tty/vt/keyboard.c +3 -2
@@ -654,7 +654,8 @@ static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)if (value >=ARRAY_SIZE (fn_handler))return ;if ((kbd->kbdmode ==VC_RAW || - kbd->kbdmode ==VC_MEDIUMRAW ) && + kbd->kbdmode ==VC_MEDIUMRAW || + kbd->kbdmode ==VC_OFF ) && value !=KVAL (K_SAK ))return ;/* SAK is allowed even in raw mode */ fn_handler[value](vc);
@@ -1295,7 +1296,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)if (rc ==NOTIFY_STOP )return ; -if (raw_mode && type !=KT_SPEC && type !=KT_SHIFT ) +if ((raw_mode || kbd->kbdmode ==VC_OFF ) && type !=KT_SPEC && type !=KT_SHIFT )return ; (*k_handler[type])(vc, keysym &0xff , !down);
drivers/tty/vt/vt_ioctl.c +3 -0
@@ -688,6 +688,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, kbd->kbdmode =VC_UNICODE ;compute_shiftstate ();break ; +case K_OFF : + kbd->kbdmode =VC_OFF ; +break ;default : ret = -EINVAL ; goto out;
include/linux/kbd_kern.h +2 -1
@@ -50,11 +50,12 @@ struct kbd_struct {#define VC_CAPSLOCK 2/* capslock mode */ #define VC_KANALOCK 3/* kanalock mode */ - unsigned char kbdmode:2; /* one 2-bit value */ + unsigned char kbdmode:3; /* one 3-bit value */#define VC_XLATE 0/* translate keycodes using keymap */ #define VC_MEDIUMRAW 1/* medium raw (keycode) mode */ #define VC_RAW 2/* raw (scancode) mode */ #define VC_UNICODE 3/* Unicode mode */ +#define VC_OFF 4/* disabled mode */ unsigned char modeflags:5;#define VC_APPLIC 0/* application key mode */
include/linux/kd.h +1 -0
@@ -81,6 +81,7 @@ struct unimapinit {#define K_XLATE 0x01#define K_MEDIUMRAW 0x02#define K_UNICODE 0x03 +#define K_OFF 0x04#define KDGKBMODE 0x4B44/* gets current keyboard mode */ #define KDSKBMODE 0x4B45/* sets current keyboard mode */
Signature · 1 line
1.7.4.1
PATCH 16/76 hvc: add Blackfin JTAG console support
In reply to Greg Kroah-HartmanFrom: Mike Frysinger <[email protected]>
This converts the existing bfin_jtag_comm TTY driver to the HVC layer so that the common HVC code can worry about all of the TTY/polling crap and leave the Blackfin code to worry about the Blackfin bits.
--- drivers/char/Kconfig | 9 +++ drivers/tty/hvc/Makefile | 1 + drivers/tty/hvc/hvc_bfin_jtag.c | 105 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+), 0 deletions(-) create mode 100644 drivers/tty/hvc/hvc_bfin_jtag.c
drivers/char/Kconfig +9 -0
@@ -691,6 +691,15 @@ config HVC_DCC driver. This console is used through a JTAG only on ARM. If you don't have a JTAG then you probably don't want this option. +config HVC_BFIN_JTAG + bool "Blackfin JTAG console" + depends on BLACKFIN + select HVC_DRIVER + help + This console uses the Blackfin JTAG to create a console under the + the HVC driver. If you don't have JTAG, then you probably don't + want this option. + config VIRTIO_CONSOLE tristate "Virtio console" depends on VIRTIO
drivers/tty/hvc/Makefile +1 -0
@@ -9,5 +9,6 @@ obj-$(CONFIG_HVC_IRQ) += hvc_irq.o obj-$(CONFIG_HVC_XEN) += hvc_xen.o obj-$(CONFIG_HVC_IUCV) += hvc_iucv.o obj-$(CONFIG_HVC_UDBG) += hvc_udbg.o +obj-$(CONFIG_HVC_BFIN_JTAG) += hvc_bfin_jtag.o obj-$(CONFIG_HVCS) += hvcs.o obj-$(CONFIG_VIRTIO_CONSOLE) += virtio_console.o
drivers/tty/hvc/hvc_bfin_jtag.c new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 17/76 TTY: use appropriate printk priority level
In reply to Greg Kroah-HartmanFrom: Mandeep Singh Baines <[email protected]>
printk()s without a priority level default to KERN_WARNING. To reduce noise at KERN_WARNING, this patch set the priority level appriopriately for unleveled printks()s. This should be useful to folks that look at dmesg warnings closely.
--- drivers/tty/vt/vt.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
drivers/tty/vt/vt.c +8 -7
@@ -2157,10 +2157,10 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co currcons = vc->vc_num;if (!vc_cons_allocated (currcons)) { -/* could this happen? */ -printk_once ("con_write: tty %d not allocated\n" , currcons+1 ); -console_unlock (); -return 0 ; +/* could this happen? */ +pr_warn_once ("con_write: tty %d not allocated\n" , currcons+1 ); +console_unlock (); +return 0 ; } himask = vc->vc_hi_font_mask;
@@ -2940,7 +2940,7 @@ static int __init con_init(void)gotoxy (vc, vc->vc_x, vc->vc_y);csi_J (vc,0 );update_screen (vc); -printk ("Console: %s %s %dx%d" , +pr_info ("Console: %s %s %dx%d" , vc->vc_can_do_color ?"colour" :"mono" , display_desc, vc->vc_cols, vc->vc_rows); printable =1 ;
@@ -3103,7 +3103,7 @@ static int bind_con_driver(const struct consw *csw, int first, int last,clear_buffer_attributes (vc); } -printk ("Console: switching " ); +pr_info ("Console: switching " );if (!deflt)printk ("consoles %d-%d " , first+1 , last+1 );if (j >=0 ) {
@@ -3809,7 +3809,8 @@ void do_unblank_screen(int leaving_gfx)return ;if (!vc_cons_allocated (fg_console)) {/* impossible */ -printk ("unblank_screen: tty %d not allocated ??\n" , fg_console+1 ); +pr_warning ("unblank_screen: tty %d not allocated ??\n" , + fg_console+1 );return ; } vc = vc_cons[fg_console].d;
Signature · 1 line
1.7.4.1
PATCH 18/76 tty,vcs: lseek/VC-release race fix
In reply to Greg Kroah-HartmanFrom: Jiri Olsa <[email protected]>
there's a race between vcs's lseek handler and VC release.
The lseek handler does not hold console_lock and touches VC's size info. If during this the VC got released, there's an access violation.
Following program triggers the issue for me:
[SNIP]
#define _BSD_SOURCE
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/vt.h>
#include <unistd.h>
#include <errno.h>
static int run_seek(void)
{
while(1) {
int fd;
fd = open("./vcs30", O_RDWR);
while(lseek(fd, 0, 0) != -1);
close(fd);
}
}static int open_ioctl_tty(void)
{
return open("/dev/tty1", O_RDWR);
}static int do_ioctl(int fd, int req, int i)
{
return ioctl(fd, req, i);
}#define INIT(i) do_ioctl(ioctl_fd, VT_ACTIVATE, i) #define SHUT(i) do_ioctl(ioctl_fd, VT_DISALLOCATE, i)
int main(int argc, char **argv)
{
int ioctl_fd = open_ioctl_tty();
if (ioctl < 0) {
perror("open tty1 failed\n");
return -1;
}
if ((-1 == mknod("vcs30", S_IFCHR|0666, makedev(7, 30))) &&
(errno != EEXIST)) {
printf("errno %d\n", errno);
perror("failed to create vcs30");
return -1;
}
do_ioctl(ioctl_fd, VT_LOCKSWITCH, 0);
if (!fork())
run_seek();
while(1) {
INIT(30);
SHUT(30);
}
return 0;
}[SNIP]
--- drivers/tty/vt/vc_screen.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/tty/vt/vc_screen.c +18 -0
@@ -159,7 +159,13 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)int size;mutex_lock (&con_buf_mtx); +console_lock (); size =vcs_size (file->f_path.dentry->d_inode); +console_unlock (); +if (size <0 ) { +mutex_unlock (&con_buf_mtx); +return size; + }switch (orig) {default :mutex_unlock (&con_buf_mtx);
@@ -237,6 +243,12 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)* could sleep. */ size =vcs_size (inode); +if (size <0 ) { +if (read) +break ; + ret = size; + goto unlock_out; + }if (pos >= size)break ;if (count > size - pos)
@@ -436,6 +448,12 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)* Return data written up to now on failure. */ size =vcs_size (inode); +if (size <0 ) { +if (written) +break ; + ret = size; + goto unlock_out; + }if (pos >= size)break ;if (this_round > size - pos)
Signature · 1 line
1.7.4.1
PATCH 19/76 tty,vcs removing con_buf/conf_buf_mtx
In reply to Greg Kroah-HartmanFrom: Jiri Olsa <[email protected]>
seems there's no longer need for using con_buf/conf_buf_mtx as vcs_read/vcs_write buffer for user's data.
The do_con_write function, that was the other user of this, is currently using its own kmalloc-ed buffer.
Not sure when this got changed, as I was able to find this code in 2.6.9, but it's already gone as far as current git history goes - 2.6.12-rc2.
AFAICS there's a behaviour change with the current change. The lseek is not completely mutually exclusive with the vcs_read/vcs_write - the file->f_pos might get updated via lseek callback during the vcs_read/vcs_write processing.
I tried to find out if the prefered behaviour is to keep this in sync within read/write/lseek functions, but I did not find any pattern on different places.
I guess if user end up calling write/lseek from different threads she should know what she's doing. If needed we could use dedicated fd mutex/buffer.
--- drivers/tty/vt/vc_screen.c | 98 +++++++++++++++++++++++-------------------- drivers/tty/vt/vt.c | 12 ----- include/linux/vt_kern.h | 8 ---- 3 files changed, 52 insertions(+), 66 deletions(-)
drivers/tty/vt/vc_screen.c +52 -46
@@ -28,7 +28,6 @@#include <linux/interrupt.h> #include <linux/mm.h> #include <linux/init.h> -#include <linux/mutex.h> #include <linux/vt_kern.h> #include <linux/selection.h> #include <linux/kbd_kern.h>
@@ -51,6 +50,8 @@#undef addr#define HEADER_SIZE 4 +#define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE) +struct vcs_poll_data {struct notifier_block notifier;unsigned int cons_num;
@@ -131,21 +132,45 @@ vcs_poll_data_get(struct file *file)return poll; } +/* +* Returns VC for inode. +* Must be called with console_lock. +*/ +static struct vc_data * +vcs_vc (struct inode *inode,int *viewed) +{ +unsigned int currcons =iminor (inode) &127 ; + +WARN_CONSOLE_UNLOCKED (); + +if (currcons ==0 ) { + currcons = fg_console; +if (viewed) + *viewed =1 ; + }else { + currcons--; +if (viewed) + *viewed =0 ; + } +return vc_cons[currcons].d; +} + +/* +* Returns size for VC carried by inode. +* Must be called with console_lock. +*/ static int vcs_size (struct inode *inode) {int size;int minor =iminor (inode); -int currcons = minor &127 ;struct vc_data *vc; -if (currcons ==0 ) - currcons = fg_console; -else - currcons--; -if (!vc_cons_allocated (currcons)) +WARN_CONSOLE_UNLOCKED (); + + vc =vcs_vc (inode,NULL ); +if (!vc)return -ENXIO ; - vc = vc_cons[currcons].d; size = vc->vc_rows * vc->vc_cols;
@@ -158,17 +183,13 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig) {int size; -mutex_lock (&con_buf_mtx);console_lock (); size =vcs_size (file->f_path.dentry->d_inode);console_unlock (); -if (size <0 ) { -mutex_unlock (&con_buf_mtx); +if (size <0 )return size; - }switch (orig) {default : -mutex_unlock (&con_buf_mtx);return -EINVAL ;case 2 : offset += size;
@@ -179,11 +200,9 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)break ; }if (offset <0 || offset > size) { -mutex_unlock (&con_buf_mtx);return -EINVAL ; } file->f_pos = offset; -mutex_unlock (&con_buf_mtx);return file->f_pos; }
@@ -196,12 +215,15 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)struct vc_data *vc;struct vcs_poll_data *poll;long pos; -long viewed, attr, read; -int col, maxcol; +long attr, read; +int col, maxcol, viewed;unsigned short *org =NULL ;ssize_t ret; +char *con_buf; -mutex_lock (&con_buf_mtx); + con_buf = (char *)__get_free_page (GFP_KERNEL ); +if (!con_buf) +return -ENOMEM ; pos = *ppos;
@@ -211,18 +233,10 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)console_lock (); attr = (currcons &128 ); - currcons = (currcons &127 ); -if (currcons ==0 ) { - currcons = fg_console; - viewed =1 ; - }else { - currcons--; - viewed =0 ; - } ret = -ENXIO ; -if (!vc_cons_allocated (currcons)) + vc =vcs_vc (inode, &viewed); +if (!vc) goto unlock_out; - vc = vc_cons[currcons].d; ret = -EINVAL ;if (pos <0 )
@@ -367,7 +381,7 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) ret = read; unlock_out:console_unlock (); -mutex_unlock (&con_buf_mtx); +free_page ((unsigned long ) con_buf);return ret; }
@@ -378,13 +392,16 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)unsigned int currcons =iminor (inode);struct vc_data *vc;long pos; -long viewed, attr, size, written; +long attr, size, written;char *con_buf0; -int col, maxcol; +int col, maxcol, viewed;u16 *org0 =NULL , *org =NULL ;size_t ret; +char *con_buf; -mutex_lock (&con_buf_mtx); + con_buf = (char *)__get_free_page (GFP_KERNEL ); +if (!con_buf) +return -ENOMEM ; pos = *ppos;
@@ -394,19 +411,10 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)console_lock (); attr = (currcons &128 ); - currcons = (currcons &127 ); - -if (currcons ==0 ) { - currcons = fg_console; - viewed =1 ; - }else { - currcons--; - viewed =0 ; - } ret = -ENXIO ; -if (!vc_cons_allocated (currcons)) + vc =vcs_vc (inode, &viewed); +if (!vc) goto unlock_out; - vc = vc_cons[currcons].d; size =vcs_size (inode); ret = -EINVAL ;
@@ -561,9 +569,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) unlock_out:console_unlock (); - -mutex_unlock (&con_buf_mtx); - +free_page ((unsigned long ) con_buf);return ret; }
drivers/tty/vt/vt.c +0 -12
@@ -2068,18 +2068,6 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) } } -/* This is a temporary buffer used to prepare a tty console write -* so that we can easily avoid touching user space while holding the -* console spinlock. It is allocated in con_init and is shared by -* this code and the vc_screen read/write tty calls. -* -* We have to allocate this statically in the kernel data section -* since console_init (and thus con_init) are called before any -* kernel memory allocation is available. -*/ -char con_buf[CON_BUF_SIZE ]; -DEFINE_MUTEX (con_buf_mtx); -/* is_double_width() is based on the wcwidth() implementation by * Markus Kuhn -- 2007-05-26 (Unicode 5.0) * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
include/linux/vt_kern.h +0 -8
@@ -142,14 +142,6 @@ static inline bool vt_force_oops_output(struct vc_data *vc)return false; } -/* -* vc_screen.c shares this temporary buffer with the console write code so that -* we can easily avoid touching user space while holding the console spinlock. -*/ - -#define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE) -extern char con_buf[CON_BUF_SIZE ]; -extern struct mutex con_buf_mtx;extern char vt_dont_switch;extern int default_utf8;extern int global_cursor_default;
Signature · 1 line
1.7.4.1
PATCH 20/76 serial: ifx6x60: fixed call to tty_port_init
In reply to Greg Kroah-HartmanFrom: Russ Gorby <[email protected]>
The port ops must be set AFTER calling port init as that function zeroes the structure
--- drivers/tty/serial/ifx6x60.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/serial/ifx6x60.c +1 -1
@@ -798,8 +798,8 @@ static int ifx_spi_create_port(struct ifx_spi_device *ifx_dev) goto error_ret; } - pport->ops = &ifx_tty_port_ops;tty_port_init (pport); + pport->ops = &ifx_tty_port_ops; ifx_dev->minor =IFX_SPI_TTY_ID ; ifx_dev->tty_dev =tty_register_device (tty_drv, ifx_dev->minor, &ifx_dev->spi_dev->dev);
Signature · 1 line
1.7.4.1
PATCH 21/76 serial: ifx6x60: dma_alloc_coherent must use parent dev
In reply to Greg Kroah-HartmanFrom: Russ Gorby <[email protected]>
This driver is a SPI protocol driver and has no DMA ops associated with the device so the call will fail. Furthermore, the DMA allocation made here will be used by the SPI controller driver (parent dev) so it makes sense to pass that device instead.
--- drivers/tty/serial/ifx6x60.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/ifx6x60.c +2 -2
@@ -998,7 +998,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi) ifx_dev->spi_slave_cts =0 ;/*initialize transfer and dma buffers */ - ifx_dev->tx_buffer =dma_alloc_coherent (&ifx_dev->spi_dev->dev, + ifx_dev->tx_buffer =dma_alloc_coherent (ifx_dev->spi_dev->dev.parent,IFX_SPI_TRANSFER_SIZE , &ifx_dev->tx_bus,GFP_KERNEL );
@@ -1007,7 +1007,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi) ret = -ENOMEM ; goto error_ret; } - ifx_dev->rx_buffer =dma_alloc_coherent (&ifx_dev->spi_dev->dev, + ifx_dev->rx_buffer =dma_alloc_coherent (ifx_dev->spi_dev->dev.parent,IFX_SPI_TRANSFER_SIZE , &ifx_dev->rx_bus,GFP_KERNEL );
Signature · 1 line
1.7.4.1
PATCH 22/76 serial: ifx6x60: changed internal bpw from boolean to int
In reply to Greg Kroah-HartmanFrom: Russ Gorby <[email protected]>
driver should support 32bit SPI transfers. The boolean variable only allowed 8/16.
Changed to support 8/16/32 for future enabling
of 32 bpw.
--- drivers/tty/serial/ifx6x60.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/ifx6x60.c +2 -2
@@ -76,7 +76,7 @@static void ifx_spi_handle_srdy (struct ifx_spi_device *ifx_dev);/* local variables */ -static int spi_b16 =1 ;/* 8 or 16 bit word length */ +static int spi_bpw =16 ;/* 8, 16 or 32 bit word length */ static struct tty_driver *tty_drv;static struct ifx_spi_device *saved_ifx_dev;static struct lock_class_key ifx_spi_key;
@@ -724,7 +724,7 @@ static void ifx_spi_io(unsigned long data) ifx_dev->spi_xfer.cs_change =0 ; ifx_dev->spi_xfer.speed_hz =12500000 ;/* ifx_dev->spi_xfer.speed_hz = 390625; */ - ifx_dev->spi_xfer.bits_per_word = spi_b16 ?16 :8 ; + ifx_dev->spi_xfer.bits_per_word = spi_bpw; ifx_dev->spi_xfer.tx_buf = ifx_dev->tx_buffer; ifx_dev->spi_xfer.rx_buf = ifx_dev->rx_buffer;
Signature · 1 line
1.7.4.1
PATCH 23/76 serial: ifx6x60: set SPI max_speed_hz based on platform type
In reply to Greg Kroah-HartmanFrom: Russ Gorby <[email protected]>
Platforms containing the 6260 can run up to 25Mhz.
For these platforms set max_speed_hz to 25Mhz.
--- drivers/tty/serial/ifx6x60.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/tty/serial/ifx6x60.c +2 -1
@@ -722,7 +722,7 @@ static void ifx_spi_io(unsigned long data)/* note len is BYTES, not transfers */ ifx_dev->spi_xfer.len =IFX_SPI_TRANSFER_SIZE ; ifx_dev->spi_xfer.cs_change =0 ; - ifx_dev->spi_xfer.speed_hz =12500000 ; + ifx_dev->spi_xfer.speed_hz = ifx_dev->spi_dev->max_speed_hz;/* ifx_dev->spi_xfer.speed_hz = 390625; */ ifx_dev->spi_xfer.bits_per_word = spi_bpw;
@@ -992,6 +992,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi) ifx_dev->modem = pl_data->modem_type; ifx_dev->use_dma = pl_data->use_dma; ifx_dev->max_hz = pl_data->max_hz; + spi->max_speed_hz = ifx_dev->max_hz;/* ensure SPI protocol flags are initialized to enable transfer */ ifx_dev->spi_more =0 ;
Signature · 1 line
1.7.4.1
PATCH 24/76 serial: ifx6x60: probe routine needs to call spi_setup
In reply to Greg Kroah-HartmanFrom: Russ Gorby <[email protected]>
The probe routine should call spi_setup() to configure the SPI bus so it can properly communicate with the device. E.g. the device operates in SPI mode 1.
Called spi_setup to configure SPI mode, max_speed_hz, and bpw
--- drivers/tty/serial/ifx6x60.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/tty/serial/ifx6x60.c +9 -0
@@ -67,6 +67,7 @@#define IFX_SPI_MORE_MASK 0x10#define IFX_SPI_MORE_BIT 12/* bit position in u16 */ #define IFX_SPI_CTS_BIT 13/* bit position in u16 */ +#define IFX_SPI_MODE SPI_MODE_1#define IFX_SPI_TTY_ID 0#define IFX_SPI_TIMEOUT_SEC 2#define IFX_SPI_HEADER_0 (-1)
@@ -992,7 +993,15 @@ static int ifx_spi_spi_probe(struct spi_device *spi) ifx_dev->modem = pl_data->modem_type; ifx_dev->use_dma = pl_data->use_dma; ifx_dev->max_hz = pl_data->max_hz; +/* initialize spi mode, etc */ spi->max_speed_hz = ifx_dev->max_hz; + spi->mode =IFX_SPI_MODE | (SPI_LOOP & spi->mode); + spi->bits_per_word = spi_bpw; + ret =spi_setup (spi); +if (ret) { +dev_err (&spi->dev,"SPI setup wasn't successful %d" , ret); +return -ENODEV ; + }/* ensure SPI protocol flags are initialized to enable transfer */ ifx_dev->spi_more =0 ;
Signature · 1 line
1.7.4.1
PATCH 25/76 serial: ifx6x60: minor cleanup
In reply to Greg Kroah-HartmanFrom: Russ Gorby <[email protected]>
renamed spi_driver variable to not be h/w specific set driver name to use DRVNAME define removed commented-out define
--- drivers/tty/serial/ifx6x60.c | 8 ++++---- drivers/tty/serial/ifx6x60.h | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/tty/serial/ifx6x60.c +4 -4
@@ -1333,9 +1333,9 @@ static const struct spi_device_id ifx_id_table[] = {MODULE_DEVICE_TABLE (spi, ifx_id_table);/* spi operations */ -static const struct spi_driver ifx_spi_driver_6160 = { +static const struct spi_driver ifx_spi_driver = { .driver = { - .name ="ifx6160" , + .name =DRVNAME , .bus = &spi_bus_type, .pm = &ifx_spi_pm, .owner =THIS_MODULE },
@@ -1357,7 +1357,7 @@ static void __exit ifx_spi_exit(void) {/* unregister */ tty_unregister_driver (tty_drv); -spi_unregister_driver ((void *)&ifx_spi_driver_6160); +spi_unregister_driver ((void *)&ifx_spi_driver); }/**
@@ -1399,7 +1399,7 @@ static int __init ifx_spi_init(void)return result; } - result =spi_register_driver ((void *)&ifx_spi_driver_6160); + result =spi_register_driver ((void *)&ifx_spi_driver);if (result) {pr_err ("%s: spi_register_driver failed(%d)" ,DRVNAME , result);
drivers/tty/serial/ifx6x60.h +0 -2
@@ -29,8 +29,6 @@#define DRVNAME "ifx6x60"#define TTYNAME "ttyIFX" -/* #define IFX_THROTTLE_CODE */ -#define IFX_SPI_MAX_MINORS 1#define IFX_SPI_TRANSFER_SIZE 2048#define IFX_SPI_FIFO_SIZE 4096
Signature · 1 line
1.7.4.1
PATCH 26/76 serial: also set the uartclk value in resume after goes to highspeed
In reply to Greg Kroah-HartmanFrom: Yin Kangkai <[email protected]>
For any reason if the NS16550A was not work in high speed mode (e.g. we hold NS16550A from going to high speed mode in autoconfig_16550a()), now we are resume from suspend, we should also set the uartclk to the correct value. Otherwise it is still the old 1843200 and that will bring issues.
--- drivers/tty/serial/8250.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/tty/serial/8250.c +1 -0
@@ -3036,6 +3036,7 @@ void serial8250_resume_port(int line)serial_outp (up,0x04 , tmp);serial_outp (up,UART_LCR ,0 ); + up->port.uartclk =921600 *16 ; }uart_resume_port (&serial8250_reg, &up->port); }
Signature · 1 line
1.7.4.1
PATCH 27/76 serial: change the divisor latch only when prescalar actually changed
In reply to Greg Kroah-HartmanFrom: Yin Kangkai <[email protected]>
In 8250.c original ns16550 autoconfig code, we change the divisor latch when we goto to high speed mode, we're assuming the previous speed is legacy. This some times is not true.
For example in a system with both CONFIG_SERIAL_8250 and CONFIG_SERIAL_8250_PNP set, in this case, the code (autoconfig) will be called twice, one in serial8250_init/probe() and the other is from serial_pnp_probe. When serial_pnp_probe calls the autoconfig for NS16550A, it's already in high speed mode, change the divisor latch (quot << 3) in this case will make the UART console garbled.
--- drivers/tty/serial/8250.c | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-)
drivers/tty/serial/8250.c +20 -12
@@ -954,6 +954,23 @@ static int broken_efr(struct uart_8250_port *up)return 0 ; } +static inline int ns16550a_goto_highspeed (struct uart_8250_port *up) +{ +unsigned char status; + + status =serial_in (up,0x04 );/* EXCR2 */ +#define PRESL (x) ((x) & 0x30) +if (PRESL (status) ==0x10 ) { +/* already in high speed mode */ +return 0 ; + }else { + status &= ~0xB0 ;/* Disable LOCK, mask out PRESL[01] */ + status |=0x10 ;/* 1.625 divisor for baud_base --> 921600 */ +serial_outp (up,0x04 , status); + } +return 1 ; +} +/* * We know that the chip has FIFOs. Does it have an EFR? The * EFR is located in the same register position as the IIR and
@@ -1025,12 +1042,8 @@ static void autoconfig_16550a(struct uart_8250_port *up) quot =serial_dl_read (up); quot <<=3 ; - status1 =serial_in (up,0x04 );/* EXCR2 */ - status1 &= ~0xB0 ;/* Disable LOCK, mask out PRESL[01] */ - status1 |=0x10 ;/* 1.625 divisor for baud_base --> 921600 */ -serial_outp (up,0x04 , status1); - -serial_dl_write (up, quot); +if (ns16550a_goto_highspeed (up)) +serial_dl_write (up, quot);serial_outp (up,UART_LCR ,0 );
@@ -3025,15 +3038,10 @@ void serial8250_resume_port(int line)struct uart_8250_port *up = &serial8250_ports[line];if (up->capabilities &UART_NATSEMI ) { -unsigned char tmp; -/* Ensure it's still in high speed mode */ serial_outp (up,UART_LCR ,0xE0 ); - tmp =serial_in (up,0x04 );/* EXCR2 */ - tmp &= ~0xB0 ;/* Disable LOCK, mask out PRESL[01] */ - tmp |=0x10 ;/* 1.625 divisor for baud_base --> 921600 */ -serial_outp (up,0x04 , tmp); +ns16550a_goto_highspeed (up);serial_outp (up,UART_LCR ,0 ); up->port.uartclk =921600 *16 ;
Signature · 1 line
1.7.4.1
PATCH 28/76 tty: Add msm_smd_tty driver
In reply to Greg Kroah-HartmanFrom: Niranjana Vishwanathapura <[email protected]>
msm_smd_tty driver provides tty device interface
to 'DS' and 'GPSNMEA' streaming SMD ports.
--- drivers/tty/serial/Kconfig | 9 ++ drivers/tty/serial/Makefile | 1 + drivers/tty/serial/msm_smd_tty.c | 236 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 246 insertions(+), 0 deletions(-) create mode 100644 drivers/tty/serial/msm_smd_tty.c
drivers/tty/serial/Kconfig +9 -0
@@ -1600,4 +1600,13 @@ config SERIAL_PCH_UART Output Hub) which is for IVI(In-Vehicle Infotainment) use. ML7213 is companion chip for Intel Atom E6xx series. ML7213 is completely compatible for Intel EG20T PCH. + +config SERIAL_MSM_SMD + bool "Enable tty device interface for some SMD ports" + default n + depends on MSM_SMD + help + Enables userspace clients to read and write to some streaming SMD + ports via tty device interface for MSM chipset. + endmenu
drivers/tty/serial/Makefile +1 -0
@@ -92,3 +92,4 @@ obj-$(CONFIG_SERIAL_MRST_MAX3110) += mrst_max3110.o obj-$(CONFIG_SERIAL_MFD_HSU) += mfd.o obj-$(CONFIG_SERIAL_IFX6X60) += ifx6x60.o obj-$(CONFIG_SERIAL_PCH_UART) += pch_uart.o +obj-$(CONFIG_SERIAL_MSM_SMD) += msm_smd_tty.o
drivers/tty/serial/msm_smd_tty.c new file +236 -0
236 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 29/76 atmel_serial: enable PPS support
In reply to Greg Kroah-HartmanFrom: Viktar Palstsiuk <[email protected]>
Enables PPS support in atmel serial driver to make PPS API working.
--- drivers/tty/serial/atmel_serial.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
drivers/tty/serial/atmel_serial.c +16 -0
@@ -1240,6 +1240,21 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,spin_unlock_irqrestore (&port->lock, flags); } +static void atmel_set_ldisc (struct uart_port *port,int new) +{ +int line = port->line; + +if (line >= port->state->port.tty->driver->num) +return ; + +if (port->state->port.tty->ldisc->ops->num ==N_PPS ) { + port->flags |=UPF_HARDPPS_CD ; +atmel_enable_ms (port); + }else { + port->flags &= ~UPF_HARDPPS_CD ; + } +} +/* * Return string describing the specified port */
@@ -1380,6 +1395,7 @@ static struct uart_ops atmel_pops = { .shutdown = atmel_shutdown, .flush_buffer = atmel_flush_buffer, .set_termios = atmel_set_termios, + .set_ldisc = atmel_set_ldisc, .type = atmel_type, .release_port = atmel_release_port, .request_port = atmel_request_port,
Signature · 1 line
1.7.4.1
PATCH 30/76 tty,vt: fix VT_SETACTIVATE console switch
In reply to Greg Kroah-HartmanFrom: Jiri Olsa <[email protected]>
using VT_SETACTIVATE ioctl for console switch did not work, since it put wrong param to the set_console function.
Also ioctl returned misleading error, because of the missing break statement. I wonder anyone has ever used this one :).
--- drivers/tty/vt/vt_ioctl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/tty/vt/vt_ioctl.c +2 -1
@@ -1010,8 +1010,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,if (ret)break ;/* Commence switch and lock */ -set_console (arg); +set_console (vsa.console); } +break ; }/*
Signature · 1 line
1.7.4.1
PATCH 31/76 tty: serial: altera_uart: Handle pdev->id == -1 in altera_uart_remove
In reply to Greg Kroah-HartmanFrom: Tobias Klauser <[email protected]>
Commit 6b5756f176568a710d008d3b478128fafb6707f0 introduced the possibility for pdev->id being -1 but the change was not done equally in altera_uart_remove. This patch fixes this.
--- drivers/tty/serial/altera_uart.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
drivers/tty/serial/altera_uart.c +7 -1
@@ -561,9 +561,15 @@ static int __devinit altera_uart_probe(struct platform_device *pdev) static int __devexit altera_uart_remove(struct platform_device *pdev) { -struct uart_port *port = &altera_uart_ports[pdev->id].port; +struct uart_port *port; +int i = pdev->id; +if (i ==-1 ) + i =0 ; + + port = &altera_uart_ports[i].port;uart_remove_one_port (&altera_uart_driver, port); +return 0 ; }
Signature · 1 line
1.7.4.1
PATCH 32/76 tty: serial: altera_uart: Use port->regshift to store bus shift
In reply to Greg Kroah-HartmanFrom: Tobias Klauser <[email protected]>
Use the regshift member of struct uart_port to store the address stride from platform data. This way we can save one dereference per call of altera_uart_readl and altera_uart_writel.
This also allows us to use the driver without platform data, which is needed for device tree support in the Nios2 port.
--- drivers/tty/serial/altera_uart.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
drivers/tty/serial/altera_uart.c +7 -7
@@ -86,16 +86,12 @@ struct altera_uart {static u32 altera_uart_readl (struct uart_port *port,int reg) { -struct altera_uart_platform_uart *platp = port->private_data; - -return readl (port->membase + (reg << platp->bus_shift)); +return readl (port->membase + (reg << port->regshift)); }static void altera_uart_writel (struct uart_port *port,u32 dat,int reg) { -struct altera_uart_platform_uart *platp = port->private_data; - -writel (dat, port->membase + (reg << platp->bus_shift)); +writel (dat, port->membase + (reg << port->regshift)); }static unsigned int altera_uart_tx_empty (struct uart_port *port)
@@ -546,13 +542,17 @@ static int __devinit altera_uart_probe(struct platform_device *pdev)if (!port->membase)return -ENOMEM ; +if (platp) + port->regshift = platp->bus_shift; +else + port->regshift =0 ; + port->line = i; port->type =PORT_ALTERA_UART ; port->iotype =SERIAL_IO_MEM ; port->uartclk = platp->uartclk; port->ops = &altera_uart_ops; port->flags =UPF_BOOT_AUTOCONF ; - port->private_data = platp;uart_add_one_port (&altera_uart_driver, port);
Signature · 1 line
1.7.4.1
PATCH 33/76 MAINTAINERS: Add myself as a maintainer for altera_uart/altera_jtaguart
In reply to Greg Kroah-HartmanFrom: Tobias Klauser <[email protected]>
--- MAINTAINERS | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
MAINTAINERS +10 -0
@@ -465,6 +465,16 @@ M: Matt Turner <[email protected]> L: [email protected] F: arch/alpha/ +ALTERA UART/JTAG UART SERIAL DRIVERS +M: Tobias Klauser <[email protected]> +L: [email protected] +L: [email protected] (moderated for non-subscribers) +S: Maintained +F: drivers/tty/serial/altera_uart.c +F: drivers/tty/serial/altera_jtaguart.c +F: include/linux/altera_uart.h +F: include/linux/altera_jtaguart.h + AMD GEODE CS5536 USB DEVICE CONTROLLER DRIVER M: Thomas Dahlmann <[email protected]> L: [email protected] (moderated for non-subscribers)
Signature · 1 line
1.7.4.1
PATCH 34/76 tiocmget: kill off the passing of the struct file
In reply to Greg Kroah-HartmanFrom: Alan Cox <[email protected]>
We don't actually need this and it causes problems for internal use of this functionality. Currently there is a single use of the FILE * pointer. That is the serial core which uses it to check tty_hung_up_p. However if that is true then IO_ERROR is also already set so the check may be removed.
--- drivers/char/amiserial.c | 2 +- drivers/char/cyclades.c | 2 +- drivers/char/epca.c | 4 ++-- drivers/char/ip2/ip2main.c | 4 ++-- drivers/char/isicom.c | 2 +- drivers/char/istallion.c | 2 +- drivers/char/moxa.c | 4 ++-- drivers/char/mxser.c | 2 +- drivers/char/nozomi.c | 2 +- drivers/char/pcmcia/ipwireless/tty.c | 2 +- drivers/char/pcmcia/synclink_cs.c | 4 ++-- drivers/char/riscom8.c | 2 +- drivers/char/rocket.c | 2 +- drivers/char/serial167.c | 2 +- drivers/char/specialix.c | 2 +- drivers/char/stallion.c | 2 +- drivers/char/sx.c | 2 +- drivers/char/synclink.c | 4 ++-- drivers/char/synclink_gt.c | 4 ++-- drivers/char/synclinkmp.c | 4 ++-- drivers/isdn/gigaset/interface.c | 4 ++-- drivers/isdn/i4l/isdn_tty.c | 2 +- drivers/mmc/card/sdio_uart.c | 2 +- drivers/net/usb/hso.c | 2 +- drivers/net/wan/pc300_tty.c | 4 ++-- drivers/staging/quatech_usb2/quatech_usb2.c | 2 +- drivers/staging/serqt_usb2/serqt_usb2.c | 6 +++--- drivers/tty/hvc/hvsi.c | 2 +- drivers/tty/n_gsm.c | 2 +- drivers/tty/serial/68360serial.c | 2 +- drivers/tty/serial/crisv10.c | 2 +- drivers/tty/serial/ifx6x60.c | 2 +- drivers/tty/serial/serial_core.c | 6 ++---- drivers/tty/tty_io.c | 6 +++--- drivers/usb/class/cdc-acm.c | 2 +- drivers/usb/serial/ark3116.c | 2 +- drivers/usb/serial/belkin_sa.c | 4 ++-- drivers/usb/serial/ch341.c | 2 +- drivers/usb/serial/cp210x.c | 4 ++-- drivers/usb/serial/cypress_m8.c | 4 ++-- drivers/usb/serial/digi_acceleport.c | 4 ++-- drivers/usb/serial/ftdi_sio.c | 4 ++-- drivers/usb/serial/io_edgeport.c | 4 ++-- drivers/usb/serial/io_ti.c | 2 +- drivers/usb/serial/iuu_phoenix.c | 2 +- drivers/usb/serial/keyspan.c | 2 +- drivers/usb/serial/keyspan.h | 3 +-- drivers/usb/serial/keyspan_pda.c | 2 +- drivers/usb/serial/kl5kusb105.c | 4 ++-- drivers/usb/serial/kobil_sct.c | 4 ++-- drivers/usb/serial/mct_u232.c | 4 ++-- drivers/usb/serial/mos7720.c | 4 ++-- drivers/usb/serial/mos7840.c | 2 +- drivers/usb/serial/opticon.c | 2 +- drivers/usb/serial/oti6858.c | 4 ++-- drivers/usb/serial/pl2303.c | 2 +- drivers/usb/serial/sierra.c | 2 +- drivers/usb/serial/spcp8x5.c | 2 +- drivers/usb/serial/ssu100.c | 2 +- drivers/usb/serial/ti_usb_3410_5052.c | 4 ++-- drivers/usb/serial/usb-serial.c | 4 ++-- drivers/usb/serial/usb-wwan.h | 2 +- drivers/usb/serial/usb_wwan.c | 2 +- drivers/usb/serial/whiteheat.c | 4 ++-- include/linux/tty_driver.h | 2 +- include/linux/usb/serial.h | 2 +- include/net/irda/ircomm_tty.h | 2 +- net/bluetooth/rfcomm/tty.c | 2 +- net/irda/ircomm/ircomm_tty_ioctl.c | 4 ++-- 69 files changed, 98 insertions(+), 101 deletions(-)
drivers/char/amiserial.c +1 -1
@@ -1194,7 +1194,7 @@ static int get_lsr_info(struct async_struct * info, unsigned int __user *value) } -static int rs_tiocmget (struct tty_struct *tty,struct file *file) +static int rs_tiocmget (struct tty_struct *tty) {struct async_struct * info = tty->driver_data;unsigned char control, status;
drivers/char/cyclades.c +1 -1
@@ -2429,7 +2429,7 @@ static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)return put_user (result, (unsigned long __user *)value); } -static int cy_tiocmget (struct tty_struct *tty,struct file *file) +static int cy_tiocmget (struct tty_struct *tty) {struct cyclades_port *info = tty->driver_data;struct cyclades_card *card;
drivers/char/epca.c +2 -2
@@ -1982,7 +1982,7 @@ static int info_ioctl(struct tty_struct *tty, struct file *file,return 0 ; } -static int pc_tiocmget (struct tty_struct *tty,struct file *file) +static int pc_tiocmget (struct tty_struct *tty) {struct channel *ch = tty->driver_data;struct board_chan __iomem *bc;
@@ -2074,7 +2074,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file *file,return -EINVAL ;switch (cmd) {case TIOCMODG : - mflag =pc_tiocmget (tty, file); + mflag =pc_tiocmget (tty);if (put_user (mflag, (unsigned long __user *)argp))return -EFAULT ;break ;
drivers/char/ip2/ip2main.c +2 -2
@@ -181,7 +181,7 @@ static void ip2_unthrottle(PTTY);static void ip2_stop (PTTY );static void ip2_start (PTTY );static void ip2_hangup (PTTY ); -static int ip2_tiocmget (struct tty_struct *tty,struct file *file); +static int ip2_tiocmget (struct tty_struct *tty);static int ip2_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); static int ip2_get_icount(struct tty_struct *tty,
@@ -2038,7 +2038,7 @@ ip2_stop ( PTTY tty )/* Device Ioctl Section */ /******************************************************************************/ -static int ip2_tiocmget (struct tty_struct *tty,struct file *file) +static int ip2_tiocmget (struct tty_struct *tty) {i2ChanStrPtr pCh = DevTable[tty->index];#ifdef ENABLE_DSSNOW
drivers/char/isicom.c +1 -1
@@ -1065,7 +1065,7 @@ static int isicom_send_break(struct tty_struct *tty, int length)return 0 ; } -static int isicom_tiocmget (struct tty_struct *tty,struct file *file) +static int isicom_tiocmget (struct tty_struct *tty) {struct isi_port *port = tty->driver_data;/* just send the port status */
drivers/char/istallion.c +1 -1
@@ -1501,7 +1501,7 @@ static int stli_setserial(struct tty_struct *tty, struct serial_struct __user *s/*****************************************************************************/ -static int stli_tiocmget (struct tty_struct *tty,struct file *file) +static int stli_tiocmget (struct tty_struct *tty) {struct stliport *portp = tty->driver_data;struct stlibrd *brdp;
drivers/char/moxa.c +2 -2
@@ -199,7 +199,7 @@ static void moxa_set_termios(struct tty_struct *, struct ktermios *);static void moxa_stop (struct tty_struct *);static void moxa_start (struct tty_struct *);static void moxa_hangup (struct tty_struct *); -static int moxa_tiocmget (struct tty_struct *tty,struct file *file); +static int moxa_tiocmget (struct tty_struct *tty);static int moxa_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static void moxa_poll (unsigned long );
@@ -1257,7 +1257,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)return chars; } -static int moxa_tiocmget (struct tty_struct *tty,struct file *file) +static int moxa_tiocmget (struct tty_struct *tty) {struct moxa_port *ch = tty->driver_data;int flag =0 , dtr, rts;
drivers/char/mxser.c +1 -1
@@ -1320,7 +1320,7 @@ static int mxser_get_lsr_info(struct mxser_port *info,return put_user (result, value); } -static int mxser_tiocmget (struct tty_struct *tty,struct file *file) +static int mxser_tiocmget (struct tty_struct *tty) {struct mxser_port *info = tty->driver_data;unsigned char control, status;
drivers/char/nozomi.c +1 -1
@@ -1750,7 +1750,7 @@ static int ntty_write_room(struct tty_struct *tty) }/* Gets io control parameters */ -static int ntty_tiocmget (struct tty_struct *tty,struct file *file) +static int ntty_tiocmget (struct tty_struct *tty) {const struct port *port = tty->driver_data;const struct ctrl_dl *ctrl_dl = &port->ctrl_dl;
drivers/char/pcmcia/ipwireless/tty.c +1 -1
@@ -395,7 +395,7 @@ static int set_control_lines(struct ipw_tty *tty, unsigned int set,return 0 ; } -static int ipw_tiocmget (struct tty_struct *linux_tty,struct file *file) +static int ipw_tiocmget (struct tty_struct *linux_tty) {struct ipw_tty *tty = linux_tty->driver_data;/* FIXME: Exactly how is the tty object locked here .. */
drivers/char/pcmcia/synclink_cs.c +2 -2
@@ -418,7 +418,7 @@ static void bh_status(MGSLPC_INFO *info);/* * ioctl handlers */ -static int tiocmget (struct tty_struct *tty,struct file *file); +static int tiocmget (struct tty_struct *tty);static int tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static int get_stats (MGSLPC_INFO *info,struct mgsl_icount __user *user_icount);
@@ -2114,7 +2114,7 @@ static int modem_input_wait(MGSLPC_INFO *info,int arg)/* return the state of the serial control and status signals */ -static int tiocmget (struct tty_struct *tty,struct file *file) +static int tiocmget (struct tty_struct *tty) {MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;unsigned int result;
drivers/char/riscom8.c +1 -1
@@ -1086,7 +1086,7 @@ static int rc_chars_in_buffer(struct tty_struct *tty)return port->xmit_cnt; } -static int rc_tiocmget (struct tty_struct *tty,struct file *file) +static int rc_tiocmget (struct tty_struct *tty) {struct riscom_port *port = tty->driver_data;struct riscom_board *bp;
drivers/char/rocket.c +1 -1
@@ -1169,7 +1169,7 @@ static int sGetChanRI(CHANNEL_T * ChP)* Returns the state of the serial modem control lines. These next 2 functions * are the way kernel versions > 2.5 handle modem control lines rather than IOCTLs. */ -static int rp_tiocmget (struct tty_struct *tty,struct file *file) +static int rp_tiocmget (struct tty_struct *tty) {struct r_port *info = tty->driver_data;unsigned int control, result, ChanStatus;
drivers/char/serial167.c +1 -1
@@ -1308,7 +1308,7 @@ check_and_exit:return startup (info); }/* set_serial_info */ -static int cy_tiocmget (struct tty_struct *tty,struct file *file) +static int cy_tiocmget (struct tty_struct *tty) {struct cyclades_port *info = tty->driver_data;int channel;
drivers/char/specialix.c +1 -1
@@ -1737,7 +1737,7 @@ static int sx_chars_in_buffer(struct tty_struct *tty)return port->xmit_cnt; } -static int sx_tiocmget (struct tty_struct *tty,struct file *file) +static int sx_tiocmget (struct tty_struct *tty) {struct specialix_port *port = tty->driver_data;struct specialix_board *bp;
drivers/char/stallion.c +1 -1
@@ -1094,7 +1094,7 @@ static int stl_setserial(struct tty_struct *tty, struct serial_struct __user *sp/*****************************************************************************/ -static int stl_tiocmget (struct tty_struct *tty,struct file *file) +static int stl_tiocmget (struct tty_struct *tty) {struct stlport *portp;
drivers/char/sx.c +1 -1
@@ -1873,7 +1873,7 @@ static int sx_break(struct tty_struct *tty, int flag)return 0 ; } -static int sx_tiocmget (struct tty_struct *tty,struct file *file) +static int sx_tiocmget (struct tty_struct *tty) {struct sx_port *port = tty->driver_data;return sx_getsignals (port);
drivers/char/synclink.c +2 -2
@@ -823,7 +823,7 @@ static isr_dispatch_func UscIsrTable[7] =/* * ioctl call handlers */ -static int tiocmget (struct tty_struct *tty,struct file *file); +static int tiocmget (struct tty_struct *tty);static int tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); static int mgsl_get_stats(struct mgsl_struct * info, struct mgsl_icount
@@ -2846,7 +2846,7 @@ static int modem_input_wait(struct mgsl_struct *info,int arg)/* return the state of the serial control and status signals */ -static int tiocmget (struct tty_struct *tty,struct file *file) +static int tiocmget (struct tty_struct *tty) {struct mgsl_struct *info = tty->driver_data;unsigned int result;
drivers/char/synclink_gt.c +2 -2
@@ -512,7 +512,7 @@ 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,struct file *file); +static int tiocmget (struct tty_struct *tty);static int tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static int set_break (struct tty_struct *tty,int break_state);
@@ -3195,7 +3195,7 @@ static int modem_input_wait(struct slgt_info *info,int arg)/* * return state of serial control and status signals */ -static int tiocmget (struct tty_struct *tty,struct file *file) +static int tiocmget (struct tty_struct *tty) {struct slgt_info *info = tty->driver_data;unsigned int result;
drivers/char/synclinkmp.c +2 -2
@@ -546,7 +546,7 @@ static int tx_abort(SLMP_INFO *info);static int rx_enable (SLMP_INFO *info,int enable);static int modem_input_wait (SLMP_INFO *info,int arg);static int wait_mgsl_event (SLMP_INFO *info,int __user *mask_ptr); -static int tiocmget (struct tty_struct *tty,struct file *file); +static int tiocmget (struct tty_struct *tty);static int tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static int set_break (struct tty_struct *tty,int break_state);
@@ -3207,7 +3207,7 @@ static int modem_input_wait(SLMP_INFO *info,int arg)/* return the state of the serial control and status signals */ -static int tiocmget (struct tty_struct *tty,struct file *file) +static int tiocmget (struct tty_struct *tty) {SLMP_INFO *info = tty->driver_data;unsigned int result;
drivers/isdn/gigaset/interface.c +2 -2
@@ -122,7 +122,7 @@ static int if_chars_in_buffer(struct tty_struct *tty);static void if_throttle (struct tty_struct *tty);static void if_unthrottle (struct tty_struct *tty);static void if_set_termios (struct tty_struct *tty,struct ktermios *old); -static int if_tiocmget (struct tty_struct *tty,struct file *file); +static int if_tiocmget (struct tty_struct *tty);static int if_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); static int if_write(struct tty_struct *tty,
@@ -280,7 +280,7 @@ static int if_ioctl(struct tty_struct *tty, struct file *file,return retval; } -static int if_tiocmget (struct tty_struct *tty,struct file *file) +static int if_tiocmget (struct tty_struct *tty) {struct cardstate *cs;int retval;
drivers/isdn/i4l/isdn_tty.c +1 -1
@@ -1345,7 +1345,7 @@ isdn_tty_get_lsr_info(modem_info * info, uint __user * value)static int -isdn_tty_tiocmget (struct tty_struct *tty,struct file *file) +isdn_tty_tiocmget (struct tty_struct *tty) {modem_info *info = (modem_info *) tty->driver_data;u_char control, status;
drivers/mmc/card/sdio_uart.c +1 -1
@@ -956,7 +956,7 @@ static int sdio_uart_break_ctl(struct tty_struct *tty, int break_state)return 0 ; } -static int sdio_uart_tiocmget (struct tty_struct *tty,struct file *file) +static int sdio_uart_tiocmget (struct tty_struct *tty) {struct sdio_uart_port *port = tty->driver_data;int result;
drivers/net/usb/hso.c +1 -1
@@ -1656,7 +1656,7 @@ static int hso_get_count(struct tty_struct *tty, } -static int hso_serial_tiocmget (struct tty_struct *tty,struct file *file) +static int hso_serial_tiocmget (struct tty_struct *tty) {int retval;struct hso_serial *serial =get_serial_by_tty (tty);
drivers/net/wan/pc300_tty.c +2 -2
@@ -133,7 +133,7 @@ static void cpc_tty_signal_on(pc300dev_t *pc300dev, unsigned char);static int pc300_tiocmset (struct tty_struct *,struct file *,unsigned int ,unsigned int ); -static int pc300_tiocmget (struct tty_struct *,struct file *); +static int pc300_tiocmget (struct tty_struct *);/* functions called by PC300 driver */ void cpc_tty_init (pc300dev_t *dev);
@@ -570,7 +570,7 @@ static int pc300_tiocmset(struct tty_struct *tty, struct file *file,return 0 ; } -static int pc300_tiocmget (struct tty_struct *tty,struct file *file) +static int pc300_tiocmget (struct tty_struct *tty) {unsigned int result;unsigned char status;
drivers/staging/quatech_usb2/quatech_usb2.c +1 -1
@@ -1078,7 +1078,7 @@ static void qt2_set_termios(struct tty_struct *tty, } } -static int qt2_tiocmget (struct tty_struct *tty,struct file *file) +static int qt2_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct usb_serial *serial = port->serial;
drivers/staging/serqt_usb2/serqt_usb2.c +3 -3
@@ -1383,7 +1383,7 @@ static void qt_break(struct tty_struct *tty, int break_state)static inline int qt_real_tiocmget (struct tty_struct *tty,struct usb_serial_port *port, -struct file *file,struct usb_serial *serial) +struct usb_serial *serial) {u8 mcr;
@@ -1462,7 +1462,7 @@ static inline int qt_real_tiocmset(struct tty_struct *tty,return 0 ; } -static int qt_tiocmget (struct tty_struct *tty,struct file *file) +static int qt_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct usb_serial *serial =get_usb_serial (port, __func__);
@@ -1480,7 +1480,7 @@ static int qt_tiocmget(struct tty_struct *tty, struct file *file)dbg ("%s - port %d\n" , __func__, port->number);dbg ("%s - port->RxHolding = %d\n" , __func__, qt_port->RxHolding); - retval =qt_real_tiocmget (tty, port, file, serial); + retval =qt_real_tiocmget (tty, port, serial);spin_unlock_irqrestore (&qt_port->lock, flags);return retval;
drivers/tty/hvc/hvsi.c +1 -1
@@ -1095,7 +1095,7 @@ static void hvsi_unthrottle(struct tty_struct *tty)h_vio_signal (hp->vtermno,VIO_IRQ_ENABLE ); } -static int hvsi_tiocmget (struct tty_struct *tty,struct file *file) +static int hvsi_tiocmget (struct tty_struct *tty) {struct hvsi_struct *hp = tty->driver_data;
drivers/tty/n_gsm.c +1 -1
@@ -2648,7 +2648,7 @@ static void gsmtty_wait_until_sent(struct tty_struct *tty, int timeout)to do here */ } -static int gsmtty_tiocmget (struct tty_struct *tty,struct file *filp) +static int gsmtty_tiocmget (struct tty_struct *tty) {struct gsm_dlci *dlci = tty->driver_data;return dlci->modem_rx;
drivers/tty/serial/68360serial.c +1 -1
@@ -1240,7 +1240,7 @@ static int get_lsr_info(struct async_struct * info, unsigned int *value) }#endif -static int rs_360_tiocmget (struct tty_struct *tty,struct file *file) +static int rs_360_tiocmget (struct tty_struct *tty) {ser_info_t *info = (ser_info_t *)tty->driver_data;unsigned int result =0 ;
drivers/tty/serial/crisv10.c +1 -1
@@ -3614,7 +3614,7 @@ rs_tiocmset(struct tty_struct *tty, struct file *file, }static int -rs_tiocmget (struct tty_struct *tty,struct file *file) +rs_tiocmget (struct tty_struct *tty) {struct e100_serial *info = (struct e100_serial *)tty->driver_data;unsigned int result;
drivers/tty/serial/ifx6x60.c +1 -1
@@ -245,7 +245,7 @@ static void ifx_spi_timeout(unsigned long arg)* Map the signal state into Linux modem flags and report the value * in Linux terms */ -static int ifx_spi_tiocmget (struct tty_struct *tty,struct file *filp) +static int ifx_spi_tiocmget (struct tty_struct *tty) {unsigned int value;struct ifx_spi_device *ifx_dev = tty->driver_data;
drivers/tty/serial/serial_core.c +2 -4
@@ -905,7 +905,7 @@ static int uart_get_lsr_info(struct tty_struct *tty,return put_user (result, value); } -static int uart_tiocmget (struct tty_struct *tty,struct file *file) +static int uart_tiocmget (struct tty_struct *tty) {struct uart_state *state = tty->driver_data;struct tty_port *port = &state->port;
@@ -913,10 +913,8 @@ static int uart_tiocmget(struct tty_struct *tty, struct file *file)int result = -EIO ;mutex_lock (&port->mutex); -if ((!file || !tty_hung_up_p (file)) && - !(tty->flags & (1 <<TTY_IO_ERROR ))) { +if (!(tty->flags & (1 <<TTY_IO_ERROR ))) { result = uport->mctrl; -spin_lock_irq (&uport->lock); result |= uport->ops->get_mctrl (uport);spin_unlock_irq (&uport->lock);
drivers/tty/tty_io.c +3 -3
@@ -2465,12 +2465,12 @@ out:* Locking: none (up to the driver) */ -static int tty_tiocmget (struct tty_struct *tty,struct file *file,int __user *p) +static int tty_tiocmget (struct tty_struct *tty,int __user *p) {int retval = -EINVAL ;if (tty->ops->tiocmget) { - retval = tty->ops->tiocmget (tty, file); + retval = tty->ops->tiocmget (tty);if (retval >=0 ) retval =put_user (retval, p);
@@ -2655,7 +2655,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return send_break (tty, arg ? arg*100 :250 );case TIOCMGET : -return tty_tiocmget (tty, file, p); +return tty_tiocmget (tty, p);case TIOCMSET :case TIOCMBIC :case TIOCMBIS :
drivers/usb/class/cdc-acm.c +1 -1
@@ -776,7 +776,7 @@ static int acm_tty_break_ctl(struct tty_struct *tty, int state)return retval; } -static int acm_tty_tiocmget (struct tty_struct *tty,struct file *file) +static int acm_tty_tiocmget (struct tty_struct *tty) {struct acm *acm = tty->driver_data;
drivers/usb/serial/ark3116.c +1 -1
@@ -485,7 +485,7 @@ static int ark3116_ioctl(struct tty_struct *tty, struct file *file,return -ENOIOCTLCMD ; } -static int ark3116_tiocmget (struct tty_struct *tty,struct file *file) +static int ark3116_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct ark3116_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/belkin_sa.c +2 -2
@@ -100,7 +100,7 @@ static void belkin_sa_process_read_urb(struct urb *urb);static void belkin_sa_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios * old);static void belkin_sa_break_ctl (struct tty_struct *tty,int break_state); -static int belkin_sa_tiocmget (struct tty_struct *tty,struct file *file); +static int belkin_sa_tiocmget (struct tty_struct *tty);static int belkin_sa_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);
@@ -497,7 +497,7 @@ static void belkin_sa_break_ctl(struct tty_struct *tty, int break_state)dev_err (&port->dev,"Set break_ctl %d\n" , break_state); } -static int belkin_sa_tiocmget (struct tty_struct *tty,struct file *file) +static int belkin_sa_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct belkin_sa_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/ch341.c +1 -1
@@ -572,7 +572,7 @@ static int ch341_ioctl(struct tty_struct *tty, struct file *file,return -ENOIOCTLCMD ; } -static int ch341_tiocmget (struct tty_struct *tty,struct file *file) +static int ch341_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct ch341_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/cp210x.c +2 -2
@@ -41,7 +41,7 @@ static void cp210x_get_termios_port(struct usb_serial_port *port, unsigned int *cflagp, unsigned int *baudp);static void cp210x_set_termios (struct tty_struct *,struct usb_serial_port *,struct ktermios *); -static int cp210x_tiocmget (struct tty_struct *,struct file *); +static int cp210x_tiocmget (struct tty_struct *);static int cp210x_tiocmset (struct tty_struct *,struct file *,unsigned int ,unsigned int ); static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *,
@@ -742,7 +742,7 @@ static void cp210x_dtr_rts(struct usb_serial_port *p, int on)cp210x_tiocmset_port (p,NULL ,0 ,TIOCM_DTR |TIOCM_RTS ); } -static int cp210x_tiocmget (struct tty_struct *tty,struct file *file) +static int cp210x_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;unsigned int control;
drivers/usb/serial/cypress_m8.c +2 -2
@@ -173,7 +173,7 @@ static int cypress_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);static void cypress_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old); -static int cypress_tiocmget (struct tty_struct *tty,struct file *file); +static int cypress_tiocmget (struct tty_struct *tty);static int cypress_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static int cypress_chars_in_buffer (struct tty_struct *tty);
@@ -864,7 +864,7 @@ static int cypress_write_room(struct tty_struct *tty) } -static int cypress_tiocmget (struct tty_struct *tty,struct file *file) +static int cypress_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct cypress_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/digi_acceleport.c +2 -2
@@ -445,7 +445,7 @@ static void digi_rx_unthrottle(struct tty_struct *tty);static void digi_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old_termios);static void digi_break_ctl (struct tty_struct *tty,int break_state); -static int digi_tiocmget (struct tty_struct *tty,struct file *file); +static int digi_tiocmget (struct tty_struct *tty);static int digi_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); static int digi_write(struct tty_struct *tty, struct usb_serial_port *port,
@@ -1118,7 +1118,7 @@ static void digi_break_ctl(struct tty_struct *tty, int break_state) } -static int digi_tiocmget (struct tty_struct *tty,struct file *file) +static int digi_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct digi_port *priv =usb_get_serial_port_data (port);
drivers/usb/serial/ftdi_sio.c +2 -2
@@ -856,7 +856,7 @@ static int ftdi_prepare_write_buffer(struct usb_serial_port *port, void *dest, size_t size);static void ftdi_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old); -static int ftdi_tiocmget (struct tty_struct *tty,struct file *file); +static int ftdi_tiocmget (struct tty_struct *tty);static int ftdi_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); static int ftdi_ioctl(struct tty_struct *tty, struct file *file,
@@ -2149,7 +2149,7 @@ static void ftdi_set_termios(struct tty_struct *tty, } } -static int ftdi_tiocmget (struct tty_struct *tty,struct file *file) +static int ftdi_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct ftdi_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/io_edgeport.c +2 -2
@@ -219,7 +219,7 @@ static void edge_set_termios(struct tty_struct *tty,static int edge_ioctl (struct tty_struct *tty,struct file *file,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,struct file *file); +static int edge_tiocmget (struct tty_struct *tty);static int edge_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); static int edge_get_icount(struct tty_struct *tty,
@@ -1599,7 +1599,7 @@ static int edge_tiocmset(struct tty_struct *tty, struct file *file,return 0 ; } -static int edge_tiocmget (struct tty_struct *tty,struct file *file) +static int edge_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct edgeport_port *edge_port =usb_get_serial_port_data (port);
drivers/usb/serial/io_ti.c +1 -1
@@ -2477,7 +2477,7 @@ static int edge_tiocmset(struct tty_struct *tty, struct file *file,return 0 ; } -static int edge_tiocmget (struct tty_struct *tty,struct file *file) +static int edge_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct edgeport_port *edge_port =usb_get_serial_port_data (port);
drivers/usb/serial/iuu_phoenix.c +1 -1
@@ -179,7 +179,7 @@ static int iuu_tiocmset(struct tty_struct *tty, struct file *file,* When no card , the reader respond with TIOCM_CD * This is known as CD autodetect mechanism */ -static int iuu_tiocmget (struct tty_struct *tty,struct file *file) +static int iuu_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct iuu_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/keyspan.c +1 -1
@@ -301,7 +301,7 @@ static void keyspan_set_termios(struct tty_struct *tty,keyspan_send_setup (port,0 ); } -static int keyspan_tiocmget (struct tty_struct *tty,struct file *file) +static int keyspan_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct keyspan_port_private *p_priv =usb_get_serial_port_data (port);
drivers/usb/serial/keyspan.h +1 -2
@@ -58,8 +58,7 @@ static void keyspan_set_termios (struct tty_struct *tty, struct ktermios *old);static void keyspan_break_ctl (struct tty_struct *tty,int break_state); -static int keyspan_tiocmget (struct tty_struct *tty, -struct file *file); +static int keyspan_tiocmget (struct tty_struct *tty);static int keyspan_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);
drivers/usb/serial/keyspan_pda.c +1 -1
@@ -457,7 +457,7 @@ static int keyspan_pda_set_modem_info(struct usb_serial *serial,return rc; } -static int keyspan_pda_tiocmget (struct tty_struct *tty,struct file *file) +static int keyspan_pda_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct usb_serial *serial = port->serial;
drivers/usb/serial/kl5kusb105.c +2 -2
@@ -68,7 +68,7 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port);static void klsi_105_close (struct usb_serial_port *port);static void klsi_105_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old); -static int klsi_105_tiocmget (struct tty_struct *tty,struct file *file); +static int klsi_105_tiocmget (struct tty_struct *tty);static int klsi_105_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static void klsi_105_process_read_urb (struct urb *urb);
@@ -637,7 +637,7 @@ static void mct_u232_break_ctl(struct tty_struct *tty, int break_state) }#endif -static int klsi_105_tiocmget (struct tty_struct *tty,struct file *file) +static int klsi_105_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct klsi_105_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/kobil_sct.c +2 -2
@@ -77,7 +77,7 @@ static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port,static int kobil_write_room (struct tty_struct *tty);static int kobil_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg); -static int kobil_tiocmget (struct tty_struct *tty,struct file *file); +static int kobil_tiocmget (struct tty_struct *tty);static int kobil_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static void kobil_read_int_callback (struct urb *urb);
@@ -504,7 +504,7 @@ static int kobil_write_room(struct tty_struct *tty) } -static int kobil_tiocmget (struct tty_struct *tty,struct file *file) +static int kobil_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct kobil_private *priv;
drivers/usb/serial/mct_u232.c +2 -2
@@ -101,7 +101,7 @@ static void mct_u232_read_int_callback(struct urb *urb);static void mct_u232_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);static void mct_u232_break_ctl (struct tty_struct *tty,int break_state); -static int mct_u232_tiocmget (struct tty_struct *tty,struct file *file); +static int mct_u232_tiocmget (struct tty_struct *tty);static int mct_u232_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static void mct_u232_throttle (struct tty_struct *tty);
@@ -762,7 +762,7 @@ static void mct_u232_break_ctl(struct tty_struct *tty, int break_state) }/* mct_u232_break_ctl */ -static int mct_u232_tiocmget (struct tty_struct *tty,struct file *file) +static int mct_u232_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct mct_u232_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/mos7720.c +2 -2
@@ -1833,7 +1833,7 @@ static int get_lsr_info(struct tty_struct *tty,return 0 ; } -static int mos7720_tiocmget (struct tty_struct *tty,struct file *file) +static int mos7720_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct moschip_port *mos7720_port =usb_get_serial_port_data (port);
@@ -1865,7 +1865,7 @@ static int mos7720_tiocmset(struct tty_struct *tty, struct file *file,struct moschip_port *mos7720_port =usb_get_serial_port_data (port);unsigned int mcr ;dbg ("%s - port %d" , __func__, port->number); -dbg ("he was at tiocmget" ); +dbg ("he was at tiocmset" ); mcr = mos7720_port->shadowMCR;
drivers/usb/serial/mos7840.c +1 -1
@@ -1644,7 +1644,7 @@ static void mos7840_unthrottle(struct tty_struct *tty) } } -static int mos7840_tiocmget (struct tty_struct *tty,struct file *file) +static int mos7840_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct moschip_port *mos7840_port;
drivers/usb/serial/opticon.c +1 -1
@@ -352,7 +352,7 @@ static void opticon_unthrottle(struct tty_struct *tty) } } -static int opticon_tiocmget (struct tty_struct *tty,struct file *file) +static int opticon_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct opticon_private *priv =usb_get_serial_data (port->serial);
drivers/usb/serial/oti6858.c +2 -2
@@ -144,7 +144,7 @@ static int oti6858_write(struct tty_struct *tty, struct usb_serial_port *port, const unsigned char *buf, int count);static int oti6858_write_room (struct tty_struct *tty);static int oti6858_chars_in_buffer (struct tty_struct *tty); -static int oti6858_tiocmget (struct tty_struct *tty,struct file *file); +static int oti6858_tiocmget (struct tty_struct *tty);static int oti6858_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static int oti6858_startup (struct usb_serial *serial);
@@ -657,7 +657,7 @@ static int oti6858_tiocmset(struct tty_struct *tty, struct file *file,return 0 ; } -static int oti6858_tiocmget (struct tty_struct *tty,struct file *file) +static int oti6858_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct oti6858_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/pl2303.c +1 -1
@@ -531,7 +531,7 @@ static int pl2303_tiocmset(struct tty_struct *tty, struct file *file,return set_control_lines (port->serial->dev, control); } -static int pl2303_tiocmget (struct tty_struct *tty,struct file *file) +static int pl2303_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct pl2303_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/sierra.c +1 -1
@@ -389,7 +389,7 @@ static void sierra_set_termios(struct tty_struct *tty,sierra_send_setup (port); } -static int sierra_tiocmget (struct tty_struct *tty,struct file *file) +static int sierra_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;unsigned int value;
drivers/usb/serial/spcp8x5.c +1 -1
@@ -618,7 +618,7 @@ static int spcp8x5_tiocmset(struct tty_struct *tty, struct file *file,return spcp8x5_set_ctrlLine (port->serial->dev, control , priv->type); } -static int spcp8x5_tiocmget (struct tty_struct *tty,struct file *file) +static int spcp8x5_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct spcp8x5_private *priv =usb_get_serial_port_data (port);
drivers/usb/serial/ssu100.c +1 -1
@@ -484,7 +484,7 @@ static int ssu100_attach(struct usb_serial *serial)return ssu100_initdevice (serial->dev); } -static int ssu100_tiocmget (struct tty_struct *tty,struct file *file) +static int ssu100_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct usb_device *dev = port->serial->dev;
drivers/usb/serial/ti_usb_3410_5052.c +2 -2
@@ -112,7 +112,7 @@ static int ti_get_icount(struct tty_struct *tty, struct serial_icounter_struct *icount);static void ti_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old_termios); -static int ti_tiocmget (struct tty_struct *tty,struct file *file); +static int ti_tiocmget (struct tty_struct *tty);static int ti_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static void ti_break (struct tty_struct *tty,int break_state);
@@ -1000,7 +1000,7 @@ static void ti_set_termios(struct tty_struct *tty, } -static int ti_tiocmget (struct tty_struct *tty,struct file *file) +static int ti_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct ti_port *tport =usb_get_serial_port_data (port);
drivers/usb/serial/usb-serial.c +2 -2
@@ -496,14 +496,14 @@ static const struct file_operations serial_proc_fops = { .release = single_release, }; -static int serial_tiocmget (struct tty_struct *tty,struct file *file) +static int serial_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;dbg ("%s - port %d" , __func__, port->number);if (port->serial->type->tiocmget) -return port->serial->type->tiocmget (tty, file); +return port->serial->type->tiocmget (tty);return -EINVAL ; }
drivers/usb/serial/usb-wwan.h +1 -1
@@ -15,7 +15,7 @@ extern int usb_wwan_write_room(struct tty_struct *tty);extern void usb_wwan_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old); -extern int usb_wwan_tiocmget (struct tty_struct *tty,struct file *file); +extern int usb_wwan_tiocmget (struct tty_struct *tty);extern int usb_wwan_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); extern int usb_wwan_ioctl(struct tty_struct *tty, struct file *file,
drivers/usb/serial/usb_wwan.c +1 -1
@@ -79,7 +79,7 @@ void usb_wwan_set_termios(struct tty_struct *tty, }EXPORT_SYMBOL (usb_wwan_set_termios); -int usb_wwan_tiocmget (struct tty_struct *tty,struct file *file) +int usb_wwan_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;unsigned int value;
drivers/usb/serial/whiteheat.c +2 -2
@@ -156,7 +156,7 @@ static int whiteheat_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg);static void whiteheat_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old); -static int whiteheat_tiocmget (struct tty_struct *tty,struct file *file); +static int whiteheat_tiocmget (struct tty_struct *tty);static int whiteheat_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static void whiteheat_break_ctl (struct tty_struct *tty,int break_state);
@@ -833,7 +833,7 @@ static int whiteheat_write_room(struct tty_struct *tty)return (room); } -static int whiteheat_tiocmget (struct tty_struct *tty,struct file *file) +static int whiteheat_tiocmget (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data;struct whiteheat_private *info =usb_get_serial_port_data (port);
include/linux/tty_driver.h +1 -1
@@ -271,7 +271,7 @@ struct tty_operations {void (*set_ldisc)(struct tty_struct *tty);void (*wait_until_sent)(struct tty_struct *tty,int timeout);void (*send_xchar)(struct tty_struct *tty,char ch); -int (*tiocmget)(struct tty_struct *tty,struct file *file); +int (*tiocmget)(struct tty_struct *tty);int (*tiocmset)(struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);int (*resize)(struct tty_struct *tty,struct winsize *ws);
include/linux/usb/serial.h +1 -1
@@ -268,7 +268,7 @@ struct usb_serial_driver {int (*chars_in_buffer)(struct tty_struct *tty);void (*throttle)(struct tty_struct *tty);void (*unthrottle)(struct tty_struct *tty); -int (*tiocmget)(struct tty_struct *tty,struct file *file); +int (*tiocmget)(struct tty_struct *tty);int (*tiocmset)(struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); int (*get_icount)(struct tty_struct *tty,
include/net/irda/ircomm_tty.h +1 -1
@@ -120,7 +120,7 @@ struct ircomm_tty_cb {void ircomm_tty_start (struct tty_struct *tty);void ircomm_tty_check_modem_status (struct ircomm_tty_cb *self); -extern int ircomm_tty_tiocmget (struct tty_struct *tty,struct file *file); +extern int ircomm_tty_tiocmget (struct tty_struct *tty);extern int ircomm_tty_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear); extern int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
net/bluetooth/rfcomm/tty.c +1 -1
@@ -1089,7 +1089,7 @@ static void rfcomm_tty_hangup(struct tty_struct *tty) } } -static int rfcomm_tty_tiocmget (struct tty_struct *tty,struct file *filp) +static int rfcomm_tty_tiocmget (struct tty_struct *tty) {struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
net/irda/ircomm/ircomm_tty_ioctl.c +2 -2
@@ -189,12 +189,12 @@ void ircomm_tty_set_termios(struct tty_struct *tty, }/* -* Function ircomm_tty_tiocmget (tty, file) +* Function ircomm_tty_tiocmget (tty) * * * */ -int ircomm_tty_tiocmget (struct tty_struct *tty,struct file *file) +int ircomm_tty_tiocmget (struct tty_struct *tty) {struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;unsigned int result;
Signature · 1 line
1.7.4.1
PATCH 35/76 tiocmset: kill the file pointer argument
In reply to Greg Kroah-HartmanFrom: Alan Cox <[email protected]>
Doing tiocmget was such fun we should do tiocmset as well for the same reasons
--- drivers/char/amiserial.c | 4 ++-- drivers/char/cyclades.c | 2 +- drivers/char/epca.c | 4 ++-- drivers/char/ip2/ip2main.c | 4 ++-- drivers/char/isicom.c | 4 ++-- drivers/char/istallion.c | 2 +- drivers/char/moxa.c | 4 ++-- drivers/char/mxser.c | 2 +- drivers/char/nozomi.c | 4 ++-- drivers/char/pcmcia/ipwireless/tty.c | 2 +- drivers/char/pcmcia/synclink_cs.c | 6 +++--- drivers/char/riscom8.c | 4 ++-- drivers/char/rocket.c | 4 ++-- drivers/char/serial167.c | 3 +-- drivers/char/specialix.c | 2 +- drivers/char/stallion.c | 2 +- drivers/char/sx.c | 4 ++-- drivers/char/synclink.c | 6 +++--- drivers/char/synclink_gt.c | 6 +++--- drivers/char/synclinkmp.c | 8 ++++---- drivers/isdn/gigaset/interface.c | 4 ++-- drivers/isdn/gigaset/ser-gigaset.c | 2 +- drivers/isdn/i4l/isdn_tty.c | 2 +- drivers/mmc/card/sdio_uart.c | 2 +- drivers/net/irda/irtty-sir.c | 2 +- drivers/net/usb/hso.c | 6 +++--- drivers/net/wan/pc300_tty.c | 5 ++--- drivers/staging/quatech_usb2/quatech_usb2.c | 2 +- drivers/staging/serqt_usb2/serqt_usb2.c | 5 ++--- drivers/tty/hvc/hvsi.c | 4 ++-- drivers/tty/n_gsm.c | 2 +- drivers/tty/serial/68360serial.c | 2 +- drivers/tty/serial/crisv10.c | 3 +-- drivers/tty/serial/ifx6x60.c | 3 +-- drivers/tty/serial/serial_core.c | 6 ++---- drivers/tty/tty_io.c | 7 +++---- drivers/usb/class/cdc-acm.c | 2 +- drivers/usb/serial/ark3116.c | 2 +- drivers/usb/serial/belkin_sa.c | 4 ++-- drivers/usb/serial/ch341.c | 2 +- drivers/usb/serial/cp210x.c | 15 +++++++-------- drivers/usb/serial/cypress_m8.c | 4 ++-- drivers/usb/serial/digi_acceleport.c | 10 +++++----- drivers/usb/serial/ftdi_sio.c | 4 ++-- drivers/usb/serial/io_edgeport.c | 4 ++-- drivers/usb/serial/io_ti.c | 2 +- drivers/usb/serial/iuu_phoenix.c | 2 +- drivers/usb/serial/keyspan.c | 2 +- drivers/usb/serial/keyspan.h | 2 +- drivers/usb/serial/keyspan_pda.c | 2 +- drivers/usb/serial/kl5kusb105.c | 4 ++-- drivers/usb/serial/kobil_sct.c | 4 ++-- drivers/usb/serial/mct_u232.c | 4 ++-- drivers/usb/serial/mos7720.c | 2 +- drivers/usb/serial/mos7840.c | 2 +- drivers/usb/serial/oti6858.c | 4 ++-- drivers/usb/serial/pl2303.c | 2 +- drivers/usb/serial/sierra.c | 2 +- drivers/usb/serial/spcp8x5.c | 2 +- drivers/usb/serial/ssu100.c | 2 +- drivers/usb/serial/ti_usb_3410_5052.c | 6 +++--- drivers/usb/serial/usb-serial.c | 4 ++-- drivers/usb/serial/usb-wwan.h | 2 +- drivers/usb/serial/usb_wwan.c | 2 +- drivers/usb/serial/whiteheat.c | 4 ++-- include/linux/tty_driver.h | 2 +- include/linux/usb/serial.h | 2 +- include/net/irda/ircomm_tty.h | 2 +- net/bluetooth/rfcomm/tty.c | 2 +- net/irda/ircomm/ircomm_tty_ioctl.c | 4 ++-- 70 files changed, 120 insertions(+), 129 deletions(-)
drivers/char/amiserial.c +2 -2
@@ -1216,8 +1216,8 @@ static int rs_tiocmget(struct tty_struct *tty) | (!(status & SER_CTS) ? TIOCM_CTS : 0); } -static int rs_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int rs_tiocmset (struct tty_struct *tty,unsigned int set, +unsigned int clear) {struct async_struct * info = tty->driver_data;unsigned long flags;
drivers/char/cyclades.c +1 -1
@@ -2483,7 +2483,7 @@ end: }/* cy_tiomget */ static int -cy_tiocmset (struct tty_struct *tty,struct file *file, +cy_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct cyclades_port *info = tty->driver_data;
drivers/char/epca.c +2 -2
@@ -2015,7 +2015,7 @@ static int pc_tiocmget(struct tty_struct *tty)return mflag; } -static int pc_tiocmset (struct tty_struct *tty,struct file *file, +static int pc_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct channel *ch = tty->driver_data;
@@ -2081,7 +2081,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file *file,case TIOCMODS :if (get_user (mstat, (unsigned __user *)argp))return -EFAULT ; -return pc_tiocmset (tty, file, mstat, ~mstat); +return pc_tiocmset (tty, mstat, ~mstat);case TIOCSDTR :spin_lock_irqsave (&epca_lock, flags); ch->omodem |= ch->m_dtr;
drivers/char/ip2/ip2main.c +2 -2
@@ -182,7 +182,7 @@ static void ip2_stop(PTTY);static void ip2_start (PTTY );static void ip2_hangup (PTTY );static int ip2_tiocmget (struct tty_struct *tty); -static int ip2_tiocmset (struct tty_struct *tty,struct file *file, +static int ip2_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static int ip2_get_icount (struct tty_struct *tty,struct serial_icounter_struct *icount);
@@ -2085,7 +2085,7 @@ static int ip2_tiocmget(struct tty_struct *tty) | ((pCh->dataSetIn & I2_CTS) ? TIOCM_CTS : 0); } -static int ip2_tiocmset (struct tty_struct *tty,struct file *file, +static int ip2_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {i2ChanStrPtr pCh = DevTable[tty->index];
drivers/char/isicom.c +2 -2
@@ -1082,8 +1082,8 @@ static int isicom_tiocmget(struct tty_struct *tty) ((status &ISI_RI ) ?TIOCM_RI :0 ); } -static int isicom_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int isicom_tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct isi_port *port = tty->driver_data;unsigned long flags;
drivers/char/istallion.c +1 -1
@@ -1524,7 +1524,7 @@ static int stli_tiocmget(struct tty_struct *tty)return stli_mktiocm (portp->asig.sigvalue); } -static int stli_tiocmset (struct tty_struct *tty,struct file *file, +static int stli_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct stliport *portp = tty->driver_data;
drivers/char/moxa.c +2 -2
@@ -200,7 +200,7 @@ static void moxa_stop(struct tty_struct *);static void moxa_start (struct tty_struct *);static void moxa_hangup (struct tty_struct *);static int moxa_tiocmget (struct tty_struct *tty); -static int moxa_tiocmset (struct tty_struct *tty,struct file *file, +static int moxa_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static void moxa_poll (unsigned long );static void moxa_set_tty_param (struct tty_struct *,struct ktermios *);
@@ -1277,7 +1277,7 @@ static int moxa_tiocmget(struct tty_struct *tty)return flag; } -static int moxa_tiocmset (struct tty_struct *tty,struct file *file, +static int moxa_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct moxa_port *ch;
drivers/char/mxser.c +1 -1
@@ -1347,7 +1347,7 @@ static int mxser_tiocmget(struct tty_struct *tty) ((status &UART_MSR_CTS ) ?TIOCM_CTS :0 ); } -static int mxser_tiocmset (struct tty_struct *tty,struct file *file, +static int mxser_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct mxser_port *info = tty->driver_data;
drivers/char/nozomi.c +2 -2
@@ -1767,8 +1767,8 @@ static int ntty_tiocmget(struct tty_struct *tty) }/* Sets io controls parameters */ -static int ntty_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int ntty_tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct nozomi *dc =get_dc_by_tty (tty);unsigned long flags;
drivers/char/pcmcia/ipwireless/tty.c +1 -1
@@ -410,7 +410,7 @@ static int ipw_tiocmget(struct tty_struct *linux_tty) }static int -ipw_tiocmset (struct tty_struct *linux_tty,struct file *file, +ipw_tiocmset (struct tty_struct *linux_tty,unsigned int set,unsigned int clear) {struct ipw_tty *tty = linux_tty->driver_data;
drivers/char/pcmcia/synclink_cs.c +3 -3
@@ -419,8 +419,8 @@ static void bh_status(MGSLPC_INFO *info);* ioctl handlers */ static int tiocmget (struct tty_struct *tty); -static int tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear); +static int tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear);static int get_stats (MGSLPC_INFO *info,struct mgsl_icount __user *user_icount);static int get_params (MGSLPC_INFO *info,MGSL_PARAMS __user *user_params);static int set_params (MGSLPC_INFO *info,MGSL_PARAMS __user *new_params,struct tty_struct *tty);
@@ -2139,7 +2139,7 @@ static int tiocmget(struct tty_struct *tty)/* set modem control signals (DTR/RTS) */ -static int tiocmset (struct tty_struct *tty,struct file *file, +static int tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {MGSLPC_INFO *info = (MGSLPC_INFO *)tty->driver_data;
drivers/char/riscom8.c +2 -2
@@ -1115,8 +1115,8 @@ static int rc_tiocmget(struct tty_struct *tty)return result; } -static int rc_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int rc_tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct riscom_port *port = tty->driver_data;unsigned long flags;
drivers/char/rocket.c +2 -2
@@ -1189,8 +1189,8 @@ static int rp_tiocmget(struct tty_struct *tty)/* * Sets the modem control lines */ -static int rp_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int rp_tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct r_port *info = tty->driver_data;
drivers/char/serial167.c +1 -2
@@ -1331,8 +1331,7 @@ static int cy_tiocmget(struct tty_struct *tty) }/* cy_tiocmget */ static int -cy_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +cy_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct cyclades_port *info = tty->driver_data;int channel;
drivers/char/specialix.c +1 -1
@@ -1778,7 +1778,7 @@ static int sx_tiocmget(struct tty_struct *tty) } -static int sx_tiocmset (struct tty_struct *tty,struct file *file, +static int sx_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct specialix_port *port = tty->driver_data;
drivers/char/stallion.c +1 -1
@@ -1107,7 +1107,7 @@ static int stl_tiocmget(struct tty_struct *tty)return stl_getsignals (portp); } -static int stl_tiocmset (struct tty_struct *tty,struct file *file, +static int stl_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct stlport *portp;
drivers/char/sx.c +2 -2
@@ -1879,8 +1879,8 @@ static int sx_tiocmget(struct tty_struct *tty)return sx_getsignals (port); } -static int sx_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int sx_tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct sx_port *port = tty->driver_data;int rts =-1 , dtr =-1 ;
drivers/char/synclink.c +3 -3
@@ -824,7 +824,7 @@ static isr_dispatch_func UscIsrTable[7] =* ioctl call handlers */ static int tiocmget (struct tty_struct *tty); -static int tiocmset (struct tty_struct *tty,struct file *file, +static int tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static int mgsl_get_stats (struct mgsl_struct * info,struct mgsl_icount __user *user_icount);
@@ -2871,8 +2871,8 @@ static int tiocmget(struct tty_struct *tty)/* set modem control signals (DTR/RTS) */ -static int tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct mgsl_struct *info = tty->driver_data;unsigned long flags;
drivers/char/synclink_gt.c +3 -3
@@ -513,8 +513,8 @@ 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,struct file *file, -unsigned int set,unsigned int clear); +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);
@@ -3223,7 +3223,7 @@ static int tiocmget(struct tty_struct *tty)* TIOCMSET = set/clear signal values * value bit mask for command */ -static int tiocmset (struct tty_struct *tty,struct file *file, +static int tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct slgt_info *info = tty->driver_data;
drivers/char/synclinkmp.c +4 -4
@@ -547,8 +547,8 @@ static int rx_enable(SLMP_INFO *info, int enable);static int modem_input_wait (SLMP_INFO *info,int arg);static int wait_mgsl_event (SLMP_INFO *info,int __user *mask_ptr);static int tiocmget (struct tty_struct *tty); -static int tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear); +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 void add_device (SLMP_INFO *info);
@@ -3232,8 +3232,8 @@ static int tiocmget(struct tty_struct *tty)/* set modem control signals (DTR/RTS) */ -static int tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {SLMP_INFO *info = tty->driver_data;unsigned long flags;
drivers/isdn/gigaset/interface.c +2 -2
@@ -123,7 +123,7 @@ static void if_throttle(struct tty_struct *tty);static void if_unthrottle (struct tty_struct *tty);static void if_set_termios (struct tty_struct *tty,struct ktermios *old);static int if_tiocmget (struct tty_struct *tty); -static int if_tiocmset (struct tty_struct *tty,struct file *file, +static int if_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static int if_write (struct tty_struct *tty,const unsigned char *buf,int count);
@@ -303,7 +303,7 @@ static int if_tiocmget(struct tty_struct *tty)return retval; } -static int if_tiocmset (struct tty_struct *tty,struct file *file, +static int if_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct cardstate *cs;
drivers/isdn/gigaset/ser-gigaset.c +1 -1
@@ -440,7 +440,7 @@ static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state,if (!set && !clear)return 0 ;gig_dbg (DEBUG_IF ,"tiocmset set %x clear %x" , set, clear); -return tty->ops->tiocmset (tty,NULL , set, clear); +return tty->ops->tiocmset (tty, set, clear); }static int gigaset_baud_rate (struct cardstate *cs,unsigned cflag)
drivers/isdn/i4l/isdn_tty.c +1 -1
@@ -1372,7 +1372,7 @@ isdn_tty_tiocmget(struct tty_struct *tty) }static int -isdn_tty_tiocmset (struct tty_struct *tty,struct file *file, +isdn_tty_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {modem_info *info = (modem_info *) tty->driver_data;
drivers/mmc/card/sdio_uart.c +1 -1
@@ -970,7 +970,7 @@ static int sdio_uart_tiocmget(struct tty_struct *tty)return result; } -static int sdio_uart_tiocmset (struct tty_struct *tty,struct file *file, +static int sdio_uart_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct sdio_uart_port *port = tty->driver_data;
drivers/net/irda/irtty-sir.c +1 -1
@@ -167,7 +167,7 @@ static int irtty_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)* let's be careful... Jean II */ IRDA_ASSERT(priv->tty->ops->tiocmset != NULL, return -1;); - priv->tty->ops->tiocmset (priv->tty,NULL , set, clear); + priv->tty->ops->tiocmset (priv->tty, set, clear);return 0 ; }
drivers/net/usb/hso.c +3 -3
@@ -324,7 +324,7 @@ struct hso_device {/* Prototypes */ /*****************************************************************************/ /* Serial driver functions */ -static int hso_serial_tiocmset (struct tty_struct *tty,struct file *file, +static int hso_serial_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static void ctrl_callback (struct urb *urb);static int put_rxbuf_data (struct urb *urb,struct hso_serial *serial);
@@ -1335,7 +1335,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)/* done */ if (result) -hso_serial_tiocmset (tty,NULL ,TIOCM_RTS |TIOCM_DTR ,0 ); +hso_serial_tiocmset (tty,TIOCM_RTS |TIOCM_DTR ,0 ); err_out:mutex_unlock (&serial->parent->mutex);return result;
@@ -1687,7 +1687,7 @@ static int hso_serial_tiocmget(struct tty_struct *tty)return retval; } -static int hso_serial_tiocmset (struct tty_struct *tty,struct file *file, +static int hso_serial_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {int val =0 ;
drivers/net/wan/pc300_tty.c +2 -3
@@ -131,8 +131,7 @@ static void cpc_tty_trace(pc300dev_t *dev, char* buf, int len, char rxtx);static void cpc_tty_signal_off (pc300dev_t *pc300dev,unsigned char );static void cpc_tty_signal_on (pc300dev_t *pc300dev,unsigned char ); -static int pc300_tiocmset (struct tty_struct *,struct file *, -unsigned int ,unsigned int ); +static int pc300_tiocmset (struct tty_struct *,unsigned int ,unsigned int );static int pc300_tiocmget (struct tty_struct *);/* functions called by PC300 driver */
@@ -543,7 +542,7 @@ static int cpc_tty_chars_in_buffer(struct tty_struct *tty)return 0 ; } -static int pc300_tiocmset (struct tty_struct *tty,struct file *file, +static int pc300_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {st_cpc_tty_area *cpc_tty;
drivers/staging/quatech_usb2/quatech_usb2.c +1 -1
@@ -1121,7 +1121,7 @@ static int qt2_tiocmget(struct tty_struct *tty) } } -static int qt2_tiocmset (struct tty_struct *tty,struct file *file, +static int qt2_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/staging/serqt_usb2/serqt_usb2.c +2 -3
@@ -1425,7 +1425,6 @@ static inline int qt_real_tiocmget(struct tty_struct *tty,static inline int qt_real_tiocmset (struct tty_struct *tty,struct usb_serial_port *port, -struct file *file,struct usb_serial *serial,unsigned int value) {
@@ -1486,7 +1485,7 @@ static int qt_tiocmget(struct tty_struct *tty)return retval; } -static int qt_tiocmset (struct tty_struct *tty,struct file *file, +static int qt_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {
@@ -1506,7 +1505,7 @@ static int qt_tiocmset(struct tty_struct *tty, struct file *file,dbg ("%s - port %d\n" , __func__, port->number);dbg ("%s - qt_port->RxHolding = %d\n" , __func__, qt_port->RxHolding); - retval =qt_real_tiocmset (tty, port, file, serial, set); + retval =qt_real_tiocmset (tty, port, serial, set);spin_unlock_irqrestore (&qt_port->lock, flags);return retval;
drivers/tty/hvc/hvsi.c +2 -2
@@ -1103,8 +1103,8 @@ static int hvsi_tiocmget(struct tty_struct *tty)return hp->mctrl; } -static int hvsi_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int hvsi_tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct hvsi_struct *hp = tty->driver_data;unsigned long flags;
drivers/tty/n_gsm.c +1 -1
@@ -2654,7 +2654,7 @@ static int gsmtty_tiocmget(struct tty_struct *tty)return dlci->modem_rx; } -static int gsmtty_tiocmset (struct tty_struct *tty,struct file *filp, +static int gsmtty_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct gsm_dlci *dlci = tty->driver_data;
drivers/tty/serial/68360serial.c +1 -1
@@ -1271,7 +1271,7 @@ static int rs_360_tiocmget(struct tty_struct *tty)return result; } -static int rs_360_tiocmset (struct tty_struct *tty,struct file *file, +static int rs_360_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {#ifdef modem_control
drivers/tty/serial/crisv10.c +1 -2
@@ -3581,8 +3581,7 @@ rs_break(struct tty_struct *tty, int break_state) }static int -rs_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +rs_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct e100_serial *info = (struct e100_serial *)tty->driver_data;unsigned long flags;
drivers/tty/serial/ifx6x60.c +1 -2
@@ -263,7 +263,6 @@ static int ifx_spi_tiocmget(struct tty_struct *tty)/** * ifx_spi_tiocmset - set modem bits * @tty: the tty structure -* @filp: file handle issuing the request * @set: bits to set * @clear: bits to clear *
@@ -272,7 +271,7 @@ static int ifx_spi_tiocmget(struct tty_struct *tty)* * FIXME: do we need to kick the tranfers when we do this ? */ -static int ifx_spi_tiocmset (struct tty_struct *tty,struct file *filp, +static int ifx_spi_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct ifx_spi_device *ifx_dev = tty->driver_data;
drivers/tty/serial/serial_core.c +2 -4
@@ -925,8 +925,7 @@ static int uart_tiocmget(struct tty_struct *tty) }static int -uart_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +uart_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct uart_state *state = tty->driver_data;struct uart_port *uport = state->uart_port;
@@ -934,8 +933,7 @@ uart_tiocmset(struct tty_struct *tty, struct file *file,int ret = -EIO ;mutex_lock (&port->mutex); -if ((!file || !tty_hung_up_p (file)) && - !(tty->flags & (1 <<TTY_IO_ERROR ))) { +if (!(tty->flags & (1 <<TTY_IO_ERROR ))) {uart_update_mctrl (uport, set, clear); ret =0 ; }
drivers/tty/tty_io.c +3 -4
@@ -2481,7 +2481,6 @@ static int tty_tiocmget(struct tty_struct *tty, int __user *p)/** * tty_tiocmset - set modem status * @tty: tty device -* @file: user file pointer * @cmd: command - clear bits, set bits or set all * @p: pointer to desired bits *
@@ -2491,7 +2490,7 @@ static int tty_tiocmget(struct tty_struct *tty, int __user *p)* Locking: none (up to the driver) */ -static int tty_tiocmset (struct tty_struct *tty,struct file *file,unsigned int cmd, +static int tty_tiocmset (struct tty_struct *tty,unsigned int cmd,unsigned __user *p) {int retval;
@@ -2518,7 +2517,7 @@ static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int } set &=TIOCM_DTR |TIOCM_RTS |TIOCM_OUT1 |TIOCM_OUT2 |TIOCM_LOOP ; clear &=TIOCM_DTR |TIOCM_RTS |TIOCM_OUT1 |TIOCM_OUT2 |TIOCM_LOOP ; -return tty->ops->tiocmset (tty, file, set, clear); +return tty->ops->tiocmset (tty, set, clear); }static int tty_tiocgicount (struct tty_struct *tty,void __user *arg)
@@ -2659,7 +2658,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)case TIOCMSET :case TIOCMBIC :case TIOCMBIS : -return tty_tiocmset (tty, file, cmd, p); +return tty_tiocmset (tty, cmd, p);case TIOCGICOUNT : retval =tty_tiocgicount (tty, p);/* For the moment allow fall through to the old method */
drivers/usb/class/cdc-acm.c +1 -1
@@ -791,7 +791,7 @@ static int acm_tty_tiocmget(struct tty_struct *tty)TIOCM_CTS ; } -static int acm_tty_tiocmset (struct tty_struct *tty,struct file *file, +static int acm_tty_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct acm *acm = tty->driver_data;
drivers/usb/serial/ark3116.c +1 -1
@@ -511,7 +511,7 @@ static int ark3116_tiocmget(struct tty_struct *tty) (ctrl &UART_MCR_OUT2 ?TIOCM_OUT2 :0 ); } -static int ark3116_tiocmset (struct tty_struct *tty,struct file *file, +static int ark3116_tiocmset (struct tty_struct *tty,unsigned set,unsigned clr) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/belkin_sa.c +2 -2
@@ -101,7 +101,7 @@ static void belkin_sa_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios * old);static void belkin_sa_break_ctl (struct tty_struct *tty,int break_state);static int belkin_sa_tiocmget (struct tty_struct *tty); -static int belkin_sa_tiocmset (struct tty_struct *tty,struct file *file, +static int belkin_sa_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);
@@ -513,7 +513,7 @@ static int belkin_sa_tiocmget(struct tty_struct *tty)return control_state; } -static int belkin_sa_tiocmset (struct tty_struct *tty,struct file *file, +static int belkin_sa_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/ch341.c +1 -1
@@ -431,7 +431,7 @@ out:kfree (break_reg); } -static int ch341_tiocmset (struct tty_struct *tty,struct file *file, +static int ch341_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/cp210x.c +7 -8
@@ -42,9 +42,8 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,static void cp210x_set_termios (struct tty_struct *,struct usb_serial_port *,struct ktermios *);static int cp210x_tiocmget (struct tty_struct *); -static int cp210x_tiocmset (struct tty_struct *,struct file *, -unsigned int ,unsigned int ); -static int cp210x_tiocmset_port (struct usb_serial_port *port,struct file *, +static int cp210x_tiocmset (struct tty_struct *,unsigned int ,unsigned int ); +static int cp210x_tiocmset_port (struct usb_serial_port *port,unsigned int ,unsigned int );static void cp210x_break_ctl (struct tty_struct *,int );static int cp210x_startup (struct usb_serial *);
@@ -698,14 +697,14 @@ static void cp210x_set_termios(struct tty_struct *tty, } -static int cp210x_tiocmset (struct tty_struct *tty,struct file *file, +static int cp210x_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data; -return cp210x_tiocmset_port (port, file, set, clear); +return cp210x_tiocmset_port (port, set, clear); } -static int cp210x_tiocmset_port (struct usb_serial_port *port,struct file *file, +static int cp210x_tiocmset_port (struct usb_serial_port *port,unsigned int set,unsigned int clear) {unsigned int control =0 ;
@@ -737,9 +736,9 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *file,static void cp210x_dtr_rts (struct usb_serial_port *p,int on) {if (on) -cp210x_tiocmset_port (p,NULL ,TIOCM_DTR |TIOCM_RTS ,0 ); +cp210x_tiocmset_port (p,TIOCM_DTR |TIOCM_RTS ,0 );else -cp210x_tiocmset_port (p,NULL ,0 ,TIOCM_DTR |TIOCM_RTS ); +cp210x_tiocmset_port (p,0 ,TIOCM_DTR |TIOCM_RTS ); }static int cp210x_tiocmget (struct tty_struct *tty)
drivers/usb/serial/cypress_m8.c +2 -2
@@ -174,7 +174,7 @@ static int cypress_ioctl(struct tty_struct *tty, struct file *file,static void cypress_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);static int cypress_tiocmget (struct tty_struct *tty); -static int cypress_tiocmset (struct tty_struct *tty,struct file *file, +static int cypress_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static int cypress_chars_in_buffer (struct tty_struct *tty);static void cypress_throttle (struct tty_struct *tty);
@@ -892,7 +892,7 @@ static int cypress_tiocmget(struct tty_struct *tty) } -static int cypress_tiocmset (struct tty_struct *tty,struct file *file, +static int cypress_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/digi_acceleport.c +5 -5
@@ -446,10 +446,10 @@ static void digi_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old_termios);static void digi_break_ctl (struct tty_struct *tty,int break_state);static int digi_tiocmget (struct tty_struct *tty); -static int digi_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear); +static int digi_tiocmset (struct tty_struct *tty,unsigned int set, +unsigned int clear);static int digi_write (struct tty_struct *tty,struct usb_serial_port *port, -const unsigned char *buf,int count); +const unsigned char *buf,int count);static void digi_write_bulk_callback (struct urb *urb);static int digi_write_room (struct tty_struct *tty);static int digi_chars_in_buffer (struct tty_struct *tty);
@@ -1134,8 +1134,8 @@ static int digi_tiocmget(struct tty_struct *tty) } -static int digi_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int digi_tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;struct digi_port *priv =usb_get_serial_port_data (port);
drivers/usb/serial/ftdi_sio.c +2 -2
@@ -857,7 +857,7 @@ static int ftdi_prepare_write_buffer(struct usb_serial_port *port,static void ftdi_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);static int ftdi_tiocmget (struct tty_struct *tty); -static int ftdi_tiocmset (struct tty_struct *tty,struct file *file, +static int ftdi_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static int ftdi_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg);
@@ -2202,7 +2202,7 @@ out:return ret; } -static int ftdi_tiocmset (struct tty_struct *tty,struct file *file, +static int ftdi_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/io_edgeport.c +2 -2
@@ -220,7 +220,7 @@ static int edge_ioctl(struct tty_struct *tty, struct file *file, 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,struct file *file, +static int edge_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static int edge_get_icount (struct tty_struct *tty,struct serial_icounter_struct *icount);
@@ -1568,7 +1568,7 @@ static int get_lsr_info(struct edgeport_port *edge_port,return 0 ; } -static int edge_tiocmset (struct tty_struct *tty,struct file *file, +static int edge_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/io_ti.c +1 -1
@@ -2444,7 +2444,7 @@ static void edge_set_termios(struct tty_struct *tty,change_port_settings (tty, edge_port, old_termios); } -static int edge_tiocmset (struct tty_struct *tty,struct file *file, +static int edge_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/iuu_phoenix.c +1 -1
@@ -150,7 +150,7 @@ static void iuu_release(struct usb_serial *serial) } } -static int iuu_tiocmset (struct tty_struct *tty,struct file *file, +static int iuu_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/keyspan.c +1 -1
@@ -317,7 +317,7 @@ static int keyspan_tiocmget(struct tty_struct *tty)return value; } -static int keyspan_tiocmset (struct tty_struct *tty,struct file *file, +static int keyspan_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/keyspan.h +1 -1
@@ -60,7 +60,7 @@ 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, -struct file *file,unsigned int set, +unsigned int set,unsigned int clear);static int keyspan_fake_startup (struct usb_serial *serial);
drivers/usb/serial/keyspan_pda.c +1 -1
@@ -478,7 +478,7 @@ static int keyspan_pda_tiocmget(struct tty_struct *tty)return value; } -static int keyspan_pda_tiocmset (struct tty_struct *tty,struct file *file, +static int keyspan_pda_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/kl5kusb105.c +2 -2
@@ -69,7 +69,7 @@ static void klsi_105_close(struct usb_serial_port *port);static void klsi_105_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);static int klsi_105_tiocmget (struct tty_struct *tty); -static int klsi_105_tiocmset (struct tty_struct *tty,struct file *file, +static int klsi_105_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static void klsi_105_process_read_urb (struct urb *urb); static int klsi_105_prepare_write_buffer(struct usb_serial_port *port,
@@ -661,7 +661,7 @@ static int klsi_105_tiocmget(struct tty_struct *tty)return (int )line_state; } -static int klsi_105_tiocmset (struct tty_struct *tty,struct file *file, +static int klsi_105_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {int retval = -EINVAL ;
drivers/usb/serial/kobil_sct.c +2 -2
@@ -78,7 +78,7 @@ static int kobil_write_room(struct tty_struct *tty);static int kobil_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg);static int kobil_tiocmget (struct tty_struct *tty); -static int kobil_tiocmset (struct tty_struct *tty,struct file *file, +static int kobil_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static void kobil_read_int_callback (struct urb *urb);static void kobil_write_callback (struct urb *purb);
@@ -544,7 +544,7 @@ static int kobil_tiocmget(struct tty_struct *tty)return result; } -static int kobil_tiocmset (struct tty_struct *tty,struct file *file, +static int kobil_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/mct_u232.c +2 -2
@@ -102,7 +102,7 @@ static void mct_u232_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old);static void mct_u232_break_ctl (struct tty_struct *tty,int break_state);static int mct_u232_tiocmget (struct tty_struct *tty); -static int mct_u232_tiocmset (struct tty_struct *tty,struct file *file, +static int mct_u232_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static void mct_u232_throttle (struct tty_struct *tty);static void mct_u232_unthrottle (struct tty_struct *tty);
@@ -778,7 +778,7 @@ static int mct_u232_tiocmget(struct tty_struct *tty)return control_state; } -static int mct_u232_tiocmset (struct tty_struct *tty,struct file *file, +static int mct_u232_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/mos7720.c +1 -1
@@ -1858,7 +1858,7 @@ static int mos7720_tiocmget(struct tty_struct *tty)return result; } -static int mos7720_tiocmset (struct tty_struct *tty,struct file *file, +static int mos7720_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/mos7840.c +1 -1
@@ -1674,7 +1674,7 @@ static int mos7840_tiocmget(struct tty_struct *tty)return result; } -static int mos7840_tiocmset (struct tty_struct *tty,struct file *file, +static int mos7840_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/oti6858.c +2 -2
@@ -145,7 +145,7 @@ static int oti6858_write(struct tty_struct *tty, struct usb_serial_port *port,static int oti6858_write_room (struct tty_struct *tty);static int oti6858_chars_in_buffer (struct tty_struct *tty);static int oti6858_tiocmget (struct tty_struct *tty); -static int oti6858_tiocmset (struct tty_struct *tty,struct file *file, +static int oti6858_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static int oti6858_startup (struct usb_serial *serial);static void oti6858_release (struct usb_serial *serial);
@@ -624,7 +624,7 @@ static void oti6858_close(struct usb_serial_port *port)usb_kill_urb (port->interrupt_in_urb); } -static int oti6858_tiocmset (struct tty_struct *tty,struct file *file, +static int oti6858_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/pl2303.c +1 -1
@@ -505,7 +505,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)return 0 ; } -static int pl2303_tiocmset (struct tty_struct *tty,struct file *file, +static int pl2303_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/sierra.c +1 -1
@@ -408,7 +408,7 @@ static int sierra_tiocmget(struct tty_struct *tty)return value; } -static int sierra_tiocmset (struct tty_struct *tty,struct file *file, +static int sierra_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/spcp8x5.c +1 -1
@@ -595,7 +595,7 @@ static int spcp8x5_ioctl(struct tty_struct *tty, struct file *file,return -ENOIOCTLCMD ; } -static int spcp8x5_tiocmset (struct tty_struct *tty,struct file *file, +static int spcp8x5_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/ssu100.c +1 -1
@@ -517,7 +517,7 @@ mget_out:return r; } -static int ssu100_tiocmset (struct tty_struct *tty,struct file *file, +static int ssu100_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/ti_usb_3410_5052.c +3 -3
@@ -113,7 +113,7 @@ static int ti_get_icount(struct tty_struct *tty,static void ti_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old_termios);static int ti_tiocmget (struct tty_struct *tty); -static int ti_tiocmset (struct tty_struct *tty,struct file *file, +static int ti_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static void ti_break (struct tty_struct *tty,int break_state);static void ti_interrupt_callback (struct urb *urb);
@@ -1033,8 +1033,8 @@ static int ti_tiocmget(struct tty_struct *tty) } -static int ti_tiocmset (struct tty_struct *tty,struct file *file, -unsigned int set,unsigned int clear) +static int ti_tiocmset (struct tty_struct *tty, +unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;struct ti_port *tport =usb_get_serial_port_data (port);
drivers/usb/serial/usb-serial.c +2 -2
@@ -507,7 +507,7 @@ static int serial_tiocmget(struct tty_struct *tty)return -EINVAL ; } -static int serial_tiocmset (struct tty_struct *tty,struct file *file, +static int serial_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
@@ -515,7 +515,7 @@ static int serial_tiocmset(struct tty_struct *tty, struct file *file,dbg ("%s - port %d" , __func__, port->number);if (port->serial->type->tiocmset) -return port->serial->type->tiocmset (tty, file, set, clear); +return port->serial->type->tiocmset (tty, set, clear);return -EINVAL ; }
drivers/usb/serial/usb-wwan.h +1 -1
@@ -16,7 +16,7 @@ extern void usb_wwan_set_termios(struct tty_struct *tty,struct usb_serial_port *port, struct ktermios *old);extern int usb_wwan_tiocmget (struct tty_struct *tty); -extern int usb_wwan_tiocmset (struct tty_struct *tty,struct file *file, +extern int usb_wwan_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);extern int usb_wwan_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg);
drivers/usb/serial/usb_wwan.c +1 -1
@@ -98,7 +98,7 @@ int usb_wwan_tiocmget(struct tty_struct *tty) }EXPORT_SYMBOL (usb_wwan_tiocmget); -int usb_wwan_tiocmset (struct tty_struct *tty,struct file *file, +int usb_wwan_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/whiteheat.c +2 -2
@@ -157,7 +157,7 @@ static int whiteheat_ioctl(struct tty_struct *tty, struct file *file,static void whiteheat_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);static int whiteheat_tiocmget (struct tty_struct *tty); -static int whiteheat_tiocmset (struct tty_struct *tty,struct file *file, +static int whiteheat_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);static void whiteheat_break_ctl (struct tty_struct *tty,int break_state);static int whiteheat_chars_in_buffer (struct tty_struct *tty);
@@ -850,7 +850,7 @@ static int whiteheat_tiocmget(struct tty_struct *tty)return modem_signals; } -static int whiteheat_tiocmset (struct tty_struct *tty,struct file *file, +static int whiteheat_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct usb_serial_port *port = tty->driver_data;
include/linux/tty_driver.h +1 -1
@@ -272,7 +272,7 @@ struct tty_operations {void (*wait_until_sent)(struct tty_struct *tty,int timeout);void (*send_xchar)(struct tty_struct *tty,char ch);int (*tiocmget)(struct tty_struct *tty); -int (*tiocmset)(struct tty_struct *tty,struct file *file, +int (*tiocmset)(struct tty_struct *tty,unsigned int set,unsigned int clear);int (*resize)(struct tty_struct *tty,struct winsize *ws);int (*set_termiox)(struct tty_struct *tty,struct termiox *tnew);
include/linux/usb/serial.h +1 -1
@@ -269,7 +269,7 @@ struct usb_serial_driver {void (*throttle)(struct tty_struct *tty);void (*unthrottle)(struct tty_struct *tty);int (*tiocmget)(struct tty_struct *tty); -int (*tiocmset)(struct tty_struct *tty,struct file *file, +int (*tiocmset)(struct tty_struct *tty,unsigned int set,unsigned int clear);int (*get_icount)(struct tty_struct *tty,struct serial_icounter_struct *icount);
include/net/irda/ircomm_tty.h +1 -1
@@ -121,7 +121,7 @@ void ircomm_tty_start(struct tty_struct *tty);void ircomm_tty_check_modem_status (struct ircomm_tty_cb *self);extern int ircomm_tty_tiocmget (struct tty_struct *tty); -extern int ircomm_tty_tiocmset (struct tty_struct *tty,struct file *file, +extern int ircomm_tty_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear);extern int ircomm_tty_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg);
net/bluetooth/rfcomm/tty.c +1 -1
@@ -1098,7 +1098,7 @@ static int rfcomm_tty_tiocmget(struct tty_struct *tty)return dev->modem_status; } -static int rfcomm_tty_tiocmset (struct tty_struct *tty,struct file *filp,unsigned int set,unsigned int clear) +static int rfcomm_tty_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;struct rfcomm_dlc *dlc = dev->dlc;
net/irda/ircomm/ircomm_tty_ioctl.c +2 -2
@@ -214,12 +214,12 @@ int ircomm_tty_tiocmget(struct tty_struct *tty) }/* -* Function ircomm_tty_tiocmset (tty, file, set, clear) +* Function ircomm_tty_tiocmset (tty, set, clear) * * * */ -int ircomm_tty_tiocmset (struct tty_struct *tty,struct file *file, +int ircomm_tty_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear) {struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
Signature · 1 line
1.7.4.1
PATCH 36/76 tty: remove filp from the USB tty ioctls
In reply to Greg Kroah-HartmanFrom: Alan Cox <[email protected]>
We don't use it so we can trim it from here as we try and stamp the file object dependencies out of the serial code.
--- drivers/staging/quatech_usb2/quatech_usb2.c | 2 +- drivers/staging/serqt_usb2/serqt_usb2.c | 2 +- drivers/usb/serial/ark3116.c | 2 +- drivers/usb/serial/ch341.c | 3 +-- drivers/usb/serial/cypress_m8.c | 4 ++-- drivers/usb/serial/ftdi_sio.c | 4 ++-- drivers/usb/serial/io_edgeport.c | 4 ++-- drivers/usb/serial/io_ti.c | 2 +- drivers/usb/serial/kobil_sct.c | 4 ++-- drivers/usb/serial/mos7720.c | 2 +- drivers/usb/serial/mos7840.c | 2 +- drivers/usb/serial/opticon.c | 2 +- drivers/usb/serial/oti6858.c | 4 ++-- drivers/usb/serial/pl2303.c | 2 +- drivers/usb/serial/spcp8x5.c | 2 +- drivers/usb/serial/ssu100.c | 2 +- drivers/usb/serial/ti_usb_3410_5052.c | 4 ++-- drivers/usb/serial/usb-serial.c | 2 +- drivers/usb/serial/usb-wwan.h | 2 +- drivers/usb/serial/usb_wwan.c | 2 +- drivers/usb/serial/whiteheat.c | 4 ++-- include/linux/usb/serial.h | 2 +- 22 files changed, 29 insertions(+), 30 deletions(-)
drivers/staging/quatech_usb2/quatech_usb2.c +1 -1
@@ -852,7 +852,7 @@ static int qt2_chars_in_buffer(struct tty_struct *tty)* TIOCMGET and TIOCMSET are filtered off to their own methods before they get * here, so we don't have to handle them. */ -static int qt2_ioctl (struct tty_struct *tty,struct file *file, +static int qt2_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/staging/serqt_usb2/serqt_usb2.c +1 -1
@@ -1191,7 +1191,7 @@ static int qt_write_room(struct tty_struct *tty) } -static int qt_ioctl (struct tty_struct *tty,struct file *file, +static int qt_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/ark3116.c +1 -1
@@ -431,7 +431,7 @@ static int ark3116_get_icount(struct tty_struct *tty,return 0 ; } -static int ark3116_ioctl (struct tty_struct *tty,struct file *file, +static int ark3116_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/ch341.c +1 -2
@@ -552,8 +552,7 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)return 0 ; } -/*static int ch341_ioctl(struct usb_serial_port *port, struct file *file,*/ -static int ch341_ioctl (struct tty_struct *tty,struct file *file, +static int ch341_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/cypress_m8.c +2 -2
@@ -169,7 +169,7 @@ static int cypress_write(struct tty_struct *tty, struct usb_serial_port *port, const unsigned char *buf, int count);static void cypress_send (struct usb_serial_port *port);static int cypress_write_room (struct tty_struct *tty); -static int cypress_ioctl (struct tty_struct *tty,struct file *file, +static int cypress_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static void cypress_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);
@@ -917,7 +917,7 @@ static int cypress_tiocmset(struct tty_struct *tty, } -static int cypress_ioctl (struct tty_struct *tty,struct file *file, +static int cypress_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/ftdi_sio.c +2 -2
@@ -859,7 +859,7 @@ static void ftdi_set_termios(struct tty_struct *tty,static int ftdi_tiocmget (struct tty_struct *tty);static int ftdi_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear); -static int ftdi_ioctl (struct tty_struct *tty,struct file *file, +static int ftdi_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static void ftdi_break_ctl (struct tty_struct *tty,int break_state);
@@ -2210,7 +2210,7 @@ static int ftdi_tiocmset(struct tty_struct *tty,return update_mctrl (port, set, clear); } -static int ftdi_ioctl (struct tty_struct *tty,struct file *file, +static int ftdi_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/io_edgeport.c +2 -2
@@ -216,7 +216,7 @@ 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,struct file *file, +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);
@@ -1679,7 +1679,7 @@ static int get_serial_info(struct edgeport_port *edge_port,* SerialIoctl * this function handles any ioctl calls to the driver *****************************************************************************/ -static int edge_ioctl (struct tty_struct *tty,struct file *file, +static int edge_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/io_ti.c +1 -1
@@ -2552,7 +2552,7 @@ static int get_serial_info(struct edgeport_port *edge_port,return 0 ; } -static int edge_ioctl (struct tty_struct *tty,struct file *file, +static int edge_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/kobil_sct.c +2 -2
@@ -75,7 +75,7 @@ static void kobil_close(struct usb_serial_port *port);static int kobil_write (struct tty_struct *tty,struct usb_serial_port *port,const unsigned char *buf,int count);static int kobil_write_room (struct tty_struct *tty); -static int kobil_ioctl (struct tty_struct *tty,struct file *file, +static int kobil_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static int kobil_tiocmget (struct tty_struct *tty); static int kobil_tiocmset(struct tty_struct *tty,
@@ -668,7 +668,7 @@ static void kobil_set_termios(struct tty_struct *tty, ); } -static int kobil_ioctl (struct tty_struct *tty,struct file *file, +static int kobil_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/mos7720.c +1 -1
@@ -1987,7 +1987,7 @@ static int get_serial_info(struct moschip_port *mos7720_port,return 0 ; } -static int mos7720_ioctl (struct tty_struct *tty,struct file *file, +static int mos7720_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/mos7840.c +1 -1
@@ -2235,7 +2235,7 @@ static int mos7840_get_icount(struct tty_struct *tty,* this function handles any ioctl calls to the driver *****************************************************************************/ -static int mos7840_ioctl (struct tty_struct *tty,struct file *file, +static int mos7840_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/opticon.c +1 -1
@@ -396,7 +396,7 @@ static int get_serial_info(struct opticon_private *priv,return 0 ; } -static int opticon_ioctl (struct tty_struct *tty,struct file *file, +static int opticon_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/oti6858.c +2 -2
@@ -135,7 +135,7 @@ static void oti6858_close(struct usb_serial_port *port);static void oti6858_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);static void oti6858_init_termios (struct tty_struct *tty); -static int oti6858_ioctl (struct tty_struct *tty,struct file *file, +static int oti6858_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static void oti6858_read_int_callback (struct urb *urb);static void oti6858_read_bulk_callback (struct urb *urb);
@@ -728,7 +728,7 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)return 0 ; } -static int oti6858_ioctl (struct tty_struct *tty,struct file *file, +static int oti6858_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/pl2303.c +1 -1
@@ -606,7 +606,7 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)return 0 ; } -static int pl2303_ioctl (struct tty_struct *tty,struct file *file, +static int pl2303_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct serial_struct ser;
drivers/usb/serial/spcp8x5.c +1 -1
@@ -576,7 +576,7 @@ static int spcp8x5_wait_modem_info(struct usb_serial_port *port,return 0 ; } -static int spcp8x5_ioctl (struct tty_struct *tty,struct file *file, +static int spcp8x5_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/ssu100.c +1 -1
@@ -439,7 +439,7 @@ static int ssu100_get_icount(struct tty_struct *tty, -static int ssu100_ioctl (struct tty_struct *tty,struct file *file, +static int ssu100_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/ti_usb_3410_5052.c +2 -2
@@ -106,7 +106,7 @@ static int ti_write_room(struct tty_struct *tty);static int ti_chars_in_buffer (struct tty_struct *tty);static void ti_throttle (struct tty_struct *tty);static void ti_unthrottle (struct tty_struct *tty); -static int ti_ioctl (struct tty_struct *tty,struct file *file, +static int ti_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static int ti_get_icount (struct tty_struct *tty,struct serial_icounter_struct *icount);
@@ -818,7 +818,7 @@ static int ti_get_icount(struct tty_struct *tty,return 0 ; } -static int ti_ioctl (struct tty_struct *tty,struct file *file, +static int ti_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/usb-serial.c +1 -1
@@ -417,7 +417,7 @@ static int serial_ioctl(struct tty_struct *tty, struct file *file,/* pass on to the driver specific version of this function if it is available */ if (port->serial->type->ioctl) { - retval = port->serial->type->ioctl (tty, file, cmd, arg); + retval = port->serial->type->ioctl (tty, cmd, arg); }else retval = -ENOIOCTLCMD ;return retval;
drivers/usb/serial/usb-wwan.h +1 -1
@@ -18,7 +18,7 @@ extern void usb_wwan_set_termios(struct tty_struct *tty,extern int usb_wwan_tiocmget (struct tty_struct *tty);extern int usb_wwan_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear); -extern int usb_wwan_ioctl (struct tty_struct *tty,struct file *file, +extern int usb_wwan_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);extern int usb_wwan_send_setup (struct usb_serial_port *port); extern int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port,
drivers/usb/serial/usb_wwan.c +1 -1
@@ -178,7 +178,7 @@ static int set_serial_info(struct usb_serial_port *port,return retval; } -int usb_wwan_ioctl (struct tty_struct *tty,struct file *file, +int usb_wwan_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
drivers/usb/serial/whiteheat.c +2 -2
@@ -152,7 +152,7 @@ static int whiteheat_write(struct tty_struct *tty,struct usb_serial_port *port, const unsigned char *buf, int count);static int whiteheat_write_room (struct tty_struct *tty); -static int whiteheat_ioctl (struct tty_struct *tty,struct file *file, +static int whiteheat_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static void whiteheat_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);
@@ -874,7 +874,7 @@ static int whiteheat_tiocmset(struct tty_struct *tty, } -static int whiteheat_ioctl (struct tty_struct *tty,struct file *file, +static int whiteheat_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
include/linux/usb/serial.h +1 -1
@@ -260,7 +260,7 @@ struct usb_serial_driver { const unsigned char *buf, int count);/* Called only by the tty layer */ int (*write_room)(struct tty_struct *tty); -int (*ioctl)(struct tty_struct *tty,struct file *file, +int (*ioctl)(struct tty_struct *tty,unsigned int cmd,unsigned long arg);void (*set_termios)(struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old);
Signature · 1 line
1.7.4.1
PATCH 37/76 tty: now phase out the ioctl file pointer for good
In reply to Greg Kroah-HartmanFrom: Alan Cox <[email protected]>
Only oddities here are a couple of drivers that bogusly called the ldisc helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes away.
--- drivers/char/amiserial.c | 2 +- drivers/char/cyclades.c | 2 +- drivers/char/epca.c | 8 ++++---- drivers/char/ip2/ip2main.c | 4 ++-- drivers/char/isicom.c | 2 +- drivers/char/istallion.c | 4 ++-- drivers/char/moxa.c | 2 +- drivers/char/mxser.c | 2 +- drivers/char/nozomi.c | 2 +- drivers/char/pcmcia/ipwireless/tty.c | 4 ++-- drivers/char/riscom8.c | 2 +- drivers/char/rocket.c | 2 +- drivers/char/ser_a2232.c | 6 +++--- drivers/char/serial167.c | 2 +- drivers/char/specialix.c | 2 +- drivers/char/stallion.c | 5 ++--- drivers/char/sx.c | 2 +- drivers/char/synclink.c | 3 +-- drivers/char/synclink_gt.c | 9 ++++----- drivers/char/synclinkmp.c | 5 ++--- drivers/char/ttyprintk.c | 2 +- drivers/char/vme_scc.c | 4 ++-- drivers/isdn/capi/capi.c | 10 ++-------- drivers/isdn/gigaset/interface.c | 4 ++-- drivers/isdn/i4l/isdn_tty.c | 3 +-- drivers/net/usb/hso.c | 2 +- drivers/tty/n_gsm.c | 2 +- drivers/tty/pty.c | 4 ++-- drivers/tty/serial/68328serial.c | 2 +- drivers/tty/serial/68360serial.c | 2 +- drivers/tty/serial/crisv10.c | 2 +- drivers/tty/serial/serial_core.c | 4 ++-- drivers/tty/tty_io.c | 4 ++-- drivers/tty/vt/vt_ioctl.c | 6 +++--- drivers/usb/class/cdc-acm.c | 2 +- drivers/usb/serial/usb-serial.c | 2 +- include/linux/tty.h | 2 +- include/linux/tty_driver.h | 9 ++++----- include/net/irda/ircomm_tty.h | 2 +- net/bluetooth/rfcomm/tty.c | 2 +- net/irda/ircomm/ircomm_tty_ioctl.c | 4 ++-- 41 files changed, 66 insertions(+), 78 deletions(-)
drivers/char/amiserial.c +1 -1
@@ -1293,7 +1293,7 @@ static int rs_get_icount(struct tty_struct *tty,return 0 ; } -static int rs_ioctl (struct tty_struct *tty,struct file * file, +static int rs_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct async_struct * info = tty->driver_data;
drivers/char/cyclades.c +1 -1
@@ -2680,7 +2680,7 @@ static int cy_cflags_changed(struct cyclades_port *info, unsigned long arg,* not recognized by the driver, it should return ENOIOCTLCMD. */ static int -cy_ioctl (struct tty_struct *tty,struct file *file, +cy_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct cyclades_port *info = tty->driver_data;
drivers/char/epca.c +4 -4
@@ -175,9 +175,9 @@ static unsigned termios2digi_i(struct channel *ch, unsigned);static unsigned termios2digi_c (struct channel *ch,unsigned );static void epcaparam (struct tty_struct *,struct channel *);static void receive_data (struct channel *,struct tty_struct *tty); -static int pc_ioctl (struct tty_struct *,struct file *, +static int pc_ioctl (struct tty_struct *,unsigned int ,unsigned long ); -static int info_ioctl (struct tty_struct *,struct file *, +static int info_ioctl (struct tty_struct *,unsigned int ,unsigned long );static void pc_set_termios (struct tty_struct *,struct ktermios *);static void do_softint (struct work_struct *work);
@@ -1919,7 +1919,7 @@ static void receive_data(struct channel *ch, struct tty_struct *tty)tty_schedule_flip (tty); } -static int info_ioctl (struct tty_struct *tty,struct file *file, +static int info_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {switch (cmd) {
@@ -2057,7 +2057,7 @@ static int pc_tiocmset(struct tty_struct *tty,return 0 ; } -static int pc_ioctl (struct tty_struct *tty,struct file *file, +static int pc_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {digiflow_t dflow;
drivers/char/ip2/ip2main.c +2 -2
@@ -173,7 +173,7 @@ static void ip2_flush_chars(PTTY);static int ip2_write_room (PTTY );static int ip2_chars_in_buf (PTTY );static void ip2_flush_buffer (PTTY ); -static int ip2_ioctl (PTTY ,struct file *,UINT ,ULONG ); +static int ip2_ioctl (PTTY ,UINT ,ULONG );static void ip2_set_termios (PTTY ,struct ktermios *);static void ip2_set_line_discipline (PTTY );static void ip2_throttle (PTTY );
@@ -2127,7 +2127,7 @@ static int ip2_tiocmset(struct tty_struct *tty,/* */ /******************************************************************************/ static int -ip2_ioctl (PTTY tty,struct file *pFile,UINT cmd,ULONG arg ) +ip2_ioctl (PTTY tty,UINT cmd,ULONG arg ) {wait_queue_t wait;i2ChanStrPtr pCh = DevTable[tty->index];
drivers/char/isicom.c +1 -1
@@ -1167,7 +1167,7 @@ static int isicom_get_serial_info(struct isi_port *port,return 0 ; } -static int isicom_ioctl (struct tty_struct *tty,struct file *filp, +static int isicom_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct isi_port *port = tty->driver_data;
drivers/char/istallion.c +2 -2
@@ -603,7 +603,7 @@ static int stli_putchar(struct tty_struct *tty, unsigned char ch);static void stli_flushchars (struct tty_struct *tty);static int stli_writeroom (struct tty_struct *tty);static int stli_charsinbuffer (struct tty_struct *tty); -static int stli_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg); +static int stli_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static void stli_settermios (struct tty_struct *tty,struct ktermios *old);static void stli_throttle (struct tty_struct *tty);static void stli_unthrottle (struct tty_struct *tty);
@@ -1556,7 +1556,7 @@ static int stli_tiocmset(struct tty_struct *tty, sizeof(asysigs_t), 0); } -static int stli_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg) +static int stli_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct stliport *portp;struct stlibrd *brdp;
drivers/char/moxa.c +1 -1
@@ -287,7 +287,7 @@ static void moxa_low_water_check(void __iomem *ofsAddr)* TTY operations */ -static int moxa_ioctl (struct tty_struct *tty,struct file *file, +static int moxa_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct moxa_port *ch = tty->driver_data;
drivers/char/mxser.c +1 -1
@@ -1655,7 +1655,7 @@ static int mxser_cflags_changed(struct mxser_port *info, unsigned long arg,return ret; } -static int mxser_ioctl (struct tty_struct *tty,struct file *file, +static int mxser_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct mxser_port *info = tty->driver_data;
drivers/char/nozomi.c +1 -1
@@ -1824,7 +1824,7 @@ static int ntty_tiocgicount(struct tty_struct *tty,return 0 ; } -static int ntty_ioctl (struct tty_struct *tty,struct file *file, +static int ntty_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct port *port = tty->driver_data;
drivers/char/pcmcia/ipwireless/tty.c +2 -2
@@ -425,7 +425,7 @@ ipw_tiocmset(struct tty_struct *linux_tty,return set_control_lines (tty, set, clear); } -static int ipw_ioctl (struct tty_struct *linux_tty,struct file *file, +static int ipw_ioctl (struct tty_struct *linux_tty,unsigned int cmd,unsigned long arg) {struct ipw_tty *tty = linux_tty->driver_data;
@@ -484,7 +484,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,return tty_perform_flush (linux_tty, arg); } } -return tty_mode_ioctl (linux_tty, file, cmd , arg); +return -ENOIOCTLCMD ; } static int add_tty(int j,
drivers/char/riscom8.c +1 -1
@@ -1236,7 +1236,7 @@ static int rc_get_serial_info(struct riscom_port *port,return copy_to_user (retinfo, &tmp,sizeof (tmp)) ? -EFAULT :0 ; } -static int rc_ioctl (struct tty_struct *tty,struct file *filp, +static int rc_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct riscom_port *port = tty->driver_data;
drivers/char/rocket.c +1 -1
@@ -1326,7 +1326,7 @@ static int get_version(struct r_port *info, struct rocket_version __user *retver }/* IOCTL call handler into the driver */ -static int rp_ioctl (struct tty_struct *tty,struct file *file, +static int rp_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct r_port *info = tty->driver_data;
drivers/char/ser_a2232.c +3 -3
@@ -133,8 +133,8 @@ static void a2232_hungup(void *ptr);/* END GENERIC_SERIAL PROTOTYPES */ /* Functions that the TTY driver struct expects */ -static int a2232_ioctl (struct tty_struct *tty,struct file *file, -unsigned int cmd,unsigned long arg); +static int a2232_ioctl (struct tty_struct *tty, +unsigned int cmd,unsigned long arg);static void a2232_throttle (struct tty_struct *tty);static void a2232_unthrottle (struct tty_struct *tty);static int a2232_open (struct tty_struct * tty,struct file * filp);
@@ -447,7 +447,7 @@ static void a2232_hungup(void *ptr)/*** END OF REAL_DRIVER FUNCTIONS ***/ /*** BEGIN FUNCTIONS EXPECTED BY TTY DRIVER STRUCTS ***/ -static int a2232_ioctl (struct tty_struct *tty,struct file *file, +static int a2232_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {return -ENOIOCTLCMD ;
drivers/char/serial167.c +1 -1
@@ -1492,7 +1492,7 @@ get_default_timeout(struct cyclades_port *info, unsigned long __user * value) }static int -cy_ioctl (struct tty_struct *tty,struct file *file, +cy_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct cyclades_port *info = tty->driver_data;
drivers/char/specialix.c +1 -1
@@ -1928,7 +1928,7 @@ static int sx_get_serial_info(struct specialix_port *port, } -static int sx_ioctl (struct tty_struct *tty,struct file *filp, +static int sx_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct specialix_port *port = tty->driver_data;
drivers/char/stallion.c +2 -3
@@ -1132,14 +1132,13 @@ static int stl_tiocmset(struct tty_struct *tty,return 0 ; } -static int stl_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg) +static int stl_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct stlport *portp;int rc;void __user *argp = (void __user *)arg; -pr_debug ("stl_ioctl(tty=%p,file=%p,cmd=%x,arg=%lx)\n" , tty, file, cmd, - arg); +pr_debug ("stl_ioctl(tty=%p,cmd=%x,arg=%lx)\n" , tty, cmd, arg); portp = tty->driver_data;if (portp ==NULL )
drivers/char/sx.c +1 -1
@@ -1899,7 +1899,7 @@ static int sx_tiocmset(struct tty_struct *tty,return 0 ; } -static int sx_ioctl (struct tty_struct *tty,struct file *filp, +static int sx_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {int rc;
drivers/char/synclink.c +1 -2
@@ -2962,13 +2962,12 @@ static int msgl_get_icount(struct tty_struct *tty,* Arguments: * * tty pointer to tty instance data -* file pointer to associated file object for device * cmd IOCTL command code * arg command argument/context * * Return Value: 0 if success, otherwise error code */ -static int mgsl_ioctl (struct tty_struct *tty,struct file * file, +static int mgsl_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct mgsl_struct * info = tty->driver_data;
drivers/char/synclink_gt.c +4 -5
@@ -154,7 +154,7 @@ 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,struct file *file,unsigned int cmd,unsigned long arg); +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);
@@ -1030,13 +1030,12 @@ static void tx_release(struct tty_struct *tty)* Arguments * * tty pointer to tty instance data -* file pointer to associated file object for device * cmd IOCTL command code * arg command argument/context * * Return 0 if success, otherwise error code */ -static int ioctl (struct tty_struct *tty,struct file *file, +static int ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct slgt_info *info = tty->driver_data;
@@ -1200,7 +1199,7 @@ static long set_params32(struct slgt_info *info, struct MGSL_PARAMS32 __user *nereturn 0 ; } -static long slgt_compat_ioctl (struct tty_struct *tty,struct file *file, +static long slgt_compat_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct slgt_info *info = tty->driver_data;
@@ -1239,7 +1238,7 @@ static long slgt_compat_ioctl(struct tty_struct *tty, struct file *file,case MGSL_IOCSIF :case MGSL_IOCSXSYNC :case MGSL_IOCSXCTRL : - rc =ioctl (tty, file, cmd, arg); + rc =ioctl (tty, cmd, arg);break ; }
drivers/char/synclinkmp.c +2 -3
@@ -520,7 +520,7 @@ 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,struct file *file,unsigned int cmd,unsigned long arg); +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);
@@ -1248,13 +1248,12 @@ static void tx_release(struct tty_struct *tty)* Arguments: * * tty pointer to tty instance data -* file pointer to associated file object for device * cmd IOCTL command code * arg command argument/context * * Return Value: 0 if success, otherwise error code */ -static int ioctl (struct tty_struct *tty,struct file *file, +static int ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {SLMP_INFO *info = tty->driver_data;
drivers/char/ttyprintk.c +1 -1
@@ -144,7 +144,7 @@ static int tpk_write_room(struct tty_struct *tty)/* * TTY operations ioctl function. */ -static int tpk_ioctl (struct tty_struct *tty,struct file *file, +static int tpk_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct ttyprintk_port *tpkp = tty->driver_data;
drivers/char/vme_scc.c +2 -2
@@ -75,7 +75,7 @@ static void scc_hungup(void *ptr);static void scc_close (void *ptr);static int scc_chars_in_buffer (void * ptr);static int scc_open (struct tty_struct * tty,struct file * filp); -static int scc_ioctl (struct tty_struct * tty,struct file * filp, +static int scc_ioctl (struct tty_struct * tty,unsigned int cmd,unsigned long arg);static void scc_throttle (struct tty_struct *tty);static void scc_unthrottle (struct tty_struct *tty);
@@ -1046,7 +1046,7 @@ static void scc_unthrottle (struct tty_struct * tty) } -static int scc_ioctl (struct tty_struct *tty,struct file *file, +static int scc_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {return -ENOIOCTLCMD ;
drivers/isdn/capi/capi.c +2 -8
@@ -1219,16 +1219,10 @@ static int capinc_tty_chars_in_buffer(struct tty_struct *tty)return mp->outbytes; } -static int capinc_tty_ioctl (struct tty_struct *tty,struct file * file, +static int capinc_tty_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) { -int error =0 ; -switch (cmd) { -default : - error =n_tty_ioctl_helper (tty, file, cmd, arg); -break ; - } -return error; +return -ENOIOCTLCMD ; }static void capinc_tty_set_termios (struct tty_struct *tty,struct ktermios * old)
drivers/isdn/gigaset/interface.c +2 -2
@@ -115,7 +115,7 @@ static int if_config(struct cardstate *cs, int *arg)static int if_open (struct tty_struct *tty,struct file *filp);static void if_close (struct tty_struct *tty,struct file *filp); -static int if_ioctl (struct tty_struct *tty,struct file *file, +static int if_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);static int if_write_room (struct tty_struct *tty);static int if_chars_in_buffer (struct tty_struct *tty);
@@ -205,7 +205,7 @@ static void if_close(struct tty_struct *tty, struct file *filp)module_put (cs->driver->owner); } -static int if_ioctl (struct tty_struct *tty,struct file *file, +static int if_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct cardstate *cs;
drivers/isdn/i4l/isdn_tty.c +1 -2
@@ -1413,8 +1413,7 @@ isdn_tty_tiocmset(struct tty_struct *tty, }static int -isdn_tty_ioctl (struct tty_struct *tty,struct file *file, -uint cmd,ulong arg) +isdn_tty_ioctl (struct tty_struct *tty,uint cmd,ulong arg) {modem_info *info = (modem_info *) tty->driver_data;int retval;
drivers/net/usb/hso.c +1 -1
@@ -1730,7 +1730,7 @@ static int hso_serial_tiocmset(struct tty_struct *tty, USB_CTRL_SET_TIMEOUT); } -static int hso_serial_ioctl (struct tty_struct *tty,struct file *file, +static int hso_serial_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct hso_serial *serial =get_serial_by_tty (tty);
drivers/tty/n_gsm.c +1 -1
@@ -2671,7 +2671,7 @@ static int gsmtty_tiocmset(struct tty_struct *tty, } -static int gsmtty_ioctl (struct tty_struct *tty,struct file *filp, +static int gsmtty_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {return -ENOIOCTLCMD ;
drivers/tty/pty.c +2 -2
@@ -334,7 +334,7 @@ free_mem_out:return -ENOMEM ; } -static int pty_bsd_ioctl (struct tty_struct *tty,struct file *file, +static int pty_bsd_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {switch (cmd) {
@@ -489,7 +489,7 @@ static struct ctl_table pty_root_table[] = { }; -static int pty_unix98_ioctl (struct tty_struct *tty,struct file *file, +static int pty_unix98_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {switch (cmd) {
drivers/tty/serial/68328serial.c +1 -1
@@ -945,7 +945,7 @@ static void send_break(struct m68k_serial * info, unsigned int duration)local_irq_restore (flags); } -static int rs_ioctl (struct tty_struct *tty,struct file * file, +static int rs_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {int error;
drivers/tty/serial/68360serial.c +1 -1
@@ -1405,7 +1405,7 @@ static int rs_360_get_icount(struct tty_struct *tty,return 0 ; } -static int rs_360_ioctl (struct tty_struct *tty,struct file * file, +static int rs_360_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {int error;
drivers/tty/serial/crisv10.c +1 -1
@@ -3647,7 +3647,7 @@ rs_tiocmget(struct tty_struct *tty)static int -rs_ioctl (struct tty_struct *tty,struct file * file, +rs_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct e100_serial * info = (struct e100_serial *)tty->driver_data;
drivers/tty/serial/serial_core.c +2 -2
@@ -1099,7 +1099,7 @@ static int uart_get_icount(struct tty_struct *tty,* Called via sys_ioctl. We can use spin_lock_irq() here. */ static int -uart_ioctl (struct tty_struct *tty,struct file *filp,unsigned int cmd, +uart_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct uart_state *state = tty->driver_data;
@@ -1152,7 +1152,7 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,mutex_lock (&port->mutex); -if (tty_hung_up_p (filp)) { +if (tty->flags & (1 <<TTY_IO_ERROR )) { ret = -EIO ; goto out_up; }
drivers/tty/tty_io.c +2 -2
@@ -2676,7 +2676,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)break ; }if (tty->ops->ioctl) { - retval = (tty->ops->ioctl)(tty, file, cmd, arg); + retval = (tty->ops->ioctl)(tty, cmd, arg);if (retval != -ENOIOCTLCMD )return retval; }
@@ -2704,7 +2704,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,return -EINVAL ;if (tty->ops->compat_ioctl) { - retval = (tty->ops->compat_ioctl)(tty, file, cmd, arg); + retval = (tty->ops->compat_ioctl)(tty, cmd, arg);if (retval != -ENOIOCTLCMD )return retval; }
drivers/tty/vt/vt_ioctl.c +3 -3
@@ -495,7 +495,7 @@ do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud, int perm, struct vc_* We handle the console-specific ioctl's here. We allow the * capability to modify any console, not just the fg_console. */ -int vt_ioctl (struct tty_struct *tty,struct file * file, +int vt_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct vc_data *vc = tty->driver_data;
@@ -1495,7 +1495,7 @@ compat_unimap_ioctl(unsigned int cmd, struct compat_unimapdesc __user *user_ud,return 0 ; } -long vt_compat_ioctl (struct tty_struct *tty,struct file * file, +long vt_compat_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct vc_data *vc = tty->driver_data;
@@ -1581,7 +1581,7 @@ out: fallback:tty_unlock (); -return vt_ioctl (tty, file, cmd, arg); +return vt_ioctl (tty, cmd, arg); }
drivers/usb/class/cdc-acm.c +1 -1
@@ -813,7 +813,7 @@ static int acm_tty_tiocmset(struct tty_struct *tty,return acm_set_control (acm, acm->ctrlout = newctrl); } -static int acm_tty_ioctl (struct tty_struct *tty,struct file *file, +static int acm_tty_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct acm *acm = tty->driver_data;
drivers/usb/serial/usb-serial.c +1 -1
@@ -406,7 +406,7 @@ static void serial_unthrottle(struct tty_struct *tty) port->serial->type->unthrottle (tty); } -static int serial_ioctl (struct tty_struct *tty,struct file *file, +static int serial_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct usb_serial_port *port = tty->driver_data;
include/linux/tty.h +1 -1
@@ -584,7 +584,7 @@ extern int pcxe_open(struct tty_struct *tty, struct file *filp);/* vt.c */ -extern int vt_ioctl (struct tty_struct *tty,struct file *file, +extern int vt_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg); extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file,
include/linux/tty_driver.h +4 -5
@@ -98,8 +98,7 @@* * Note: Do not call this function directly, call tty_write_room * -* int (*ioctl)(struct tty_struct *tty, struct file * file, -* unsigned int cmd, unsigned long arg); +* int (*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg); * * This routine allows the tty driver to implement * device-specific ioctls. If the ioctl number passed in cmd
@@ -107,7 +106,7 @@* * Optional * -* long (*compat_ioctl)(struct tty_struct *tty, struct file * file, +* long (*compat_ioctl)(struct tty_struct *tty,, * unsigned int cmd, unsigned long arg); * * implement ioctl processing for 32 bit process on 64 bit system
@@ -256,9 +255,9 @@ struct tty_operations {void (*flush_chars)(struct tty_struct *tty);int (*write_room)(struct tty_struct *tty);int (*chars_in_buffer)(struct tty_struct *tty); -int (*ioctl)(struct tty_struct *tty,struct file * file, +int (*ioctl)(struct tty_struct *tty,unsigned int cmd,unsigned long arg); -long (*compat_ioctl)(struct tty_struct *tty,struct file * file, +long (*compat_ioctl)(struct tty_struct *tty,unsigned int cmd,unsigned long arg);void (*set_termios)(struct tty_struct *tty,struct ktermios * old);void (*throttle)(struct tty_struct * tty);
include/net/irda/ircomm_tty.h +1 -1
@@ -123,7 +123,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self);extern int ircomm_tty_tiocmget (struct tty_struct *tty);extern int ircomm_tty_tiocmset (struct tty_struct *tty,unsigned int set,unsigned int clear); -extern int ircomm_tty_ioctl (struct tty_struct *tty,struct file *file, +extern int ircomm_tty_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);extern void ircomm_tty_set_termios (struct tty_struct *tty,struct ktermios *old_termios);
net/bluetooth/rfcomm/tty.c +1 -1
@@ -830,7 +830,7 @@ static int rfcomm_tty_write_room(struct tty_struct *tty)return room; } -static int rfcomm_tty_ioctl (struct tty_struct *tty,struct file *filp,unsigned int cmd,unsigned long arg) +static int rfcomm_tty_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {BT_DBG ("tty %p cmd 0x%02x" , tty, cmd);
net/irda/ircomm/ircomm_tty_ioctl.c +2 -2
@@ -365,12 +365,12 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, }/* -* Function ircomm_tty_ioctl (tty, file, cmd, arg) +* Function ircomm_tty_ioctl (tty, cmd, arg) * * * */ -int ircomm_tty_ioctl (struct tty_struct *tty,struct file *file, +int ircomm_tty_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
Signature · 1 line
1.7.4.1
PATCH 38/76 tty: fix build error in vt_ioctl.c if CONFIG_COMPAT is enabled
In reply to Greg Kroah-HartmanThis was caused by the previous patch to remove the file pointer from the tty ioctl handler.
--- include/linux/tty.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/tty.h +1 -1
@@ -587,7 +587,7 @@ extern int pcxe_open(struct tty_struct *tty, struct file *filp);extern int vt_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg); -extern long vt_compat_ioctl (struct tty_struct *tty,struct file * file, +extern long vt_compat_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg);/* tty_mutex.c */
Signature · 1 line
1.7.4.1
PATCH 39/76 tty: add a helper for setting termios data from kernel side
In reply to Greg Kroah-HartmanFrom: Alan Cox <[email protected]>
This basically encapsulates the small bit of locking knowledge needed. While we are at it make sure we blow up on any more abusers and unsafe misuses of ioctl for this kind of stuff.
We change the function to return an argument as at some point it needs to honour the POSIX 'I asked for changes but got none of them' error reporting corner case.
--- drivers/tty/tty_ioctl.c | 14 +++++++++----- include/linux/tty.h | 1 + 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/tty/tty_ioctl.c +9 -5
@@ -486,7 +486,7 @@ int tty_termios_hw_change(struct ktermios *a, struct ktermios *b)EXPORT_SYMBOL (tty_termios_hw_change);/** -* change_termios - update termios values +* tty_set_termios - update termios values * @tty: tty to update * @new_termios: desired new value *
@@ -497,7 +497,7 @@ EXPORT_SYMBOL(tty_termios_hw_change);* Locking: termios_mutex */ -static void change_termios (struct tty_struct *tty,struct ktermios *new_termios) +int tty_set_termios (struct tty_struct *tty,struct ktermios *new_termios) {struct ktermios old_termios;struct tty_ldisc *ld;
@@ -553,7 +553,9 @@ static void change_termios(struct tty_struct *tty, struct ktermios *new_termios)tty_ldisc_deref (ld); }mutex_unlock (&tty->termios_mutex); +return 0 ; } +EXPORT_SYMBOL_GPL (tty_set_termios);/** * set_termios - set termios values for a tty
@@ -562,7 +564,7 @@ static void change_termios(struct tty_struct *tty, struct ktermios *new_termios)* @opt: option information * * Helper function to prepare termios data and run necessary other -* functions before using change_termios to do the actual changes. +* functions before using tty_set_termios to do the actual changes. * * Locking: * Called functions take ldisc and termios_mutex locks
@@ -620,7 +622,7 @@ static int set_termios(struct tty_struct *tty, void __user *arg, int opt)return -EINTR ; } -change_termios (tty, &tmp_termios); +tty_set_termios (tty, &tmp_termios);/* FIXME: Arguably if tmp_termios == tty->termios AND the actual requested termios was not tmp_termios then we may
@@ -797,7 +799,7 @@ static int set_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb) termios.c_ospeed);#endif mutex_unlock (&tty->termios_mutex); -change_termios (tty, &termios); +tty_set_termios (tty, &termios); return 0; }#endif
@@ -951,6 +953,8 @@ int tty_mode_ioctl(struct tty_struct *tty, struct file *file,int ret =0 ;struct ktermios kterm; +BUG_ON (file ==NULL ); +if (tty->driver->type ==TTY_DRIVER_TYPE_PTY && tty->driver->subtype ==PTY_TYPE_MASTER ) real_tty = tty->link;
include/linux/tty.h +1 -0
@@ -448,6 +448,7 @@ extern void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud);extern void tty_termios_copy_hw (struct ktermios *new,struct ktermios *old);extern int tty_termios_hw_change (struct ktermios *a,struct ktermios *b); +extern int tty_set_termios (struct tty_struct *tty,struct ktermios *kt);extern struct tty_ldisc *tty_ldisc_ref (struct tty_struct *);extern void tty_ldisc_deref (struct tty_ldisc *);
Signature · 1 line
1.7.4.1
PATCH 40/76 hci_ath: Fix the mess in this driver
In reply to Greg Kroah-HartmanFrom: Alan Cox <[email protected]>
Was this exploitable - who knows, but it was certainly totally broken
--- drivers/bluetooth/hci_ath.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)
drivers/bluetooth/hci_ath.c +13 -13
@@ -51,32 +51,32 @@ struct ath_struct {static int ath_wakeup_ar3k (struct tty_struct *tty) { -struct termios settings; -int status = tty->driver->ops->tiocmget (tty,NULL ); +struct ktermios ktermios; +int status = tty->driver->ops->tiocmget (tty);if (status &TIOCM_CTS )return status;/* Disable Automatic RTSCTS */ -n_tty_ioctl_helper (tty,NULL ,TCGETS , (unsigned long )&settings); - settings.c_cflag &= ~CRTSCTS ; -n_tty_ioctl_helper (tty,NULL ,TCSETS , (unsigned long )&settings); +memcpy (&ktermios, tty->termios,sizeof (ktermios)); + ktermios.c_cflag &= ~CRTSCTS ; +tty_set_termios (tty, &ktermios);/* Clear RTS first */ - status = tty->driver->ops->tiocmget (tty,NULL ); - tty->driver->ops->tiocmset (tty,NULL ,0x00 ,TIOCM_RTS ); + status = tty->driver->ops->tiocmget (tty); + tty->driver->ops->tiocmset (tty,0x00 ,TIOCM_RTS );mdelay (20 );/* Set RTS, wake up board */ - status = tty->driver->ops->tiocmget (tty,NULL ); - tty->driver->ops->tiocmset (tty,NULL ,TIOCM_RTS ,0x00 ); + status = tty->driver->ops->tiocmget (tty); + tty->driver->ops->tiocmset (tty,TIOCM_RTS ,0x00 );mdelay (20 ); - status = tty->driver->ops->tiocmget (tty,NULL ); + status = tty->driver->ops->tiocmget (tty); -n_tty_ioctl_helper (tty,NULL ,TCGETS , (unsigned long )&settings); - settings.c_cflag |=CRTSCTS ; -n_tty_ioctl_helper (tty,NULL ,TCSETS , (unsigned long )&settings); +/* Disable Automatic RTSCTS */ + ktermios.c_cflag |=CRTSCTS ; + status =tty_set_termios (tty, &ktermios);return status; }
Signature · 1 line
1.7.4.1
PATCH 41/76 tty: add TIOCVHANGUP to allow clean tty shutdown of all ttys
In reply to Greg Kroah-HartmanFrom: Kay Sievers <[email protected]>
This is useful for system management software so that it can kick off things like gettys and everything that's started from a tty, before we reuse it from/for something else or shut it down.
Without this ioctl it would have to temporarily become the owner of the tty, then call vhangup() and then give it up again.
--- arch/alpha/include/asm/ioctls.h | 1 + arch/mips/include/asm/ioctls.h | 1 + arch/parisc/include/asm/ioctls.h | 1 + arch/powerpc/include/asm/ioctls.h | 1 + arch/sh/include/asm/ioctls.h | 1 + arch/sparc/include/asm/ioctls.h | 1 + arch/xtensa/include/asm/ioctls.h | 1 + drivers/tty/tty_io.c | 5 +++++ include/asm-generic/ioctls.h | 1 + 9 files changed, 13 insertions(+), 0 deletions(-)
arch/alpha/include/asm/ioctls.h +1 -0
@@ -94,6 +94,7 @@#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ #define TIOCGDEV _IOR('T',0x32, unsigned int)/* Get primary device node of /dev/console */ #define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ +#define TIOCVHANGUP 0x5437#define TIOCSERCONFIG 0x5453#define TIOCSERGWILD 0x5454
arch/mips/include/asm/ioctls.h +1 -0
@@ -85,6 +85,7 @@#define TIOCSPTLCK _IOW('T', 0x31, int)/* Lock/unlock Pty */ #define TIOCGDEV _IOR('T', 0x32, unsigned int)/* Get primary device node of /dev/console */ #define TIOCSIG _IOW('T', 0x36, int)/* Generate signal on Pty slave */ +#define TIOCVHANGUP 0x5437/* I hope the range from 0x5480 on is free ... */ #define TIOCSCTTY 0x5480/* become controlling tty */
arch/parisc/include/asm/ioctls.h +1 -0
@@ -54,6 +54,7 @@#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ #define TIOCGDEV _IOR('T',0x32, int)/* Get primary device node of /dev/console */ #define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ +#define TIOCVHANGUP 0x5437#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ #define FIOCLEX 0x5451
arch/powerpc/include/asm/ioctls.h +1 -0
@@ -96,6 +96,7 @@#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ #define TIOCGDEV _IOR('T',0x32, unsigned int)/* Get primary device node of /dev/console */ #define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ +#define TIOCVHANGUP 0x5437#define TIOCSERCONFIG 0x5453#define TIOCSERGWILD 0x5454
arch/sh/include/asm/ioctls.h +1 -0
@@ -87,6 +87,7 @@#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ #define TIOCGDEV _IOR('T',0x32, unsigned int)/* Get primary device node of /dev/console */ #define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ +#define TIOCVHANGUP _IO('T', 0x37)#define TIOCSERCONFIG _IO('T', 83)/* 0x5453 */ #define TIOCSERGWILD _IOR('T', 84, int)/* 0x5454 */
arch/sparc/include/asm/ioctls.h +1 -0
@@ -20,6 +20,7 @@#define TCSETSW2 _IOW('T', 14, struct termios2)#define TCSETSF2 _IOW('T', 15, struct termios2)#define TIOCGDEV _IOR('T',0x32, unsigned int)/* Get primary device node of /dev/console */ +#define TIOCVHANGUP _IO('T', 0x37)/* Note that all the ioctls that are not available in Linux have a * double underscore on the front to: a) avoid some programs to
arch/xtensa/include/asm/ioctls.h +1 -0
@@ -100,6 +100,7 @@#define TIOCSPTLCK _IOW('T',0x31, int)/* Lock/unlock Pty */ #define TIOCGDEV _IOR('T',0x32, unsigned int)/* Get primary device node of /dev/console */ #define TIOCSIG _IOW('T',0x36, int)/* Generate signal on Pty slave */ +#define TIOCVHANGUP _IO('T', 0x37)#define TIOCSERCONFIG _IO('T', 83)#define TIOCSERGWILD _IOR('T', 84, int)
drivers/tty/tty_io.c +5 -0
@@ -2626,6 +2626,11 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return put_user (tty->ldisc->ops->num, (int __user *)p);case TIOCSETD :return tiocsetd (tty, p); +case TIOCVHANGUP : +if (!capable (CAP_SYS_ADMIN )) +return -EPERM ; +tty_vhangup (tty); +return 0 ;case TIOCGDEV : {unsigned int ret =new_encode_dev (tty_devnum (real_tty));
include/asm-generic/ioctls.h +1 -0
@@ -73,6 +73,7 @@#define TCSETXF 0x5434#define TCSETXW 0x5435#define TIOCSIG _IOW('T', 0x36, int)/* pty: generate signal */ +#define TIOCVHANGUP 0x5437#define FIONCLEX 0x5450#define FIOCLEX 0x5451
Signature · 1 line
1.7.4.1
PATCH 42/76 tty: move Kconfig entries into drivers/tty from drivers/char
In reply to Greg Kroah-HartmanThe Kconfig options for the drivers/tty/ files still were hanging around in the "big" drivers/char/Kconfig file, so move them to the proper location under drivers/tty and drivers/tty/hvc/
--- drivers/char/Kconfig | 254 +---------------------------------------------- drivers/tty/Kconfig | 150 ++++++++++++++++++++++++++++ drivers/tty/hvc/Kconfig | 105 +++++++++++++++++++ 3 files changed, 257 insertions(+), 252 deletions(-) create mode 100644 drivers/tty/Kconfig create mode 100644 drivers/tty/hvc/Kconfig
drivers/char/Kconfig +2 -252
@@ -4,89 +4,7 @@ menu "Character devices" -config VT - bool "Virtual terminal" if EXPERT - depends on !S390 - select INPUT - default y - ---help--- - If you say Y here, you will get support for terminal devices with - display and keyboard devices. These are called "virtual" because you - can run several virtual terminals (also called virtual consoles) on - one physical terminal. This is rather useful, for example one - virtual terminal can collect system messages and warnings, another - one can be used for a text-mode user session, and a third could run - an X session, all in parallel. Switching between virtual terminals - is done with certain key combinations, usually Alt-<function key>. - - The setterm command ("man setterm") can be used to change the - properties (such as colors or beeping) of a virtual terminal. The - man page console_codes(4) ("man console_codes") contains the special - character sequences that can be used to change those properties - directly. The fonts used on virtual terminals can be changed with - the setfont ("man setfont") command and the key bindings are defined - with the loadkeys ("man loadkeys") command. - - You need at least one virtual terminal device in order to make use - of your keyboard and monitor. Therefore, only people configuring an - embedded system would want to say N here in order to save some - memory; the only way to log into such a system is then via a serial - or network connection. - - If unsure, say Y, or else you won't be able to do much with your new - shiny Linux system :-) - -config CONSOLE_TRANSLATIONS - depends on VT - default y - bool "Enable character translations in console" if EXPERT - ---help--- - This enables support for font mapping and Unicode translation - on virtual consoles. - -config VT_CONSOLE - bool "Support for console on virtual terminal" if EXPERT - depends on VT - default y - ---help--- - The system console is the device which receives all kernel messages - and warnings and which allows logins in single user mode. If you - answer Y here, a virtual terminal (the device used to interact with - a physical terminal) can be used as system console. This is the most - common mode of operations, so you should say Y here unless you want - the kernel messages be output only to a serial port (in which case - you should say Y to "Console on serial port", below). - - If you do say Y here, by default the currently visible virtual - terminal (/dev/tty0) will be used as system console. You can change - that with a kernel command line option such as "console=tty3" which - would use the third virtual terminal as system console. (Try "man - bootparam" or see the documentation of your boot loader (lilo or - loadlin) about how to pass options to the kernel at boot time.) - - If unsure, say Y. - -config HW_CONSOLE - bool - depends on VT && !S390 && !UML - default y - -config VT_HW_CONSOLE_BINDING - bool "Support for binding and unbinding console drivers" - depends on HW_CONSOLE - default n - ---help--- - The virtual terminal is the device that interacts with the physical - terminal through console drivers. On these systems, at least one - console driver is loaded. In other configurations, additional console - drivers may be enabled, such as the framebuffer console. If more than - 1 console driver is enabled, setting this to 'y' will allow you to - select the console driver that will serve as the backend for the - virtual terminals. - - See <file:Documentation/console/console.txt> for more - information. For framebuffer console users, please refer to - <file:Documentation/fb/fbcon.txt>. +source "drivers/tty/Kconfig" config DEVKMEM bool "/dev/kmem virtual device support"
@@ -428,71 +346,6 @@ config SGI_MBCS source "drivers/tty/serial/Kconfig" -config UNIX98_PTYS - bool "Unix98 PTY support" if EXPERT - default y - ---help--- - A pseudo terminal (PTY) is a software device consisting of two - halves: a master and a slave. The slave device behaves identical to - a physical terminal; the master device is used by a process to - read data from and write data to the slave, thereby emulating a - terminal. Typical programs for the master side are telnet servers - and xterms. - - Linux has traditionally used the BSD-like names /dev/ptyxx for - masters and /dev/ttyxx for slaves of pseudo terminals. This scheme - has a number of problems. The GNU C library glibc 2.1 and later, - however, supports the Unix98 naming standard: in order to acquire a - pseudo terminal, a process opens /dev/ptmx; the number of the pseudo - terminal is then made available to the process and the pseudo - terminal slave can be accessed as /dev/pts/<number>. What was - traditionally /dev/ttyp2 will then be /dev/pts/2, for example. - - All modern Linux systems use the Unix98 ptys. Say Y unless - you're on an embedded system and want to conserve memory. - -config DEVPTS_MULTIPLE_INSTANCES - bool "Support multiple instances of devpts" - depends on UNIX98_PTYS - default n - ---help--- - Enable support for multiple instances of devpts filesystem. - If you want to have isolated PTY namespaces (eg: in containers), - say Y here. Otherwise, say N. If enabled, each mount of devpts - filesystem with the '-o newinstance' option will create an - independent PTY namespace. - -config LEGACY_PTYS - bool "Legacy (BSD) PTY support" - default y - ---help--- - A pseudo terminal (PTY) is a software device consisting of two - halves: a master and a slave. The slave device behaves identical to - a physical terminal; the master device is used by a process to - read data from and write data to the slave, thereby emulating a - terminal. Typical programs for the master side are telnet servers - and xterms. - - Linux has traditionally used the BSD-like names /dev/ptyxx - for masters and /dev/ttyxx for slaves of pseudo - terminals. This scheme has a number of problems, including - security. This option enables these legacy devices; on most - systems, it is safe to say N. - - -config LEGACY_PTY_COUNT - int "Maximum number of legacy PTY in use" - depends on LEGACY_PTYS - range 0 256 - default "256" - ---help--- - The maximum number of legacy PTYs that can be used at any one time. - The default is 256, and should be more than enough. Embedded - systems may want to reduce this to save memory. - - When not in use, each legacy PTY occupies 12 bytes on 32-bit - architectures and 24 bytes on 64-bit architectures. - config TTY_PRINTK bool "TTY driver to output user messages via printk" depends on EXPERT
@@ -612,93 +465,7 @@ config PPDEV If unsure, say N. -config HVC_DRIVER - bool - help - Generic "hypervisor virtual console" infrastructure for various - hypervisors (pSeries, iSeries, Xen, lguest). - It will automatically be selected if one of the back-end console drivers - is selected. - -config HVC_IRQ - bool - -config HVC_CONSOLE - bool "pSeries Hypervisor Virtual Console support" - depends on PPC_PSERIES - select HVC_DRIVER - select HVC_IRQ - help - pSeries machines when partitioned support a hypervisor virtual - console. This driver allows each pSeries partition to have a console - which is accessed via the HMC. - -config HVC_ISERIES - bool "iSeries Hypervisor Virtual Console support" - depends on PPC_ISERIES - default y - select HVC_DRIVER - select HVC_IRQ - select VIOPATH - help - iSeries machines support a hypervisor virtual console. - -config HVC_RTAS - bool "IBM RTAS Console support" - depends on PPC_RTAS - select HVC_DRIVER - help - IBM Console device driver which makes use of RTAS - -config HVC_BEAT - bool "Toshiba's Beat Hypervisor Console support" - depends on PPC_CELLEB - select HVC_DRIVER - help - Toshiba's Cell Reference Set Beat Console device driver - -config HVC_IUCV - bool "z/VM IUCV Hypervisor console support (VM only)" - depends on S390 - select HVC_DRIVER - select IUCV - default y - help - This driver provides a Hypervisor console (HVC) back-end to access - a Linux (console) terminal via a z/VM IUCV communication path. - -config HVC_XEN - bool "Xen Hypervisor Console support" - depends on XEN - select HVC_DRIVER - select HVC_IRQ - default y - help - Xen virtual console device driver - -config HVC_UDBG - bool "udbg based fake hypervisor console" - depends on PPC && EXPERIMENTAL - select HVC_DRIVER - default n - -config HVC_DCC - bool "ARM JTAG DCC console" - depends on ARM - select HVC_DRIVER - help - This console uses the JTAG DCC on ARM to create a console under the HVC - driver. This console is used through a JTAG only on ARM. If you don't have - a JTAG then you probably don't want this option. - -config HVC_BFIN_JTAG - bool "Blackfin JTAG console" - depends on BLACKFIN - select HVC_DRIVER - help - This console uses the Blackfin JTAG to create a console under the - the HVC driver. If you don't have JTAG, then you probably don't - want this option. +source "drivers/tty/hvc/Kconfig" config VIRTIO_CONSOLE tristate "Virtio console"
@@ -716,23 +483,6 @@ config VIRTIO_CONSOLE the port which can be used by udev scripts to create a symlink to the device. -config HVCS - tristate "IBM Hypervisor Virtual Console Server support" - depends on PPC_PSERIES && HVC_CONSOLE - help - Partitionable IBM Power5 ppc64 machines allow hosting of - firmware virtual consoles from one Linux partition by - another Linux partition. This driver allows console data - from Linux partitions to be accessed through TTY device - interfaces in the device tree of a Linux partition running - this driver. - - To compile this driver as a module, choose M here: the - module will be called hvcs. Additionally, this module - will depend on arch specific APIs exported from hvcserver.ko - which will also be compiled when this driver is built as a - module. - config IBM_BSR tristate "IBM POWER Barrier Synchronization Register support" depends on PPC_PSERIES
drivers/tty/Kconfig new file +150 -0
150 lines not on this page · raw message
drivers/tty/hvc/Kconfig new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 43/76 tty: simserial: now phase out the ioctl file pointer for good
In reply to Greg Kroah-HartmanFrom: Luck, Tony <[email protected]>
Alan missed the ia64 simulator serial driver (because it was hidden in arch/... rather than located under drivers/... where one might expect to find a driver). Drop the "file *" argument from rs_ioctl() in arch/ia64/hp/sim/simserial.c
--- arch/ia64/hp/sim/simserial.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
arch/ia64/hp/sim/simserial.c +1 -2
@@ -390,8 +390,7 @@ static void rs_unthrottle(struct tty_struct * tty) } -static int rs_ioctl (struct tty_struct *tty,struct file * file, -unsigned int cmd,unsigned long arg) +static int rs_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) { if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
Signature · 1 line
1.7.4.1
PATCH 44/76 serial: mfd: remove the TX full-empty interrupts workaround
In reply to Greg Kroah-HartmanFrom: Feng Tang <[email protected]>
In A0 stepping, TX half-empty interrupt is not working, so have to use the full-empty interrupts whose performance will be 15% lower. Now re-enable the half-empty interrrupt after it is enabled in silicon.
--- drivers/tty/serial/mfd.c | 26 +++++--------------------- 1 files changed, 5 insertions(+), 21 deletions(-)
drivers/tty/serial/mfd.c +5 -21
@@ -16,9 +16,7 @@* 2/3 chan to port 1, 4/5 chan to port 3. Even number chans * are used for RX, odd chans for TX * -* 2. In A0 stepping, UART will not support TX half empty flag -* -* 3. The RI/DSR/DCD/DTR are not pinned out, DCD & DSR are always +* 2. The RI/DSR/DCD/DTR are not pinned out, DCD & DSR are always * asserted, only when the HW is reset the DDCD and DDSR will * be triggered */
@@ -41,8 +39,6 @@#include <linux/io.h> #include <linux/debugfs.h> -#define MFD_HSU_A0_STEPPING 1 -#define HSU_DMA_BUF_SIZE 2048#define chan_readl (chan, offset) readl(chan->reg + offset)
@@ -543,16 +539,9 @@ static void transmit_chars(struct uart_hsu_port *up)return ; } -#ifndef MFD_HSU_A0_STEPPING +/* The IRQ is for TX FIFO half-empty */ count = up->port.fifosize /2 ; -#else -/* -* A0 only supports fully empty IRQ, and the first char written -* into it won't clear the EMPT bit, so we may need be cautious -* by useing a shorter buffer -*/ - count = up->port.fifosize -4 ; -#endif + do { serial_out(up, UART_TX, xmit->buf[xmit->tail]); xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
@@ -761,9 +750,8 @@ static void serial_hsu_break_ctl(struct uart_port *port, int break_state)/* * What special to do: * 1. chose the 64B fifo mode -* 2. make sure not to select half empty mode for A0 stepping -* 3. start dma or pio depends on configuration -* 4. we only allocate dma memory when needed +* 2. start dma or pio depends on configuration +* 3. we only allocate dma memory when needed */ static int serial_hsu_startup (struct uart_port *port) {
@@ -967,10 +955,6 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios, fcr =UART_FCR_ENABLE_FIFO |UART_FCR_HSU_64_32B ; fcr |=UART_FCR_HSU_64B_FIFO ; -#ifdef MFD_HSU_A0_STEPPING -/* A0 doesn't support half empty IRQ */ - fcr |=UART_FCR_FULL_EMPT_TXI ; -#endif /* * Ok, we're now changing the port state. Do it with
Signature · 1 line
1.7.4.1
PATCH 45/76 serial: mfd: add a module parameter for setting each port's working mode
In reply to Greg Kroah-HartmanFrom: Feng Tang <[email protected]>
The three identical uart ports can work either in DMA or PIO mode. Adding such a module parameter "hsu_dma_enable" will enable user to chose working modes for each port. If the mfd driver is built in kernel, adding a "mfd.hsu_dma_enable=x" in kernel command line has the same effect.
--- drivers/tty/serial/mfd.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
drivers/tty/serial/mfd.c +11 -0
@@ -47,6 +47,11 @@#define mfd_readl (obj, offset) readl(obj->reg + offset)#define mfd_writel (obj, offset, val) writel(val, obj->reg + offset) +static int hsu_dma_enable; +module_param (hsu_dma_enable, int,0 ); +MODULE_PARM_DESC (hsu_dma_enable,"It is a bitmap to set working mode, if \ +bit[x] is 1, then port[x] will work in DMA mode, otherwise in PIO mode." ); +struct hsu_dma_buffer {u8 *buf;dma_addr_t dma_addr;
@@ -1367,6 +1372,12 @@ static void hsu_global_init(void) serial_hsu_ports[i] = uport; uport->index = i; + +if (hsu_dma_enable & (1 <<i)) + uport->use_dma =1 ; +else + uport->use_dma =0 ; + uport++; }
Signature · 1 line
1.7.4.1
PATCH 46/76 tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer
In reply to Greg Kroah-HartmanFrom: Tobias Klauser <[email protected]>
This fixes a sparse warning.
--- drivers/tty/serial/altera_jtaguart.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/serial/altera_jtaguart.c +1 -1
@@ -384,7 +384,7 @@ static int __init altera_jtaguart_console_setup(struct console *co,if (co->index <0 || co->index >=ALTERA_JTAGUART_MAXPORTS )return -EINVAL ; port = &altera_jtaguart_ports[co->index].port; -if (port->membase ==0 ) +if (port->membase ==NULL )return -ENODEV ;return 0 ; }
Signature · 1 line
1.7.4.1
PATCH 47/76 tty: serial: altera_jtaguart: Remove unused function early_altera_jtaguart_setup
In reply to Greg Kroah-HartmanFrom: Tobias Klauser <[email protected]>
This is not even used in nios2 arch code anymore.
--- drivers/tty/serial/altera_jtaguart.c | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-)
drivers/tty/serial/altera_jtaguart.c +0 -22
@@ -305,28 +305,6 @@ static struct altera_jtaguart altera_jtaguart_ports[ALTERA_JTAGUART_MAXPORTS]; #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE) -int __init early_altera_jtaguart_setup(struct altera_jtaguart_platform_uart - *platp) -{ - struct uart_port *port; - int i; - - for (i = 0; i < ALTERA_JTAGUART_MAXPORTS && platp[i].mapbase; i++) { - port = &altera_jtaguart_ports[i].port; - - port->line = i; - port->type = PORT_ALTERA_JTAGUART; - port->mapbase = platp[i].mapbase; - port->membase = ioremap(port->mapbase, ALTERA_JTAGUART_SIZE); - port->iotype = SERIAL_IO_MEM; - port->irq = platp[i].irq; - port->flags = ASYNC_BOOT_AUTOCONF; - port->ops = &altera_jtaguart_ops; - } - - return 0; -} - #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS) static void altera_jtaguart_console_putc(struct console *co, const char c) {
Signature · 1 line
1.7.4.1
PATCH 48/76 tty: serial: altera_jtaguart: Support getting mapbase and IRQ from resources
In reply to Greg Kroah-HartmanFrom: Tobias Klauser <[email protected]>
This will make it easier to get the driver to support device tree. The old platform data method is still supported though.
Also change the driver to use only one platform device per port.
--- drivers/tty/serial/altera_jtaguart.c | 61 +++++++++++++++++++++++---------- 1 files changed, 42 insertions(+), 19 deletions(-)
drivers/tty/serial/altera_jtaguart.c +42 -19
@@ -409,22 +409,45 @@ static int __devinit altera_jtaguart_probe(struct platform_device *pdev) {struct altera_jtaguart_platform_uart *platp = pdev->dev.platform_data;struct uart_port *port; -int i; +struct resource *res_irq, *res_mem; +int i = pdev->id; -for (i =0 ; i <ALTERA_JTAGUART_MAXPORTS && platp[i].mapbase; i++) { - port = &altera_jtaguart_ports[i].port; +/* -1 emphasizes that the platform must have one port, no .N suffix */ +if (i ==-1 ) + i =0 ; - port->line = i; - port->type =PORT_ALTERA_JTAGUART ; - port->mapbase = platp[i].mapbase; - port->membase =ioremap (port->mapbase,ALTERA_JTAGUART_SIZE ); - port->iotype =SERIAL_IO_MEM ; - port->irq = platp[i].irq; - port->ops = &altera_jtaguart_ops; - port->flags =ASYNC_BOOT_AUTOCONF ; +if (i >=ALTERA_JTAGUART_MAXPORTS ) +return -EINVAL ; -uart_add_one_port (&altera_jtaguart_driver, port); - } + port = &altera_jtaguart_ports[i].port; + + res_mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (res_mem) + port->mapbase = res_mem->start; +else if (platp) + port->mapbase = platp->mapbase; +else +return -ENODEV ; + + res_irq =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); +if (res_irq) + port->irq = res_irq->start; +else if (platp) + port->irq = platp->irq; +else +return -ENODEV ; + + port->membase =ioremap (port->mapbase,ALTERA_JTAGUART_SIZE ); +if (!port->membase) +return -ENOMEM ; + + port->line = i; + port->type =PORT_ALTERA_JTAGUART ; + port->iotype =SERIAL_IO_MEM ; + port->ops = &altera_jtaguart_ops; + port->flags =ASYNC_BOOT_AUTOCONF ; + +uart_add_one_port (&altera_jtaguart_driver, port);return 0 ; }
@@ -432,13 +455,13 @@ static int __devinit altera_jtaguart_probe(struct platform_device *pdev) static int __devexit altera_jtaguart_remove(struct platform_device *pdev) {struct uart_port *port; -int i; +int i = pdev->id; -for (i =0 ; i <ALTERA_JTAGUART_MAXPORTS ; i++) { - port = &altera_jtaguart_ports[i].port; -if (port) -uart_remove_one_port (&altera_jtaguart_driver, port); - } +if (i ==-1 ) + i =0 ; + + port = &altera_jtaguart_ports[i].port; +uart_remove_one_port (&altera_jtaguart_driver, port);return 0 ; }
Signature · 1 line
1.7.4.1
PATCH 49/76 tty: serial: altera_jtaguart: Fixup type usage of port flags
In reply to Greg Kroah-HartmanFrom: Tobias Klauser <[email protected]>
port->flags is of type upf_t, which corresponds to UPF_* flags.
--- drivers/tty/serial/altera_jtaguart.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/serial/altera_jtaguart.c +1 -1
@@ -445,7 +445,7 @@ static int __devinit altera_jtaguart_probe(struct platform_device *pdev) port->type =PORT_ALTERA_JTAGUART ; port->iotype =SERIAL_IO_MEM ; port->ops = &altera_jtaguart_ops; - port->flags =ASYNC_BOOT_AUTOCONF ; + port->flags =UPF_BOOT_AUTOCONF ;uart_add_one_port (&altera_jtaguart_driver, port);
Signature · 1 line
1.7.4.1
PATCH 50/76 tty: move a number of tty drivers from drivers/char/ to drivers/tty/
In reply to Greg Kroah-HartmanAs planned by Arnd Bergmann, this moves the following drivers from drivers/char/ to drivers/tty/ as that's where they really belong:
amiserial
nozomi
synclink
rocket
cyclades
moxa
mxser
isicom
bfin_jtag_comm
---
drivers/char/Kconfig | 172 --------------------------------
drivers/char/Makefile | 11 --
drivers/tty/Kconfig | 171 +++++++++++++++++++++++++++++++
drivers/tty/Makefile | 13 +++
drivers/{char => tty}/amiserial.c | 0
drivers/{char => tty}/bfin_jtag_comm.c | 0
drivers/{char => tty}/cyclades.c | 0
drivers/{char => tty}/isicom.c | 0
drivers/{char => tty}/moxa.c | 0
drivers/{char => tty}/moxa.h | 0
drivers/{char => tty}/mxser.c | 0
drivers/{char => tty}/mxser.h | 0
drivers/{char => tty}/nozomi.c | 0
drivers/{char => tty}/rocket.c | 0
drivers/{char => tty}/rocket.h | 0
drivers/{char => tty}/rocket_int.h | 0
drivers/{char => tty}/synclink.c | 0
drivers/{char => tty}/synclink_gt.c | 0
drivers/{char => tty}/synclinkmp.c | 0
19 files changed, 184 insertions(+), 183 deletions(-)
rename drivers/{char => tty}/amiserial.c (100%)
rename drivers/{char => tty}/bfin_jtag_comm.c (100%)
rename drivers/{char => tty}/cyclades.c (100%)
rename drivers/{char => tty}/isicom.c (100%)
rename drivers/{char => tty}/moxa.c (100%)
rename drivers/{char => tty}/moxa.h (100%)
rename drivers/{char => tty}/mxser.c (100%)
rename drivers/{char => tty}/mxser.h (100%)
rename drivers/{char => tty}/nozomi.c (100%)
rename drivers/{char => tty}/rocket.c (100%)
rename drivers/{char => tty}/rocket.h (100%)
rename drivers/{char => tty}/rocket_int.h (100%)
rename drivers/{char => tty}/synclink.c (100%)
rename drivers/{char => tty}/synclink_gt.c (100%)
rename drivers/{char => tty}/synclinkmp.c (100%)drivers/char/Kconfig +0 -172
@@ -15,36 +15,6 @@ config DEVKMEM kind of kernel debugging operations. When in doubt, say "N". -config BFIN_JTAG_COMM - tristate "Blackfin JTAG Communication" - depends on BLACKFIN - help - Add support for emulating a TTY device over the Blackfin JTAG. - - To compile this driver as a module, choose M here: the - module will be called bfin_jtag_comm. - -config BFIN_JTAG_COMM_CONSOLE - bool "Console on Blackfin JTAG" - depends on BFIN_JTAG_COMM=y - -config SERIAL_NONSTANDARD - bool "Non-standard serial port support" - depends on HAS_IOMEM - ---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, - Digiboards, etc. These are usually used for systems that need many - serial ports because they serve many terminals or dial-in - connections. - - Note that the answer to this question won't directly affect the - kernel: saying N will just cause the configurator to skip all - the questions about non-standard serial boards. - - Most people can say N here. - config COMPUTONE tristate "Computone IntelliPort Plus serial support" depends on SERIAL_NONSTANDARD && (ISA || EISA || PCI)
@@ -60,50 +30,6 @@ config COMPUTONE To compile this driver as module, choose M here: the module will be called ip2. -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/serial/rocket.txt>. - - 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 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/serial/README.cycladesZ>. - - 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 (EXPERIMENTAL)" - depends on EXPERIMENTAL && CYCLADES - 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 DIGIEPCA tristate "Digiboard Intelligent Async Support" depends on SERIAL_NONSTANDARD && (ISA || EISA || PCI)
@@ -119,94 +45,6 @@ config DIGIEPCA To compile this driver as a module, choose M here: the module will be called epca. -config MOXA_INTELLIO - tristate "Moxa Intellio support" - depends on SERIAL_NONSTANDARD && (ISA || EISA || PCI) - select FW_LOADER - help - Say Y here if you have a Moxa Intellio multiport serial card. - - To compile this driver as a module, choose M here: the - module will be called moxa. - -config MOXA_SMARTIO - tristate "Moxa SmartIO support v. 2.0" - depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA) - help - Say Y here if you have a Moxa SmartIO multiport serial card and/or - want to help develop a new version of this driver. - - This is upgraded (1.9.1) driver from original Moxa drivers with - changes finally resulting in PCI probing. - - This driver can also be built as a module. The module will be called - mxser. If you want to do that, say M here. - -config ISI - tristate "Multi-Tech multiport card support (EXPERIMENTAL)" - 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 SYNCLINK - tristate "Microgate SyncLink card support" - depends on SERIAL_NONSTANDARD && PCI && ISA_DMA_API - help - Provides support for the SyncLink ISA and PCI multiprotocol serial - adapters. These adapters support asynchronous and HDLC bit - synchronous communication up to 10Mbps (PCI adapter). - - This driver can only be built as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called synclink. If you want to do that, say M - here. - -config SYNCLINKMP - tristate "SyncLink Multiport support" - depends on SERIAL_NONSTANDARD && PCI - help - Enable support for the SyncLink Multiport (2 or 4 ports) - serial adapter, running asynchronous and HDLC communications up - to 2.048Mbps. Each ports is independently selectable for - RS-232, V.35, RS-449, RS-530, and X.21 - - This driver may be built as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called synclinkmp. If you want to do that, say M - here. - -config SYNCLINK_GT - tristate "SyncLink GT/AC support" - depends on SERIAL_NONSTANDARD && PCI - help - Support for SyncLink GT and SyncLink AC families of - synchronous and asynchronous serial adapters - manufactured by Microgate Systems, Ltd. (www.microgate.com) - -config N_HDLC - tristate "HDLC line discipline support" - depends on SERIAL_NONSTANDARD - help - Allows synchronous HDLC communications with tty device drivers that - support synchronous HDLC such as the Microgate SyncLink adapter. - - This driver can be built as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called n_hdlc. If you want to do that, say M - here. - -config N_GSM - tristate "GSM MUX line discipline support (EXPERIMENTAL)" - depends on EXPERIMENTAL - depends on NET - help - This line discipline provides support for the GSM MUX protocol and - presents the mux as a set of 61 individual tty devices. - config RISCOM8 tristate "SDL RISCom/8 card support" depends on SERIAL_NONSTANDARD
@@ -296,16 +134,6 @@ config ISTALLION To compile this driver as a module, choose M here: the module will be called istallion. -config NOZOMI - tristate "HSDPA Broadband Wireless Data Card - Globe Trotter" - depends on PCI && EXPERIMENTAL - help - If you have a HSDPA driver Broadband Wireless Data Card - - Globe Trotter PCMCIA card, say Y here. - - To compile this driver as a module, choose M here, the module - will be called nozomi. - config A2232 tristate "Commodore A2232 serial support (EXPERIMENTAL)" depends on EXPERIMENTAL && ZORRO && BROKEN
drivers/char/Makefile +0 -11
@@ -5,29 +5,18 @@ obj-y += mem.o random.o obj-$(CONFIG_TTY_PRINTK) += ttyprintk.o obj-y += misc.o -obj-$(CONFIG_BFIN_JTAG_COMM) += bfin_jtag_comm.o obj-$(CONFIG_MVME147_SCC) += generic_serial.o vme_scc.o obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_ROCKETPORT) += rocket.o obj-$(CONFIG_SERIAL167) += serial167.o -obj-$(CONFIG_CYCLADES) += cyclades.o obj-$(CONFIG_STALLION) += stallion.o obj-$(CONFIG_ISTALLION) += istallion.o -obj-$(CONFIG_NOZOMI) += nozomi.o obj-$(CONFIG_DIGIEPCA) += epca.o obj-$(CONFIG_SPECIALIX) += specialix.o -obj-$(CONFIG_MOXA_INTELLIO) += moxa.o obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o -obj-$(CONFIG_MOXA_SMARTIO) += mxser.o obj-$(CONFIG_COMPUTONE) += ip2/ obj-$(CONFIG_RISCOM8) += riscom8.o -obj-$(CONFIG_ISI) += isicom.o -obj-$(CONFIG_SYNCLINK) += synclink.o -obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o -obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o -obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o obj-$(CONFIG_SX) += sx.o generic_serial.o obj-$(CONFIG_RIO) += rio/ generic_serial.o obj-$(CONFIG_RAW_DRIVER) += raw.o
drivers/tty/Kconfig +171 -0
175 lines not on this page · raw message
drivers/tty/Makefile +13 -0
@@ -11,3 +11,16 @@ obj-$(CONFIG_R3964) += n_r3964.o obj-y += vt/ obj-$(CONFIG_HVC_DRIVER) += hvc/ obj-y += serial/ + +# tty drivers +obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o +obj-$(CONFIG_BFIN_JTAG_COMM) += bfin_jtag_comm.o +obj-$(CONFIG_CYCLADES) += cyclades.o +obj-$(CONFIG_ISI) += isicom.o +obj-$(CONFIG_MOXA_INTELLIO) += moxa.o +obj-$(CONFIG_MOXA_SMARTIO) += mxser.o +obj-$(CONFIG_NOZOMI) += nozomi.o +obj-$(CONFIG_ROCKETPORT) += rocket.o +obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o +obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o +obj-$(CONFIG_SYNCLINK) += synclink.o
drivers/tty/amiserial.c renamed from drivers/char/amiserial.c +0 -0
drivers/tty/bfin_jtag_comm.c renamed from drivers/char/bfin_jtag_comm.c +0 -0
drivers/tty/cyclades.c renamed from drivers/char/cyclades.c +0 -0
drivers/tty/isicom.c renamed from drivers/char/isicom.c +0 -0
drivers/tty/moxa.c renamed from drivers/char/moxa.c +0 -0
drivers/tty/moxa.h renamed from drivers/char/moxa.h +0 -0
drivers/tty/mxser.c renamed from drivers/char/mxser.c +0 -0
drivers/tty/mxser.h renamed from drivers/char/mxser.h +0 -0
drivers/tty/nozomi.c renamed from drivers/char/nozomi.c +0 -0
drivers/tty/rocket.c renamed from drivers/char/rocket.c +0 -0
drivers/tty/rocket.h renamed from drivers/char/rocket.h +0 -0
drivers/tty/rocket_int.h renamed from drivers/char/rocket_int.h +0 -0
drivers/tty/synclink.c renamed from drivers/char/synclink.c +0 -0
drivers/tty/synclink_gt.c renamed from drivers/char/synclink_gt.c +0 -0
drivers/tty/synclinkmp.c renamed from drivers/char/synclinkmp.c +0 -0
Signature · 1 line
1.7.4.1
PATCH 51/76 tty: move ipwireless driver from drivers/char/pcmcia/ to drivers/tty/
In reply to Greg Kroah-HartmanAs planned by Arnd Bergmann, this moves the ipwireless driver to the drivers/tty/ directory as that's where it really belongs.
---
MAINTAINERS | 2 +-
drivers/tty/Makefile | 2 ++
drivers/{char/pcmcia => tty}/ipwireless/Makefile | 0
drivers/{char/pcmcia => tty}/ipwireless/hardware.c | 0
drivers/{char/pcmcia => tty}/ipwireless/hardware.h | 0
drivers/{char/pcmcia => tty}/ipwireless/main.c | 0
drivers/{char/pcmcia => tty}/ipwireless/main.h | 0
drivers/{char/pcmcia => tty}/ipwireless/network.c | 0
drivers/{char/pcmcia => tty}/ipwireless/network.h | 0
.../pcmcia => tty}/ipwireless/setup_protocol.h | 0
drivers/{char/pcmcia => tty}/ipwireless/tty.c | 0
drivers/{char/pcmcia => tty}/ipwireless/tty.h | 0
12 files changed, 3 insertions(+), 1 deletions(-)
rename drivers/{char/pcmcia => tty}/ipwireless/Makefile (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/hardware.c (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/hardware.h (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/main.c (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/main.h (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/network.c (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/network.h (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/setup_protocol.h (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/tty.c (100%)
rename drivers/{char/pcmcia => tty}/ipwireless/tty.h (100%)MAINTAINERS +1 -1
@@ -3423,7 +3423,7 @@ M: Jiri Kosina <[email protected]> M: David Sterba <[email protected]> S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/ipwireless_cs.git -F: drivers/char/pcmcia/ipwireless/ +F: drivers/tty/ipwireless/ IPX NETWORK LAYER M: Arnaldo Carvalho de Melo <[email protected]>
drivers/tty/Makefile +2 -0
@@ -24,3 +24,5 @@ obj-$(CONFIG_ROCKETPORT) += rocket.o obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o obj-$(CONFIG_SYNCLINK) += synclink.o + +obj-y += ipwireless/
drivers/tty/ipwireless/Makefile renamed from drivers/char/pcmcia/ipwireless/Makefile +0 -0
drivers/tty/ipwireless/hardware.c renamed from drivers/char/pcmcia/ipwireless/hardware.c +0 -0
drivers/tty/ipwireless/hardware.h renamed from drivers/char/pcmcia/ipwireless/hardware.h +0 -0
drivers/tty/ipwireless/main.c renamed from drivers/char/pcmcia/ipwireless/main.c +0 -0
drivers/tty/ipwireless/main.h renamed from drivers/char/pcmcia/ipwireless/main.h +0 -0
drivers/tty/ipwireless/network.c renamed from drivers/char/pcmcia/ipwireless/network.c +0 -0
drivers/tty/ipwireless/network.h renamed from drivers/char/pcmcia/ipwireless/network.h +0 -0
drivers/tty/ipwireless/setup_protocol.h renamed from drivers/char/pcmcia/ipwireless/setup_protocol.h +0 -0
drivers/tty/ipwireless/tty.c renamed from drivers/char/pcmcia/ipwireless/tty.c +0 -0
drivers/tty/ipwireless/tty.h renamed from drivers/char/pcmcia/ipwireless/tty.h +0 -0
Signature · 1 line
1.7.4.1
PATCH 52/76 tty: move obsolete and broken tty drivers to drivers/staging/tty/
In reply to Greg Kroah-HartmanAs planned by Arnd Bergmann, this moves the following drivers to the drivers/staging/tty/ directory where they will be removed after 2.6.41 if no one steps up to claim them.
epca epca ip2 istallion riscom8 serial167 specialix stallion
---
arch/m68k/Kconfig | 8 --
drivers/char/Kconfig | 79 ----------------------
drivers/char/Makefile | 7 --
drivers/staging/Kconfig | 2 +
drivers/staging/Makefile | 1 +
drivers/staging/tty/Kconfig | 87 +++++++++++++++++++++++++
drivers/staging/tty/Makefile | 7 ++
drivers/staging/tty/TODO | 6 ++
drivers/{char => staging/tty}/epca.c | 0
drivers/{char => staging/tty}/epca.h | 0
drivers/{char => staging/tty}/epcaconfig.h | 0
drivers/{char => staging/tty}/ip2/Makefile | 0
drivers/{char => staging/tty}/ip2/i2cmd.c | 0
drivers/{char => staging/tty}/ip2/i2cmd.h | 0
drivers/{char => staging/tty}/ip2/i2ellis.c | 0
drivers/{char => staging/tty}/ip2/i2ellis.h | 0
drivers/{char => staging/tty}/ip2/i2hw.h | 0
drivers/{char => staging/tty}/ip2/i2lib.c | 0
drivers/{char => staging/tty}/ip2/i2lib.h | 0
drivers/{char => staging/tty}/ip2/i2pack.h | 0
drivers/{char => staging/tty}/ip2/ip2.h | 0
drivers/{char => staging/tty}/ip2/ip2ioctl.h | 0
drivers/{char => staging/tty}/ip2/ip2main.c | 0
drivers/{char => staging/tty}/ip2/ip2trace.h | 0
drivers/{char => staging/tty}/ip2/ip2types.h | 0
drivers/{char => staging/tty}/istallion.c | 0
drivers/{char => staging/tty}/riscom8.c | 0
drivers/{char => staging/tty}/riscom8.h | 0
drivers/{char => staging/tty}/riscom8_reg.h | 0
drivers/{char => staging/tty}/serial167.c | 0
drivers/{char => staging/tty}/specialix.c | 0
drivers/{char => staging/tty}/specialix_io8.h | 0
drivers/{char => staging/tty}/stallion.c | 0
33 files changed, 103 insertions(+), 94 deletions(-)
create mode 100644 drivers/staging/tty/Kconfig
create mode 100644 drivers/staging/tty/Makefile
create mode 100644 drivers/staging/tty/TODO
rename drivers/{char => staging/tty}/epca.c (100%)
rename drivers/{char => staging/tty}/epca.h (100%)
rename drivers/{char => staging/tty}/epcaconfig.h (100%)
rename drivers/{char => staging/tty}/ip2/Makefile (100%)
rename drivers/{char => staging/tty}/ip2/i2cmd.c (100%)
rename drivers/{char => staging/tty}/ip2/i2cmd.h (100%)
rename drivers/{char => staging/tty}/ip2/i2ellis.c (100%)
rename drivers/{char => staging/tty}/ip2/i2ellis.h (100%)
rename drivers/{char => staging/tty}/ip2/i2hw.h (100%)
rename drivers/{char => staging/tty}/ip2/i2lib.c (100%)
rename drivers/{char => staging/tty}/ip2/i2lib.h (100%)
rename drivers/{char => staging/tty}/ip2/i2pack.h (100%)
rename drivers/{char => staging/tty}/ip2/ip2.h (100%)
rename drivers/{char => staging/tty}/ip2/ip2ioctl.h (100%)
rename drivers/{char => staging/tty}/ip2/ip2main.c (100%)
rename drivers/{char => staging/tty}/ip2/ip2trace.h (100%)
rename drivers/{char => staging/tty}/ip2/ip2types.h (100%)
rename drivers/{char => staging/tty}/istallion.c (100%)
rename drivers/{char => staging/tty}/riscom8.c (100%)
rename drivers/{char => staging/tty}/riscom8.h (100%)
rename drivers/{char => staging/tty}/riscom8_reg.h (100%)
rename drivers/{char => staging/tty}/serial167.c (100%)
rename drivers/{char => staging/tty}/specialix.c (100%)
rename drivers/{char => staging/tty}/specialix_io8.h (100%)
rename drivers/{char => staging/tty}/stallion.c (100%)arch/m68k/Kconfig +0 -8
@@ -554,14 +554,6 @@ config MVME147_SCC This is the driver for the serial ports on the Motorola MVME147 boards. Everyone using one of these boards should say Y here. -config SERIAL167 - bool "CD2401 support for MVME166/7 serial ports" - depends on MVME16x - help - This is the driver for the serial ports on the Motorola MVME166, - 167, and 172 boards. Everyone using one of these boards should say - Y here. - config MVME162_SCC bool "SCC support for MVME162 serial ports" depends on MVME16x && BROKEN
drivers/char/Kconfig +0 -79
91 lines not on this page · raw message
drivers/char/Makefile +0 -7
@@ -8,15 +8,8 @@ obj-y += misc.o obj-$(CONFIG_MVME147_SCC) += generic_serial.o vme_scc.o obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_SERIAL167) += serial167.o -obj-$(CONFIG_STALLION) += stallion.o -obj-$(CONFIG_ISTALLION) += istallion.o -obj-$(CONFIG_DIGIEPCA) += epca.o -obj-$(CONFIG_SPECIALIX) += specialix.o obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o -obj-$(CONFIG_COMPUTONE) += ip2/ -obj-$(CONFIG_RISCOM8) += riscom8.o obj-$(CONFIG_SX) += sx.o generic_serial.o obj-$(CONFIG_RIO) += rio/ generic_serial.o obj-$(CONFIG_RAW_DRIVER) += raw.o
drivers/staging/Kconfig +2 -0
@@ -41,6 +41,8 @@ config STAGING_EXCLUDE_BUILD if !STAGING_EXCLUDE_BUILD +source "drivers/staging/tty/Kconfig" + source "drivers/staging/et131x/Kconfig" source "drivers/staging/slicoss/Kconfig"
drivers/staging/Makefile +1 -0
@@ -3,6 +3,7 @@ # fix for build system bug... obj-$(CONFIG_STAGING) += staging.o +obj-y += tty/ obj-$(CONFIG_ET131X) += et131x/ obj-$(CONFIG_SLICOSS) += slicoss/ obj-$(CONFIG_VIDEO_GO7007) += go7007/
drivers/staging/tty/Kconfig new file +87 -0
87 lines not on this page · raw message
drivers/staging/tty/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +obj-$(CONFIG_STALLION) += stallion.o +obj-$(CONFIG_ISTALLION) += istallion.o +obj-$(CONFIG_DIGIEPCA) += epca.o +obj-$(CONFIG_SERIAL167) += serial167.o +obj-$(CONFIG_SPECIALIX) += specialix.o +obj-$(CONFIG_RISCOM8) += riscom8.o +obj-$(CONFIG_COMPUTONE) += ip2/
drivers/staging/tty/TODO new file +6 -0
@@ -0,0 +1,6 @@ +These are a few tty/serial drivers that either do not build, +or work if they do build, or if they seem to work, are for obsolete +hardware, or are full of unfixable races and no one uses them anymore. + +If no one steps up to adopt any of these drivers, they will be removed +in the 2.6.41 release.
drivers/staging/tty/epca.c renamed from drivers/char/epca.c +0 -0
drivers/staging/tty/epca.h renamed from drivers/char/epca.h +0 -0
drivers/staging/tty/epcaconfig.h renamed from drivers/char/epcaconfig.h +0 -0
drivers/staging/tty/ip2/Makefile renamed from drivers/char/ip2/Makefile +0 -0
drivers/staging/tty/ip2/i2cmd.c renamed from drivers/char/ip2/i2cmd.c +0 -0
drivers/staging/tty/ip2/i2cmd.h renamed from drivers/char/ip2/i2cmd.h +0 -0
drivers/staging/tty/ip2/i2ellis.c renamed from drivers/char/ip2/i2ellis.c +0 -0
drivers/staging/tty/ip2/i2ellis.h renamed from drivers/char/ip2/i2ellis.h +0 -0
drivers/staging/tty/ip2/i2hw.h renamed from drivers/char/ip2/i2hw.h +0 -0
drivers/staging/tty/ip2/i2lib.c renamed from drivers/char/ip2/i2lib.c +0 -0
drivers/staging/tty/ip2/i2lib.h renamed from drivers/char/ip2/i2lib.h +0 -0
drivers/staging/tty/ip2/i2pack.h renamed from drivers/char/ip2/i2pack.h +0 -0
drivers/staging/tty/ip2/ip2.h renamed from drivers/char/ip2/ip2.h +0 -0
drivers/staging/tty/ip2/ip2ioctl.h renamed from drivers/char/ip2/ip2ioctl.h +0 -0
drivers/staging/tty/ip2/ip2main.c renamed from drivers/char/ip2/ip2main.c +0 -0
drivers/staging/tty/ip2/ip2trace.h renamed from drivers/char/ip2/ip2trace.h +0 -0
drivers/staging/tty/ip2/ip2types.h renamed from drivers/char/ip2/ip2types.h +0 -0
drivers/staging/tty/istallion.c renamed from drivers/char/istallion.c +0 -0
drivers/staging/tty/riscom8.c renamed from drivers/char/riscom8.c +0 -0
drivers/staging/tty/riscom8.h renamed from drivers/char/riscom8.h +0 -0
drivers/staging/tty/riscom8_reg.h renamed from drivers/char/riscom8_reg.h +0 -0
drivers/staging/tty/serial167.c renamed from drivers/char/serial167.c +0 -0
drivers/staging/tty/specialix.c renamed from drivers/char/specialix.c +0 -0
drivers/staging/tty/specialix_io8.h renamed from drivers/char/specialix_io8.h +0 -0
drivers/staging/tty/stallion.c renamed from drivers/char/stallion.c +0 -0
Signature · 1 line
1.7.4.1
PATCH 53/76 tty: move obsolete and broken generic_serial drivers to drivers/staging/generic_serial/
In reply to Greg Kroah-HartmanAs planned by Arnd Bergmann, this moves the following drivers to the drivers/staging/generic_serial directory where they will be removed after 2.6.41 if no one steps up to claim them.
generic_serial rio ser_a2232 sx vme_scc
---
drivers/char/Kconfig | 44 -------------------
drivers/char/Makefile | 6 ---
drivers/staging/Kconfig | 2 +
drivers/staging/Makefile | 1 +
drivers/staging/generic_serial/Kconfig | 45 ++++++++++++++++++++
drivers/staging/generic_serial/Makefile | 6 +++
drivers/staging/generic_serial/TODO | 6 +++
.../generic_serial}/generic_serial.c | 0
.../{char => staging/generic_serial}/rio/Makefile | 0
.../{char => staging/generic_serial}/rio/board.h | 0
.../{char => staging/generic_serial}/rio/cirrus.h | 0
.../{char => staging/generic_serial}/rio/cmdblk.h | 0
.../{char => staging/generic_serial}/rio/cmdpkt.h | 0
.../{char => staging/generic_serial}/rio/daemon.h | 0
.../{char => staging/generic_serial}/rio/errors.h | 0
.../{char => staging/generic_serial}/rio/func.h | 0
.../{char => staging/generic_serial}/rio/host.h | 0
.../{char => staging/generic_serial}/rio/link.h | 0
.../generic_serial}/rio/linux_compat.h | 0
drivers/{char => staging/generic_serial}/rio/map.h | 0
.../{char => staging/generic_serial}/rio/param.h | 0
.../{char => staging/generic_serial}/rio/parmmap.h | 0
drivers/{char => staging/generic_serial}/rio/pci.h | 0
drivers/{char => staging/generic_serial}/rio/phb.h | 0
drivers/{char => staging/generic_serial}/rio/pkt.h | 0
.../{char => staging/generic_serial}/rio/port.h | 0
.../{char => staging/generic_serial}/rio/protsts.h | 0
drivers/{char => staging/generic_serial}/rio/rio.h | 0
.../generic_serial}/rio/rio_linux.c | 0
.../generic_serial}/rio/rio_linux.h | 0
.../generic_serial}/rio/rioboard.h | 0
.../{char => staging/generic_serial}/rio/rioboot.c | 0
.../{char => staging/generic_serial}/rio/riocmd.c | 0
.../{char => staging/generic_serial}/rio/rioctrl.c | 0
.../{char => staging/generic_serial}/rio/riodrvr.h | 0
.../{char => staging/generic_serial}/rio/rioinfo.h | 0
.../{char => staging/generic_serial}/rio/rioinit.c | 0
.../{char => staging/generic_serial}/rio/riointr.c | 0
.../generic_serial}/rio/rioioctl.h | 0
.../generic_serial}/rio/rioparam.c | 0
.../generic_serial}/rio/rioroute.c | 0
.../generic_serial}/rio/riospace.h | 0
.../generic_serial}/rio/riotable.c | 0
.../{char => staging/generic_serial}/rio/riotty.c | 0
.../{char => staging/generic_serial}/rio/route.h | 0
drivers/{char => staging/generic_serial}/rio/rup.h | 0
.../{char => staging/generic_serial}/rio/unixrup.h | 0
.../{char => staging/generic_serial}/ser_a2232.c | 0
.../{char => staging/generic_serial}/ser_a2232.h | 0
.../generic_serial}/ser_a2232fw.ax | 0
.../{char => staging/generic_serial}/ser_a2232fw.h | 0
drivers/{char => staging/generic_serial}/sx.c | 0
drivers/{char => staging/generic_serial}/sx.h | 0
.../{char => staging/generic_serial}/sxboards.h | 0
.../{char => staging/generic_serial}/sxwindow.h | 0
drivers/{char => staging/generic_serial}/vme_scc.c | 0
56 files changed, 60 insertions(+), 50 deletions(-)
create mode 100644 drivers/staging/generic_serial/Kconfig
create mode 100644 drivers/staging/generic_serial/Makefile
create mode 100644 drivers/staging/generic_serial/TODO
rename drivers/{char => staging/generic_serial}/generic_serial.c (100%)
rename drivers/{char => staging/generic_serial}/rio/Makefile (100%)
rename drivers/{char => staging/generic_serial}/rio/board.h (100%)
rename drivers/{char => staging/generic_serial}/rio/cirrus.h (100%)
rename drivers/{char => staging/generic_serial}/rio/cmdblk.h (100%)
rename drivers/{char => staging/generic_serial}/rio/cmdpkt.h (100%)
rename drivers/{char => staging/generic_serial}/rio/daemon.h (100%)
rename drivers/{char => staging/generic_serial}/rio/errors.h (100%)
rename drivers/{char => staging/generic_serial}/rio/func.h (100%)
rename drivers/{char => staging/generic_serial}/rio/host.h (100%)
rename drivers/{char => staging/generic_serial}/rio/link.h (100%)
rename drivers/{char => staging/generic_serial}/rio/linux_compat.h (100%)
rename drivers/{char => staging/generic_serial}/rio/map.h (100%)
rename drivers/{char => staging/generic_serial}/rio/param.h (100%)
rename drivers/{char => staging/generic_serial}/rio/parmmap.h (100%)
rename drivers/{char => staging/generic_serial}/rio/pci.h (100%)
rename drivers/{char => staging/generic_serial}/rio/phb.h (100%)
rename drivers/{char => staging/generic_serial}/rio/pkt.h (100%)
rename drivers/{char => staging/generic_serial}/rio/port.h (100%)
rename drivers/{char => staging/generic_serial}/rio/protsts.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rio.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rio_linux.c (100%)
rename drivers/{char => staging/generic_serial}/rio/rio_linux.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioboard.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioboot.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riocmd.c (100%)
rename drivers/{char => staging/generic_serial}/rio/rioctrl.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riodrvr.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioinfo.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioinit.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riointr.c (100%)
rename drivers/{char => staging/generic_serial}/rio/rioioctl.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rioparam.c (100%)
rename drivers/{char => staging/generic_serial}/rio/rioroute.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riospace.h (100%)
rename drivers/{char => staging/generic_serial}/rio/riotable.c (100%)
rename drivers/{char => staging/generic_serial}/rio/riotty.c (100%)
rename drivers/{char => staging/generic_serial}/rio/route.h (100%)
rename drivers/{char => staging/generic_serial}/rio/rup.h (100%)
rename drivers/{char => staging/generic_serial}/rio/unixrup.h (100%)
rename drivers/{char => staging/generic_serial}/ser_a2232.c (100%)
rename drivers/{char => staging/generic_serial}/ser_a2232.h (100%)
rename drivers/{char => staging/generic_serial}/ser_a2232fw.ax (100%)
rename drivers/{char => staging/generic_serial}/ser_a2232fw.h (100%)
rename drivers/{char => staging/generic_serial}/sx.c (100%)
rename drivers/{char => staging/generic_serial}/sx.h (100%)
rename drivers/{char => staging/generic_serial}/sxboards.h (100%)
rename drivers/{char => staging/generic_serial}/sxwindow.h (100%)
rename drivers/{char => staging/generic_serial}/vme_scc.c (100%)drivers/char/Kconfig +0 -44
@@ -15,34 +15,6 @@ config DEVKMEM kind of kernel debugging operations. When in doubt, say "N". -config SX - tristate "Specialix SX (and SI) card support" - depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA) && BROKEN - help - This is a driver for the SX and SI multiport serial cards. - Please read the file <file:Documentation/serial/sx.txt> for details. - - This driver can only be built as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called sx. If you want to do that, say M here. - -config RIO - tristate "Specialix RIO system support" - depends on SERIAL_NONSTANDARD && BROKEN - help - This is a driver for the Specialix RIO, a smart serial card which - drives an outboard box that can support up to 128 ports. Product - information is at <http://www.perle.com/support/documentation.html#multiport>. - There are both ISA and PCI versions. - -config RIO_OLDPCI - bool "Support really old RIO/PCI cards" - depends on RIO - help - Older RIO PCI cards need some initialization-time configuration to - determine the IRQ and some control addresses. If you have a RIO and - this doesn't seem to work, try setting this to Y. - config STALDRV bool "Stallion multiport serial support" depends on SERIAL_NONSTANDARD
@@ -55,22 +27,6 @@ config STALDRV in this case. If you have never heard about all this, it's safe to say N. -config A2232 - tristate "Commodore A2232 serial support (EXPERIMENTAL)" - depends on EXPERIMENTAL && ZORRO && BROKEN - ---help--- - This option supports the 2232 7-port serial card shipped with the - Amiga 2000 and other Zorro-bus machines, dating from 1989. At - a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip - each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The - ports were connected with 8 pin DIN connectors on the card bracket, - for which 8 pin to DB25 adapters were supplied. The card also had - jumpers internally to toggle various pinning configurations. - - This driver can be built as a module; but then "generic_serial" - will also be built as a module. This has to be loaded before - "ser_a2232". If you want to do this, answer M here. - config SGI_SNSC bool "SGI Altix system controller communication support" depends on (IA64_SGI_SN2 || IA64_GENERIC)
drivers/char/Makefile +0 -6
@@ -5,13 +5,7 @@ obj-y += mem.o random.o obj-$(CONFIG_TTY_PRINTK) += ttyprintk.o obj-y += misc.o -obj-$(CONFIG_MVME147_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o -obj-$(CONFIG_SX) += sx.o generic_serial.o -obj-$(CONFIG_RIO) += rio/ generic_serial.o obj-$(CONFIG_RAW_DRIVER) += raw.o obj-$(CONFIG_SGI_SNSC) += snsc.o snsc_event.o obj-$(CONFIG_MSPEC) += mspec.o
drivers/staging/Kconfig +2 -0
@@ -43,6 +43,8 @@ if !STAGING_EXCLUDE_BUILD source "drivers/staging/tty/Kconfig" +source "drivers/staging/generic_serial/Kconfig" + source "drivers/staging/et131x/Kconfig" source "drivers/staging/slicoss/Kconfig"
drivers/staging/Makefile +1 -0
@@ -4,6 +4,7 @@ obj-$(CONFIG_STAGING) += staging.o obj-y += tty/ +obj-y += generic_serial/ obj-$(CONFIG_ET131X) += et131x/ obj-$(CONFIG_SLICOSS) += slicoss/ obj-$(CONFIG_VIDEO_GO7007) += go7007/
drivers/staging/generic_serial/Kconfig new file +45 -0
45 lines not on this page · raw message
drivers/staging/generic_serial/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +obj-$(CONFIG_MVME147_SCC) += generic_serial.o vme_scc.o +obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o +obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o +obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o +obj-$(CONFIG_SX) += sx.o generic_serial.o +obj-$(CONFIG_RIO) += rio/ generic_serial.o
drivers/staging/generic_serial/TODO new file +6 -0
@@ -0,0 +1,6 @@ +These are a few tty/serial drivers that either do not build, +or work if they do build, or if they seem to work, are for obsolete +hardware, or are full of unfixable races and no one uses them anymore. + +If no one steps up to adopt any of these drivers, they will be removed +in the 2.6.41 release.
drivers/staging/generic_serial/generic_serial.c renamed from drivers/char/generic_serial.c +0 -0
drivers/staging/generic_serial/rio/Makefile renamed from drivers/char/rio/Makefile +0 -0
drivers/staging/generic_serial/rio/board.h renamed from drivers/char/rio/board.h +0 -0
drivers/staging/generic_serial/rio/cirrus.h renamed from drivers/char/rio/cirrus.h +0 -0
drivers/staging/generic_serial/rio/cmdblk.h renamed from drivers/char/rio/cmdblk.h +0 -0
drivers/staging/generic_serial/rio/cmdpkt.h renamed from drivers/char/rio/cmdpkt.h +0 -0
drivers/staging/generic_serial/rio/daemon.h renamed from drivers/char/rio/daemon.h +0 -0
drivers/staging/generic_serial/rio/errors.h renamed from drivers/char/rio/errors.h +0 -0
drivers/staging/generic_serial/rio/func.h renamed from drivers/char/rio/func.h +0 -0
drivers/staging/generic_serial/rio/host.h renamed from drivers/char/rio/host.h +0 -0
drivers/staging/generic_serial/rio/link.h renamed from drivers/char/rio/link.h +0 -0
drivers/staging/generic_serial/rio/linux_compat.h renamed from drivers/char/rio/linux_compat.h +0 -0
drivers/staging/generic_serial/rio/map.h renamed from drivers/char/rio/map.h +0 -0
drivers/staging/generic_serial/rio/param.h renamed from drivers/char/rio/param.h +0 -0
drivers/staging/generic_serial/rio/parmmap.h renamed from drivers/char/rio/parmmap.h +0 -0
drivers/staging/generic_serial/rio/pci.h renamed from drivers/char/rio/pci.h +0 -0
drivers/staging/generic_serial/rio/phb.h renamed from drivers/char/rio/phb.h +0 -0
drivers/staging/generic_serial/rio/pkt.h renamed from drivers/char/rio/pkt.h +0 -0
drivers/staging/generic_serial/rio/port.h renamed from drivers/char/rio/port.h +0 -0
drivers/staging/generic_serial/rio/protsts.h renamed from drivers/char/rio/protsts.h +0 -0
drivers/staging/generic_serial/rio/rio.h renamed from drivers/char/rio/rio.h +0 -0
drivers/staging/generic_serial/rio/rio_linux.c renamed from drivers/char/rio/rio_linux.c +0 -0
drivers/staging/generic_serial/rio/rio_linux.h renamed from drivers/char/rio/rio_linux.h +0 -0
drivers/staging/generic_serial/rio/rioboard.h renamed from drivers/char/rio/rioboard.h +0 -0
drivers/staging/generic_serial/rio/rioboot.c renamed from drivers/char/rio/rioboot.c +0 -0
drivers/staging/generic_serial/rio/riocmd.c renamed from drivers/char/rio/riocmd.c +0 -0
drivers/staging/generic_serial/rio/rioctrl.c renamed from drivers/char/rio/rioctrl.c +0 -0
drivers/staging/generic_serial/rio/riodrvr.h renamed from drivers/char/rio/riodrvr.h +0 -0
drivers/staging/generic_serial/rio/rioinfo.h renamed from drivers/char/rio/rioinfo.h +0 -0
drivers/staging/generic_serial/rio/rioinit.c renamed from drivers/char/rio/rioinit.c +0 -0
drivers/staging/generic_serial/rio/riointr.c renamed from drivers/char/rio/riointr.c +0 -0
drivers/staging/generic_serial/rio/rioioctl.h renamed from drivers/char/rio/rioioctl.h +0 -0
drivers/staging/generic_serial/rio/rioparam.c renamed from drivers/char/rio/rioparam.c +0 -0
drivers/staging/generic_serial/rio/rioroute.c renamed from drivers/char/rio/rioroute.c +0 -0
drivers/staging/generic_serial/rio/riospace.h renamed from drivers/char/rio/riospace.h +0 -0
drivers/staging/generic_serial/rio/riotable.c renamed from drivers/char/rio/riotable.c +0 -0
drivers/staging/generic_serial/rio/riotty.c renamed from drivers/char/rio/riotty.c +0 -0
drivers/staging/generic_serial/rio/route.h renamed from drivers/char/rio/route.h +0 -0
drivers/staging/generic_serial/rio/rup.h renamed from drivers/char/rio/rup.h +0 -0
drivers/staging/generic_serial/rio/unixrup.h renamed from drivers/char/rio/unixrup.h +0 -0
drivers/staging/generic_serial/ser_a2232.c renamed from drivers/char/ser_a2232.c +0 -0
drivers/staging/generic_serial/ser_a2232.h renamed from drivers/char/ser_a2232.h +0 -0
drivers/staging/generic_serial/ser_a2232fw.ax renamed from drivers/char/ser_a2232fw.ax +0 -0
drivers/staging/generic_serial/ser_a2232fw.h renamed from drivers/char/ser_a2232fw.h +0 -0
drivers/staging/generic_serial/sx.c renamed from drivers/char/sx.c +0 -0
drivers/staging/generic_serial/sx.h renamed from drivers/char/sx.h +0 -0
drivers/staging/generic_serial/sxboards.h renamed from drivers/char/sxboards.h +0 -0
drivers/staging/generic_serial/sxwindow.h renamed from drivers/char/sxwindow.h +0 -0
drivers/staging/generic_serial/vme_scc.c renamed from drivers/char/vme_scc.c +0 -0
Signature · 1 line
1.7.4.1
PATCH 54/76 pch_uart: add multi-scatter processing
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
Currently, this driver can handle only single scatterlist. Thus, it can't send data beyond FIFO size.
This patch enables this driver can handle multiple scatter list.
--- drivers/tty/serial/pch_uart.c | 117 +++++++++++++++++++++++++++++++---------- 1 files changed, 89 insertions(+), 28 deletions(-)
drivers/tty/serial/pch_uart.c +89 -28
@@ -226,7 +226,8 @@ struct eg20t_port {struct pch_dma_slave param_rx;struct dma_chan *chan_tx;struct dma_chan *chan_rx; -struct scatterlist sg_tx; +struct scatterlist *sg_tx_p; +int nent;struct scatterlist sg_rx;int tx_dma_use;void *rx_buf_virt;
@@ -595,16 +596,20 @@ static void pch_dma_rx_complete(void *arg)struct eg20t_port *priv = arg;struct uart_port *port = &priv->port;struct tty_struct *tty =tty_port_tty_get (&port->state->port); +int count;if (!tty) {pr_debug ("%s:tty is busy now" , __func__);return ; } -if (dma_push_rx (priv, priv->trigger_level)) +dma_sync_sg_for_cpu (port->dev, &priv->sg_rx,1 ,DMA_FROM_DEVICE ); + count =dma_push_rx (priv, priv->trigger_level); +if (count)tty_flip_buffer_push (tty); -tty_kref_put (tty); +async_tx_ack (priv->desc_rx); +pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_RX_INT ); }static void pch_dma_tx_complete (void *arg)
@@ -612,13 +617,21 @@ static void pch_dma_tx_complete(void *arg)struct eg20t_port *priv = arg;struct uart_port *port = &priv->port;struct circ_buf *xmit = &port->state->xmit; +struct scatterlist *sg = priv->sg_tx_p; +int i; - xmit->tail +=sg_dma_len (&priv->sg_tx); +for (i =0 ; i < priv->nent; i++, sg++) { + xmit->tail +=sg_dma_len (sg); + port->icount.tx +=sg_dma_len (sg); + } xmit->tail &=UART_XMIT_SIZE -1 ; - port->icount.tx +=sg_dma_len (&priv->sg_tx); -async_tx_ack (priv->desc_tx); +dma_unmap_sg (port->dev, sg, priv->nent,DMA_TO_DEVICE ); priv->tx_dma_use =0 ; + priv->nent =0 ; +kfree (priv->sg_tx_p); +if (uart_circ_chars_pending (xmit)) +pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_TX_INT ); }static int pop_tx (struct eg20t_port *priv,unsigned char *buf,int size)
@@ -682,7 +695,7 @@ static int dma_handle_rx(struct eg20t_port *priv)sg_init_table (&priv->sg_rx,1 );/* Initialize SG table */ -sg_dma_len (sg) = priv->fifo_size; +sg_dma_len (sg) = priv->trigger_level; sg_set_page(&priv->sg_rx, virt_to_page(priv->rx_buf_virt), sg_dma_len(sg), (unsigned long)priv->rx_buf_virt &
@@ -692,7 +705,8 @@ static int dma_handle_rx(struct eg20t_port *priv) desc = priv->chan_rx->device->device_prep_slave_sg (priv->chan_rx, sg,1 ,DMA_FROM_DEVICE , -DMA_PREP_INTERRUPT ); +DMA_PREP_INTERRUPT |DMA_CTRL_ACK ); +if (!desc)return 0 ;
@@ -731,6 +745,9 @@ static unsigned int handle_tx(struct eg20t_port *priv) fifo_size--; } size =min (xmit->head - xmit->tail, fifo_size); +if (size <0 ) + size = fifo_size; + tx_size =pop_tx (priv, xmit->buf, size);if (tx_size >0 ) { ret =pch_uart_hal_write (priv, xmit->buf, tx_size);
@@ -740,8 +757,10 @@ static unsigned int handle_tx(struct eg20t_port *priv) priv->tx_empty = tx_empty; -if (tx_empty) +if (tx_empty) {pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_TX_INT ); +uart_write_wakeup (port); + }return PCH_UART_HANDLED_TX_INT ; }
@@ -750,11 +769,16 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) {struct uart_port *port = &priv->port;struct circ_buf *xmit = &port->state->xmit; -struct scatterlist *sg = &priv->sg_tx; +struct scatterlist *sg;int nent;int fifo_size;int tx_empty;struct dma_async_tx_descriptor *desc; +int num; +int i; +int bytes; +int size; +int rem;if (!priv->start_tx) {pr_info ("%s:Tx isn't started. (%lu)\n" , __func__, jiffies);
@@ -772,37 +796,68 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) fifo_size--; } -pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_TX_INT ); + bytes =min ((int )CIRC_CNT (xmit->head, xmit->tail, +UART_XMIT_SIZE ),CIRC_CNT_TO_END (xmit->head, + xmit->tail,UART_XMIT_SIZE )); +if (!bytes) { +pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_TX_INT ); +uart_write_wakeup (port); +return 0 ; + } + +if (bytes > fifo_size) { + num = bytes / fifo_size +1 ; + size = fifo_size; + rem = bytes % fifo_size; + }else { + num =1 ; + size = bytes; + rem = bytes; + } priv->tx_dma_use =1 ; -sg_init_table (&priv->sg_tx,1 );/* Initialize SG table */ + priv->sg_tx_p =kzalloc (sizeof (struct scatterlist )*num,GFP_ATOMIC ); + +sg_init_table (priv->sg_tx_p, num);/* Initialize SG table */ + sg = priv->sg_tx_p; -sg_set_page (&priv->sg_tx,virt_to_page (xmit->buf), -UART_XMIT_SIZE , (int )xmit->buf & ~PAGE_MASK ); +for (i =0 ; i < num; i++, sg++) { +if (i == (num -1 )) +sg_set_page (sg,virt_to_page (xmit->buf), + rem, fifo_size * i); +else +sg_set_page (sg,virt_to_page (xmit->buf), + size, fifo_size * i); + } - nent =dma_map_sg (port->dev, &priv->sg_tx,1 ,DMA_TO_DEVICE ); + sg = priv->sg_tx_p; + nent =dma_map_sg (port->dev, sg, num,DMA_TO_DEVICE );if (!nent) {pr_err ("%s:dma_map_sg Failed\n" , __func__);return 0 ; } - - sg->offset = xmit->tail & (UART_XMIT_SIZE -1 ); -sg_dma_address (sg) = (sg_dma_address (sg) & ~(UART_XMIT_SIZE -1 )) + - sg->offset; -sg_dma_len (sg) =min ((int )CIRC_CNT (xmit->head, xmit->tail, -UART_XMIT_SIZE ),CIRC_CNT_TO_END (xmit->head, - xmit->tail,UART_XMIT_SIZE )); + priv->nent = nent; + +for (i =0 ; i < nent; i++, sg++) { + sg->offset = (xmit->tail & (UART_XMIT_SIZE -1 )) + + fifo_size * i; +sg_dma_address (sg) = (sg_dma_address (sg) & + ~(UART_XMIT_SIZE -1 )) + sg->offset; +if (i == (nent -1 )) +sg_dma_len (sg) = rem; +else +sg_dma_len (sg) = size; + } desc = priv->chan_tx->device->device_prep_slave_sg (priv->chan_tx, - sg, nent,DMA_TO_DEVICE ,DMA_PREP_INTERRUPT |DMA_CTRL_ACK ); + priv->sg_tx_p, nent,DMA_TO_DEVICE , +DMA_PREP_INTERRUPT |DMA_CTRL_ACK );if (!desc) {pr_err ("%s:device_prep_slave_sg Failed\n" , __func__);return 0 ; } - -dma_sync_sg_for_device (port->dev, sg,1 ,DMA_TO_DEVICE ); - +dma_sync_sg_for_device (port->dev, priv->sg_tx_p, nent,DMA_TO_DEVICE ); priv->desc_tx = desc; desc->callback = pch_dma_tx_complete; desc->callback_param = priv;
@@ -857,10 +912,16 @@ static irqreturn_t pch_uart_interrupt(int irq, void *dev_id) }break ;case PCH_UART_IID_RDR :/* Received Data Ready */ -if (priv->use_dma) +if (priv->use_dma) { +pch_uart_hal_disable_interrupt (priv, +PCH_UART_HAL_RX_INT ); ret =dma_handle_rx (priv); -else +if (!ret) +pch_uart_hal_enable_interrupt (priv, +PCH_UART_HAL_RX_INT ); + }else { ret =handle_rx (priv); + }break ;case PCH_UART_IID_RDR_TO :/* Received Data Ready (FIFO Timeout) */
Signature · 1 line
1.7.4.1
PATCH 55/76 pch_uart: add spin_lock_init
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
Currently, spin_lock is not initialized.
Thus, add spin_lock_init().
--- drivers/tty/serial/pch_uart.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/tty/serial/pch_uart.c +2 -0
@@ -1370,6 +1370,8 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev, priv->port.line = num++; priv->trigger =PCH_UART_HAL_TRIGGER_M ; +spin_lock_init (&priv->port.lock); +pci_set_drvdata (pdev, priv);pch_uart_hal_request (pdev, fifosize, base_baud);
Signature · 1 line
1.7.4.1
PATCH 56/76 pch_uart : Reduce memcpy
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
Reduce memcpy for performance improvement.
--- drivers/tty/serial/pch_uart.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-)
drivers/tty/serial/pch_uart.c +5 -8
@@ -390,7 +390,7 @@ static u8 pch_uart_hal_get_modem(struct eg20t_port *priv)return get_msr (priv, priv->membase); } -static int pch_uart_hal_write (struct eg20t_port *priv, +static void pch_uart_hal_write (struct eg20t_port *priv,const unsigned char *buf,int tx_size) {int i;
@@ -400,7 +400,6 @@ static int pch_uart_hal_write(struct eg20t_port *priv, thr = buf[i++];iowrite8 (thr, priv->membase +PCH_UART_THR ); } -return i; } static int pch_uart_hal_read(struct eg20t_port *priv, unsigned char *buf,
@@ -634,7 +633,7 @@ static void pch_dma_tx_complete(void *arg)pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_TX_INT ); } -static int pop_tx (struct eg20t_port *priv,unsigned char *buf,int size) +static int pop_tx (struct eg20t_port *priv,int size) {int count =0 ;struct uart_port *port = &priv->port;
@@ -647,7 +646,7 @@ static int pop_tx(struct eg20t_port *priv, unsigned char *buf, int size)int cnt_to_end =CIRC_CNT_TO_END (xmit->head, xmit->tail,UART_XMIT_SIZE );int sz =min (size - count, cnt_to_end); -memcpy (&buf[count], &xmit->buf[xmit->tail], sz); +pch_uart_hal_write (priv, &xmit->buf[xmit->tail], sz); xmit->tail = (xmit->tail + sz) & (UART_XMIT_SIZE -1 ); count += sz; }while (!uart_circ_empty (xmit) && count < size);
@@ -723,7 +722,6 @@ static unsigned int handle_tx(struct eg20t_port *priv) {struct uart_port *port = &priv->port;struct circ_buf *xmit = &port->state->xmit; -int ret;int fifo_size;int tx_size;int size;
@@ -748,10 +746,9 @@ static unsigned int handle_tx(struct eg20t_port *priv)if (size <0 ) size = fifo_size; - tx_size =pop_tx (priv, xmit->buf, size); + tx_size =pop_tx (priv, size);if (tx_size >0 ) { - ret =pch_uart_hal_write (priv, xmit->buf, tx_size); - port->icount.tx += ret; + port->icount.tx += tx_size; tx_empty =0 ; }
Signature · 1 line
1.7.4.1
PATCH 57/76 pch_uart : Use dev_xxx not pr_xxx
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
For easy to understad which port the message is out, replace pr_xxx with dev_xxx.
--- drivers/tty/serial/pch_uart.c | 77 ++++++++++++++++++++++++++--------------- 1 files changed, 49 insertions(+), 28 deletions(-)
drivers/tty/serial/pch_uart.c +49 -28
@@ -282,7 +282,7 @@ static int pch_uart_hal_set_line(struct eg20t_port *priv, int baud, div =DIV_ROUND (priv->base_baud /16 , baud);if (div <0 ||USHRT_MAX <= div) { -pr_err ("Invalid Baud(div=0x%x)\n" , div); +dev_err (priv->port.dev,"Invalid Baud(div=0x%x)\n" , div);return -EINVAL ; }
@@ -290,17 +290,17 @@ static int pch_uart_hal_set_line(struct eg20t_port *priv, int baud, dlm = ((unsigned int )div >>8 ) &0x00FFU ;if (parity & ~(PCH_UART_LCR_PEN |PCH_UART_LCR_EPS |PCH_UART_LCR_SP )) { -pr_err ("Invalid parity(0x%x)\n" , parity); +dev_err (priv->port.dev,"Invalid parity(0x%x)\n" , parity);return -EINVAL ; }if (bits & ~PCH_UART_LCR_WLS ) { -pr_err ("Invalid bits(0x%x)\n" , bits); +dev_err (priv->port.dev,"Invalid bits(0x%x)\n" , bits);return -EINVAL ; }if (stb & ~PCH_UART_LCR_STB ) { -pr_err ("Invalid STB(0x%x)\n" , stb); +dev_err (priv->port.dev,"Invalid STB(0x%x)\n" , stb);return -EINVAL ; }
@@ -308,7 +308,7 @@ static int pch_uart_hal_set_line(struct eg20t_port *priv, int baud, lcr |= bits; lcr |= stb; -pr_debug ("%s:baud = %d, div = %04x, lcr = %02x (%lu)\n" , +dev_dbg (priv->port.dev,"%s:baud = %d, div = %04x, lcr = %02x (%lu)\n" , __func__, baud, div, lcr, jiffies);iowrite8 (PCH_UART_LCR_DLAB , priv->membase +UART_LCR );iowrite8 (dll, priv->membase +PCH_UART_DLL );
@@ -322,7 +322,8 @@ static int pch_uart_hal_fifo_reset(struct eg20t_port *priv, unsigned int flag) {if (flag & ~(PCH_UART_FCR_TFR |PCH_UART_FCR_RFR )) { -pr_err ("%s:Invalid flag(0x%x)\n" , __func__, flag); +dev_err (priv->port.dev,"%s:Invalid flag(0x%x)\n" , + __func__, flag);return -EINVAL ; }
@@ -341,17 +342,20 @@ static int pch_uart_hal_set_fifo(struct eg20t_port *priv,u8 fcr;if (dmamode & ~PCH_UART_FCR_DMS ) { -pr_err ("%s:Invalid DMA Mode(0x%x)\n" , __func__, dmamode); +dev_err (priv->port.dev,"%s:Invalid DMA Mode(0x%x)\n" , + __func__, dmamode);return -EINVAL ; }if (fifo_size & ~(PCH_UART_FCR_FIFOE |PCH_UART_FCR_FIFO256 )) { -pr_err ("%s:Invalid FIFO SIZE(0x%x)\n" , __func__, fifo_size); +dev_err (priv->port.dev,"%s:Invalid FIFO SIZE(0x%x)\n" , + __func__, fifo_size);return -EINVAL ; }if (trigger & ~PCH_UART_FCR_RFTL ) { -pr_err ("%s:Invalid TRIGGER(0x%x)\n" , __func__, trigger); +dev_err (priv->port.dev,"%s:Invalid TRIGGER(0x%x)\n" , + __func__, trigger);return -EINVAL ; }
@@ -455,7 +459,7 @@ static int push_rx(struct eg20t_port *priv, const unsigned char *buf, port = &priv->port; tty =tty_port_tty_get (&port->state->port);if (!tty) { -pr_debug ("%s:tty is busy now" , __func__); +dev_dbg (priv->port.dev,"%s:tty is busy now" , __func__);return -EBUSY ; }
@@ -472,8 +476,8 @@ static int pop_tx_x(struct eg20t_port *priv, unsigned char *buf)struct uart_port *port = &priv->port;if (port->x_char) { -pr_debug ("%s:X character send %02x (%lu)\n" , __func__, - port->x_char, jiffies); +dev_dbg (priv->port.dev,"%s:X character send %02x (%lu)\n" , + __func__, port->x_char, jiffies); buf[0 ] = port->x_char; port->x_char =0 ; ret =1 ;
@@ -493,7 +497,7 @@ static int dma_push_rx(struct eg20t_port *priv, int size) port = &priv->port; tty =tty_port_tty_get (&port->state->port);if (!tty) { -pr_debug ("%s:tty is busy now" , __func__); +dev_dbg (priv->port.dev,"%s:tty is busy now" , __func__);return 0 ; }
@@ -567,7 +571,8 @@ static void pch_request_dma(struct uart_port *port) param->tx_reg = port->mapbase +UART_TX ; chan =dma_request_channel (mask, filter, param);if (!chan) { -pr_err ("%s:dma_request_channel FAILS(Tx)\n" , __func__); +dev_err (priv->port.dev,"%s:dma_request_channel FAILS(Tx)\n" , + __func__);return ; } priv->chan_tx = chan;
@@ -579,7 +584,8 @@ static void pch_request_dma(struct uart_port *port) param->rx_reg = port->mapbase +UART_RX ; chan =dma_request_channel (mask, filter, param);if (!chan) { -pr_err ("%s:dma_request_channel FAILS(Rx)\n" , __func__); +dev_err (priv->port.dev,"%s:dma_request_channel FAILS(Rx)\n" , + __func__);dma_release_channel (priv->chan_tx);return ; }
@@ -598,7 +604,7 @@ static void pch_dma_rx_complete(void *arg)int count;if (!tty) { -pr_debug ("%s:tty is busy now" , __func__); +dev_dbg (priv->port.dev,"%s:tty is busy now" , __func__);return ; }
@@ -652,7 +658,7 @@ static int pop_tx(struct eg20t_port *priv, int size) }while (!uart_circ_empty (xmit) && count < size); pop_tx_end: -pr_debug ("%d characters. Remained %d characters. (%lu)\n" , +dev_dbg (priv->port.dev,"%d characters. Remained %d characters.(%lu)\n" , count, size - count, jiffies);return count;
@@ -728,7 +734,8 @@ static unsigned int handle_tx(struct eg20t_port *priv)int tx_empty;if (!priv->start_tx) { -pr_info ("%s:Tx isn't started. (%lu)\n" , __func__, jiffies); +dev_info (priv->port.dev,"%s:Tx isn't started. (%lu)\n" , + __func__, jiffies);pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_TX_INT ); priv->tx_empty =1 ;return 0 ;
@@ -778,7 +785,8 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)int rem;if (!priv->start_tx) { -pr_info ("%s:Tx isn't started. (%lu)\n" , __func__, jiffies); +dev_info (priv->port.dev,"%s:Tx isn't started. (%lu)\n" , + __func__, jiffies);pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_TX_INT ); priv->tx_empty =1 ;return 0 ;
@@ -797,6 +805,7 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) UART_XMIT_SIZE), CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE));if (!bytes) { +dev_dbg (priv->port.dev,"%s 0 bytes return\n" , __func__);pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_TX_INT );uart_write_wakeup (port);return 0 ;
@@ -812,6 +821,9 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) rem = bytes; } +dev_dbg (priv->port.dev,"%s num=%d size=%d rem=%d\n" , + __func__, num, size, rem); + priv->tx_dma_use =1 ; priv->sg_tx_p =kzalloc (sizeof (struct scatterlist )*num,GFP_ATOMIC );
@@ -831,7 +843,7 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) sg = priv->sg_tx_p; nent =dma_map_sg (port->dev, sg, num,DMA_TO_DEVICE );if (!nent) { -pr_err ("%s:dma_map_sg Failed\n" , __func__); +dev_err (priv->port.dev,"%s:dma_map_sg Failed\n" , __func__);return 0 ; } priv->nent = nent;
@@ -851,7 +863,8 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv) priv->sg_tx_p, nent,DMA_TO_DEVICE , DMA_PREP_INTERRUPT | DMA_CTRL_ACK);if (!desc) { -pr_err ("%s:device_prep_slave_sg Failed\n" , __func__); +dev_err (priv->port.dev,"%s:device_prep_slave_sg Failed\n" , + __func__);return 0 ; }dma_sync_sg_for_device (port->dev, priv->sg_tx_p, nent,DMA_TO_DEVICE );
@@ -935,7 +948,8 @@ static irqreturn_t pch_uart_interrupt(int irq, void *dev_id) ret =PCH_UART_HANDLED_MS_INT ;break ;default :/* Never junp to this label */ -pr_err ("%s:iid=%d (%lu)\n" , __func__, iid, jiffies); +dev_err (priv->port.dev,"%s:iid=%d (%lu)\n" , __func__, + iid, jiffies); ret =-1 ;break ; }
@@ -1024,9 +1038,13 @@ static void pch_uart_start_tx(struct uart_port *port) priv = container_of(port, struct eg20t_port, port); -if (priv->use_dma) -if (priv->tx_dma_use) +if (priv->use_dma) { +if (priv->tx_dma_use) { +dev_dbg (priv->port.dev,"%s : Tx DMA is NOT empty.\n" , + __func__);return ; + } + } priv->start_tx =1 ;pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_TX_INT );
@@ -1142,7 +1160,8 @@ static void pch_uart_shutdown(struct uart_port *port) ret =pch_uart_hal_set_fifo (priv,PCH_UART_HAL_DMA_MODE0 ,PCH_UART_HAL_FIFO_DIS ,PCH_UART_HAL_TRIGGER1 );if (ret) -pr_err ("pch_uart_hal_set_fifo Failed(ret=%d)\n" , ret); +dev_err (priv->port.dev, +"pch_uart_hal_set_fifo Failed(ret=%d)\n" , ret);if (priv->use_dma_flag)pch_free_dma (port);
@@ -1263,17 +1282,19 @@ static int pch_uart_verify_port(struct uart_port *port, priv = container_of(port, struct eg20t_port, port);if (serinfo->flags &UPF_LOW_LATENCY ) { -pr_info ("PCH UART : Use PIO Mode (without DMA)\n" ); +dev_info (priv->port.dev, +"PCH UART : Use PIO Mode (without DMA)\n" ); priv->use_dma =0 ; serinfo->flags &= ~UPF_LOW_LATENCY ; }else {#ifndef CONFIG_PCH_DMA -pr_err ("%s : PCH DMA is not Loaded.\n" , __func__); +dev_err (priv->port.dev,"%s : PCH DMA is not Loaded.\n" , + __func__);return -EOPNOTSUPP ;#endif priv->use_dma =1 ; priv->use_dma_flag =1 ; -pr_info ("PCH UART : Use DMA Mode\n" ); +dev_info (priv->port.dev,"PCH UART : Use DMA Mode\n" ); }return 0 ;
Signature · 1 line
1.7.4.1
PATCH 58/76 pch_uart: fix uart clock setting issue
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
Currently, uart clock is not set correctly.
This patch fixes the issue.
--- drivers/tty/serial/pch_uart.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/tty/serial/pch_uart.c +6 -1
@@ -1089,7 +1089,12 @@ static int pch_uart_startup(struct uart_port *port) priv = container_of(port, struct eg20t_port, port); priv->tx_empty =1 ; - port->uartclk = priv->base_baud; + +if (port->uartclk) + priv->base_baud = port->uartclk; +else + port->uartclk = priv->base_baud; +pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_ALL_INT ); ret = pch_uart_hal_set_line(priv, default_baud, PCH_UART_HAL_PARITY_NONE, PCH_UART_HAL_8BIT,
Signature · 1 line
1.7.4.1
PATCH 59/76 pch_uart: fix auto flow control miss-setting issue
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
Currently, auto-flow control setting processing is not set correctly. This patch fixes the issue.
--- drivers/tty/serial/pch_uart.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-)
drivers/tty/serial/pch_uart.c +13 -6
@@ -218,6 +218,7 @@ struct eg20t_port {struct pch_uart_buffer rxbuf;unsigned int dmsr;unsigned int fcr; +unsigned int mcr;unsigned int use_dma;unsigned int use_dma_flag;struct dma_async_tx_descriptor *desc_tx;
@@ -1007,7 +1008,6 @@ static unsigned int pch_uart_get_mctrl(struct uart_port *port)static void pch_uart_set_mctrl (struct uart_port *port,unsigned int mctrl) {u32 mcr =0 ; -unsigned int dat; struct eg20t_port *priv = container_of(port, struct eg20t_port, port);if (mctrl &TIOCM_DTR )
@@ -1017,11 +1017,11 @@ static void pch_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)if (mctrl &TIOCM_LOOP ) mcr |=UART_MCR_LOOP ; -if (mctrl) { - dat =pch_uart_get_mctrl (port); - dat |= mcr; -iowrite8 (dat, priv->membase +UART_MCR ); - } +if (priv->mcr &UART_MCR_AFE ) + mcr |=UART_MCR_AFE ; + +if (mctrl) +iowrite8 (mcr, priv->membase +UART_MCR ); }static void pch_uart_stop_tx (struct uart_port *port)
@@ -1215,6 +1215,13 @@ static void pch_uart_set_termios(struct uart_port *port, }else { parity =PCH_UART_HAL_PARITY_NONE ; } + +/* Only UART0 has auto hardware flow function */ +if ((termios->c_cflag &CRTSCTS ) && (priv->fifo_size ==256 )) + priv->mcr |=UART_MCR_AFE ; +else + priv->mcr &= ~UART_MCR_AFE ; + termios->c_cflag &= ~CMSPAR ;/* Mark/Space parity is not supported */ baud =uart_get_baud_rate (port, termios, old,0 , port->uartclk /16 );
Signature · 1 line
1.7.4.1
PATCH 60/76 pch_uart: fix exclusive access issue
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
--- drivers/tty/serial/pch_uart.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
drivers/tty/serial/pch_uart.c +9 -2
@@ -636,8 +636,7 @@ static void pch_dma_tx_complete(void *arg) priv->tx_dma_use =0 ; priv->nent =0 ;kfree (priv->sg_tx_p); -if (uart_circ_chars_pending (xmit)) -pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_TX_INT ); +pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_TX_INT ); }static int pop_tx (struct eg20t_port *priv,int size)
@@ -793,6 +792,14 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)return 0 ; } +if (priv->tx_dma_use) { +dev_dbg (priv->port.dev,"%s:Tx is not completed. (%lu)\n" , + __func__, jiffies); +pch_uart_hal_disable_interrupt (priv,PCH_UART_HAL_TX_INT ); + priv->tx_empty =1 ; +return 0 ; + } + fifo_size =max (priv->fifo_size,1 ); tx_empty =1 ;if (pop_tx_x (priv, xmit->buf)) {
Signature · 1 line
1.7.4.1
PATCH 61/76 pch_uart: Fix DMA channel miss-setting issue.
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
--- drivers/tty/serial/pch_uart.c | 59 ++++++++++++++++++++++++++++++++-------- 1 files changed, 47 insertions(+), 12 deletions(-)
drivers/tty/serial/pch_uart.c +47 -12
@@ -235,6 +235,36 @@ struct eg20t_port {dma_addr_t rx_buf_dma; }; +/** +* struct pch_uart_driver_data - private data structure for UART-DMA +* @port_type: The number of DMA channel +* @line_no: UART port line number (0, 1, 2...) +*/ +struct pch_uart_driver_data { +int port_type; +int line_no; +}; + +enum pch_uart_num_t { + pch_et20t_uart0 =0 , + pch_et20t_uart1, + pch_et20t_uart2, + pch_et20t_uart3, + pch_ml7213_uart0, + pch_ml7213_uart1, + pch_ml7213_uart2, +}; + +static struct pch_uart_driver_data drv_dat[] = { + [pch_et20t_uart0] = {PCH_UART_8LINE ,0 }, + [pch_et20t_uart1] = {PCH_UART_2LINE ,1 }, + [pch_et20t_uart2] = {PCH_UART_2LINE ,2 }, + [pch_et20t_uart3] = {PCH_UART_2LINE ,3 }, + [pch_ml7213_uart0] = {PCH_UART_8LINE ,0 }, + [pch_ml7213_uart1] = {PCH_UART_2LINE ,1 }, + [pch_ml7213_uart2] = {PCH_UART_2LINE ,2 }, +}; +static unsigned int default_baud =9600 ;static const int trigger_level_256[4 ] = {1 ,64 ,128 ,224 };static const int trigger_level_64[4 ] = {1 ,16 ,32 ,56 };
@@ -568,7 +598,8 @@ static void pch_request_dma(struct uart_port *port)/* Set Tx DMA */ param = &priv->param_tx; param->dma_dev = &dma_dev->dev; - param->chan_id = priv->port.line; + param->chan_id = priv->port.line *2 ;/* Tx = 0, 2, 4, ... */ + param->tx_reg = port->mapbase +UART_TX ; chan =dma_request_channel (mask, filter, param);if (!chan) {
@@ -581,7 +612,8 @@ static void pch_request_dma(struct uart_port *port)/* Set Rx DMA */ param = &priv->param_rx; param->dma_dev = &dma_dev->dev; - param->chan_id = priv->port.line +1 ;/* Rx = Tx + 1 */ + param->chan_id = priv->port.line *2 +1 ;/* Rx = Tx + 1 */ + param->rx_reg = port->mapbase +UART_RX ; chan =dma_request_channel (mask, filter, param);if (!chan) {
@@ -1358,8 +1390,11 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,unsigned int mapbase;unsigned char *rxbuf;int fifosize, base_baud; -static int num; -int port_type = id->driver_data; +int port_type; +struct pch_uart_driver_data *board; + + board = &drv_dat[id->driver_data]; + port_type = board->port_type; priv =kzalloc (sizeof (struct eg20t_port ),GFP_KERNEL );if (priv ==NULL )
@@ -1404,7 +1439,7 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev, priv->port.ops = &pch_uart_ops; priv->port.flags =UPF_BOOT_AUTOCONF ; priv->port.fifosize = fifosize; - priv->port.line = num++; + priv->port.line = board->line_no; priv->trigger =PCH_UART_HAL_TRIGGER_M ;spin_lock_init (&priv->port.lock);
@@ -1482,19 +1517,19 @@ static int pch_uart_pci_resume(struct pci_dev *pdev)static DEFINE_PCI_DEVICE_TABLE (pch_uart_pci_id) = { {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x8811 ), - .driver_data =PCH_UART_8LINE }, + .driver_data = pch_et20t_uart0}, {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x8812 ), - .driver_data =PCH_UART_2LINE }, + .driver_data = pch_et20t_uart1}, {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x8813 ), - .driver_data =PCH_UART_2LINE }, + .driver_data = pch_et20t_uart2}, {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x8814 ), - .driver_data =PCH_UART_2LINE }, + .driver_data = pch_et20t_uart3}, {PCI_DEVICE (PCI_VENDOR_ID_ROHM ,0x8027 ), - .driver_data =PCH_UART_8LINE }, + .driver_data = pch_ml7213_uart0}, {PCI_DEVICE (PCI_VENDOR_ID_ROHM ,0x8028 ), - .driver_data =PCH_UART_2LINE }, + .driver_data = pch_ml7213_uart1}, {PCI_DEVICE (PCI_VENDOR_ID_ROHM ,0x8029 ), - .driver_data =PCH_UART_2LINE }, + .driver_data = pch_ml7213_uart2}, {0 ,}, };
Signature · 1 line
1.7.4.1
PATCH 62/76 tty: forgot to remove ipwireless from drivers/char/pcmcia/Makefile
In reply to Greg Kroah-HartmanThis caused a build error. Many thanks to Stephen Rothwell for pointing this mistake out.
--- drivers/char/pcmcia/Makefile | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/char/pcmcia/Makefile +0 -2
@@ -4,8 +4,6 @@ # Makefile for the Linux PCMCIA char device drivers. # -obj-y += ipwireless/ - obj-$(CONFIG_SYNCLINK_CS) += synclink_cs.o obj-$(CONFIG_CARDMAN_4000) += cm4000_cs.o obj-$(CONFIG_CARDMAN_4040) += cm4040_cs.o
Signature · 1 line
1.7.4.1
PATCH 63/76 tty: phase out of ioctl file pointer for tty3270 as well
In reply to Greg Kroah-HartmanFrom: Heiko Carstens <[email protected]>
The patch "tty: now phase out the ioctl file pointer for good" missed the tty3270 driver. This is the missing piece.
--- drivers/s390/char/keyboard.c | 4 +--- drivers/s390/char/keyboard.h | 2 +- drivers/s390/char/tty3270.c | 14 ++++++-------- 3 files changed, 8 insertions(+), 12 deletions(-)
drivers/s390/char/keyboard.c +1 -3
@@ -455,9 +455,7 @@ do_kdgkb_ioctl(struct kbd_data *kbd, struct kbsentry __user *u_kbs,return 0 ; } -int -kbd_ioctl (struct kbd_data *kbd,struct file *file, -unsigned int cmd,unsigned long arg) +int kbd_ioctl (struct kbd_data *kbd,unsigned int cmd,unsigned long arg) {void __user *argp;int ct, perm;
drivers/s390/char/keyboard.h +1 -1
@@ -36,7 +36,7 @@ void kbd_free(struct kbd_data *);void kbd_ascebc (struct kbd_data *,unsigned char *);void kbd_keycode (struct kbd_data *,unsigned int ); -int kbd_ioctl (struct kbd_data *,struct file *,unsigned int ,unsigned long ); +int kbd_ioctl (struct kbd_data *,unsigned int ,unsigned long );/* * Helper Functions.
drivers/s390/char/tty3270.c +6 -8
@@ -1718,9 +1718,8 @@ tty3270_wait_until_sent(struct tty_struct *tty, int timeout) { } -static int -tty3270_ioctl (struct tty_struct *tty,struct file *file, -unsigned int cmd,unsigned long arg) +static int tty3270_ioctl (struct tty_struct *tty,unsigned int cmd, +unsigned long arg) {struct tty3270 *tp;
@@ -1729,13 +1728,12 @@ tty3270_ioctl(struct tty_struct *tty, struct file *file,return -ENODEV ;if (tty->flags & (1 <<TTY_IO_ERROR ))return -EIO ; -return kbd_ioctl (tp->kbd, file, cmd, arg); +return kbd_ioctl (tp->kbd, cmd, arg); }#ifdef CONFIG_COMPAT -static long -tty3270_compat_ioctl (struct tty_struct *tty,struct file *file, -unsigned int cmd,unsigned long arg) +static long tty3270_compat_ioctl (struct tty_struct *tty, +unsigned int cmd,unsigned long arg) {struct tty3270 *tp;
@@ -1744,7 +1742,7 @@ tty3270_compat_ioctl(struct tty_struct *tty, struct file *file,return -ENODEV ;if (tty->flags & (1 <<TTY_IO_ERROR ))return -EIO ; - return kbd_ioctl(tp->kbd, file, cmd, (unsigned long)compat_ptr(arg)); + return kbd_ioctl(tp->kbd, cmd, (unsigned long)compat_ptr(arg)); }#endif
Signature · 1 line
1.7.4.1
PATCH 64/76 MAINTAINERS: Update HVC file patterns
In reply to Greg Kroah-HartmanFrom: Joe Perches <[email protected]>
Commit 728674a7e466628df2aeec6d11a2ae1ef968fb67 ("tty: move hvc drivers to drivers/tty/hvc/") moved the files, update the patterns as appropriate.
--- MAINTAINERS | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
MAINTAINERS +2 -2
@@ -2819,7 +2819,7 @@ F: mm/hwpoison-inject.c HYPERVISOR VIRTUAL CONSOLE DRIVER L: [email protected] S: Odd Fixes -F: drivers/char/hvc_* +F: drivers/tty/hvc/ iSCSI BOOT FIRMWARE TABLE (iBFT) DRIVER M: Peter Jones <[email protected]>
@@ -6090,7 +6090,7 @@ M: Chris Metcalf <[email protected]> W: http://www.tilera.com/scm/ S: Supported F: arch/tile/ -F: drivers/char/hvc_tile.c +F: drivers/tty/hvc/hvc_tile.c F: drivers/net/tile/ TLAN NETWORK DRIVER
Signature · 1 line
1.7.4.1
PATCH 65/76 tty/serial: Relax the device_type restriction from of_serial
In reply to Greg Kroah-HartmanFrom: Grant Likely <[email protected]>
There is no need to test for a device_type property in ns8250 compatible serial ports. device_type is an OpenFirmware property that is not required when using the flattened tree representation.
--- drivers/tty/serial/of_serial.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
drivers/tty/serial/of_serial.c +9 -9
@@ -160,17 +160,17 @@ static int of_platform_serial_remove(struct platform_device *ofdev)* A few common types, add more as needed. */ static struct of_device_id __devinitdata of_platform_serial_table[] = { - { .type ="serial" , .compatible ="ns8250" , .data = (void *)PORT_8250 , }, - { .type ="serial" , .compatible ="ns16450" , .data = (void *)PORT_16450 , }, - { .type ="serial" , .compatible ="ns16550a" , .data = (void *)PORT_16550A , }, - { .type ="serial" , .compatible ="ns16550" , .data = (void *)PORT_16550 , }, - { .type ="serial" , .compatible ="ns16750" , .data = (void *)PORT_16750 , }, - { .type ="serial" , .compatible ="ns16850" , .data = (void *)PORT_16850 , }, + { .compatible ="ns8250" , .data = (void *)PORT_8250 , }, + { .compatible ="ns16450" , .data = (void *)PORT_16450 , }, + { .compatible ="ns16550a" , .data = (void *)PORT_16550A , }, + { .compatible ="ns16550" , .data = (void *)PORT_16550 , }, + { .compatible ="ns16750" , .data = (void *)PORT_16750 , }, + { .compatible ="ns16850" , .data = (void *)PORT_16850 , }, #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL - { .type ="serial" , .compatible ="ibm,qpace-nwp-serial" , - .data = (void *)PORT_NWPSERIAL , }, + { .compatible ="ibm,qpace-nwp-serial" , + .data = (void *)PORT_NWPSERIAL , }, #endif - { .type ="serial" , .data = (void *)PORT_UNKNOWN , }, + { .type ="serial" , .data = (void *)PORT_UNKNOWN , }, {/* end of list */ }, };
Signature · 1 line
1.7.4.1
PATCH 66/76 nozomi: don't use flush_scheduled_work()
In reply to Greg Kroah-HartmanFrom: Tejun Heo <[email protected]>
flush_scheduled_work() in tty_exit() doesn't seem to target any specific work. If it was to flush work items used in tty generic layer, they're already flushed properly during tty release.
flush_scheduled_work() is going away. Remove the seemingly redundant usage.
--- drivers/tty/nozomi.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/tty/nozomi.c +0 -2
@@ -1514,8 +1514,6 @@ static void __devexit tty_exit(struct nozomi *dc)DBG1 (" " ); -flush_scheduled_work (); -for (i =0 ; i <MAX_PORT ; ++i) {struct tty_struct *tty =tty_port_tty_get (&dc->port[i].port);if (tty &&list_empty (&tty->hangup_work.entry))
Signature · 1 line
1.7.4.1
PATCH 67/76 Staging: generic_serial: fix double locking bug
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
spin_lock_irqsave() is not nestable. The second time that it gets called it overwrites the "flags" variable and so IRQs can't be restored properly.
--- drivers/staging/generic_serial/generic_serial.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/generic_serial/generic_serial.c +2 -2
@@ -566,9 +566,9 @@ void gs_close(struct tty_struct * tty, struct file * filp)* line status register. */ -spin_lock_irqsave (&port->driver_lock, flags); +spin_lock (&port->driver_lock); port->rd->disable_rx_interrupts (port); -spin_unlock_irqrestore (&port->driver_lock, flags); +spin_unlock (&port->driver_lock);spin_unlock_irqrestore (&port->port.lock, flags);/* close has no way of returning "EINTR", so discard return value */
Signature · 1 line
1.7.4.1
PATCH 68/76 pcmcia: synclink_cs: fix prototype for mgslpc_ioctl()
In reply to Greg Kroah-HartmanFrom: Axel Lin <[email protected]>
The ioctl file pointer was removed in commit 6caa76 "tty: now phase out the ioctl file pointer for good".
Thus fix the prototype for mgslpc_ioctl() and eliminate below warning:
CC [M] drivers/char/pcmcia/synclink_cs.odrivers/char/pcmcia/synclink_cs.c:2787: warning: initialization from incompatible pointer type
--- drivers/char/pcmcia/synclink_cs.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/char/pcmcia/synclink_cs.c +1 -2
@@ -2222,13 +2222,12 @@ static int mgslpc_get_icount(struct tty_struct *tty,* Arguments: * * tty pointer to tty instance data -* file pointer to associated file object for device * cmd IOCTL command code * arg command argument/context * * Return Value: 0 if success, otherwise error code */ -static int mgslpc_ioctl (struct tty_struct *tty,struct file * file, +static int mgslpc_ioctl (struct tty_struct *tty,unsigned int cmd,unsigned long arg) {MGSLPC_INFO * info = (MGSLPC_INFO *)tty->driver_data;
Signature · 1 line
1.7.4.1
PATCH 69/76 Staging: tty: fix build with epca.c driver
In reply to Greg Kroah-HartmanI forgot to move the digi*.h files from drivers/char/ to drivers/staging/tty/
Thanks to Randy for pointing out the issue.
---
drivers/{char => staging/tty}/digi1.h | 0
drivers/{char => staging/tty}/digiFep1.h | 0
drivers/{char => staging/tty}/digiPCI.h | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename drivers/{char => staging/tty}/digi1.h (100%)
rename drivers/{char => staging/tty}/digiFep1.h (100%)
rename drivers/{char => staging/tty}/digiPCI.h (100%)drivers/staging/tty/digi1.h renamed from drivers/char/digi1.h +0 -0
drivers/staging/tty/digiFep1.h renamed from drivers/char/digiFep1.h +0 -0
drivers/staging/tty/digiPCI.h renamed from drivers/char/digiPCI.h +0 -0
Signature · 1 line
1.7.4.1
PATCH 70/76 tty: move cd1865.h to drivers/staging/tty/
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
The file is required by the specialix driver, which was moved to drivers/staging/.
---
drivers/{char => staging/tty}/cd1865.h | 0
1 files changed, 0 insertions(+), 0 deletions(-)
rename drivers/{char => staging/tty}/cd1865.h (100%)drivers/staging/tty/cd1865.h renamed from drivers/char/cd1865.h +0 -0
Signature · 1 line
1.7.4.1
PATCH 71/76 tty_audit: fix tty_audit_add_data live lock on audit disabled
In reply to Greg Kroah-HartmanFrom: Xiaotian Feng <[email protected]>
The current tty_audit_add_data code:
do {
size_t run;
run = N_TTY_BUF_SIZE - buf->valid;
if (run > size)
run = size;
memcpy(buf->data + buf->valid, data, run);
buf->valid += run;
data += run;
size -= run;
if (buf->valid == N_TTY_BUF_SIZE)
tty_audit_buf_push_current(buf);
} while (size != 0);If the current buffer is full, kernel will then call tty_audit_buf_push_current to empty the buffer. But if we disabled audit at the same time, tty_audit_buf_push() returns immediately if audit_enabled is zero. Without emptying the buffer. With obvious effect on tty_audit_add_data() that ends up spinning in that loop, copying 0 bytes at each iteration and attempting to push each time without any effect. Holding the lock all along.
--- drivers/tty/tty_audit.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/tty/tty_audit.c +3 -1
@@ -95,8 +95,10 @@ static void tty_audit_buf_push(struct task_struct *tsk, uid_t loginuid, {if (buf->valid ==0 )return ; -if (audit_enabled ==0 ) +if (audit_enabled ==0 ) { + buf->valid =0 ;return ; + }tty_audit_log ("tty" , tsk, loginuid, sessionid, buf->major, buf->minor, buf->data, buf->valid); buf->valid =0 ;
Signature · 1 line
1.7.4.1
PATCH 72/76 serial: msm_serial_hs: Add MSM high speed UART driver
In reply to Greg Kroah-HartmanFrom: Mayank Rana <[email protected]>
This driver supports UART-DM HW on MSM platforms. It uses the on chip DMA to drive data transfers and has optional support for UART power management independent of Linux suspend/resume and wakeup from Rx.
The driver was originally developed by Google. It is functionally equivalent to the version available at:
http://android.git.kernel.org/?p=kernel/experimental.git
the differences being:
1) Remove wakelocks and change unsupported DMA API.
2) Replace clock selection register codes by macros.
3) Fix checkpatch errors and add inline documentation.
4) Add runtime PM hooks for active power state transitions.
5) Handle error path and cleanup resources if required.
--- drivers/tty/serial/Kconfig | 12 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/msm_serial_hs.c | 1880 +++++++++++++++++++++++++++ include/linux/platform_data/msm_serial_hs.h | 49 + 4 files changed, 1942 insertions(+), 0 deletions(-) create mode 100644 drivers/tty/serial/msm_serial_hs.c create mode 100644 include/linux/platform_data/msm_serial_hs.h
drivers/tty/serial/Kconfig +12 -0
@@ -1319,6 +1319,18 @@ config SERIAL_MSM_CONSOLE depends on SERIAL_MSM=y select SERIAL_CORE_CONSOLE +config SERIAL_MSM_HS + tristate "MSM UART High Speed: Serial Driver" + depends on ARCH_MSM + select SERIAL_CORE + help + If you have a machine based on MSM family of SoCs, you + can enable its onboard high speed serial port by enabling + this option. + + Choose M here to compile it as a module. The module will be + called msm_serial_hs. + config SERIAL_VT8500 bool "VIA VT8500 on-chip serial port support" depends on ARM && ARCH_VT8500
drivers/tty/serial/Makefile +1 -0
@@ -76,6 +76,7 @@ obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o obj-$(CONFIG_SERIAL_ATMEL) += atmel_serial.o obj-$(CONFIG_SERIAL_UARTLITE) += uartlite.o obj-$(CONFIG_SERIAL_MSM) += msm_serial.o +obj-$(CONFIG_SERIAL_MSM_HS) += msm_serial_hs.o obj-$(CONFIG_SERIAL_NETX) += netx-serial.o obj-$(CONFIG_SERIAL_OF_PLATFORM) += of_serial.o obj-$(CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL) += nwpserial.o
drivers/tty/serial/msm_serial_hs.c new file +1880 -0
1,880 lines not on this page · raw message
include/linux/platform_data/msm_serial_hs.h new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 73/76 n_gsm: add a documentation
In reply to Greg Kroah-HartmanFrom: Eric Bénard <[email protected]>
* this documentation gives some details on how to get the n_gsm line discipline to work with modems supporting 07.10 basic option.
* it was tested on Telit and Simcom modems.
--- Documentation/serial/n_gsm.txt | 89 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 89 insertions(+), 0 deletions(-) create mode 100644 Documentation/serial/n_gsm.txt
Documentation/serial/n_gsm.txt new file +89 -0
@@ -0,0 +1,89 @@ +n_gsm.c GSM 0710 tty multiplexor HOWTO +=================================================== + +This line discipline implements the GSM 07.10 multiplexing protocol +detailed in the following 3GPP document : +http://www.3gpp.org/ftp/Specs/archive/07_series/07.10/0710-720.zip + +This document give some hints on how to use this driver with GPRS and 3G +modems connected to a physical serial port. + +How to use it +------------- +1- initialize the modem in 0710 mux mode (usually AT+CMUX= command) through +its serial port. Depending on the modem used, you can pass more or less +parameters to this command, +2- switch the serial line to using the n_gsm line discipline by using +TIOCSETD ioctl, +3- configure the mux using GSMIOC_GETCONF / GSMIOC_SETCONF ioctl, + +Major parts of the initialization program : +(a good starting point is util-linux-ng/sys-utils/ldattach.c) +#include <linux/gsmmux.h> +#define N_GSM0710 21 /* GSM 0710 Mux */ +#define DEFAULT_SPEED B115200 +#define SERIAL_PORT /dev/ttyS0 + + int ldisc = N_GSM0710; + struct gsm_config c; + struct termios configuration; + + /* open the serial port connected to the modem */ + fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY); + + /* configure the serial port : speed, flow control ... */ + + /* send the AT commands to switch the modem to CMUX mode + and check that it's succesful (should return OK) */ + write(fd, "AT+CMUX=0\r", 10); + + /* experience showed that some modems need some time before + being able to answer to the first MUX packet so a delay + may be needed here in some case */ + sleep(3); + + /* use n_gsm line discipline */ + ioctl(fd, TIOCSETD, &ldisc); + + /* get n_gsm configuration */ + ioctl(fd, GSMIOC_GETCONF, &c); + /* we are initiator and need encoding 0 (basic) */ + c.initiator = 1; + c.encapsulation = 0; + /* our modem defaults to a maximum size of 127 bytes */ + c.mru = 127; + c.mtu = 127; + /* set the new configuration */ + ioctl(fd, GSMIOC_SETCONF, &c); + + /* and wait for ever to keep the line discipline enabled */ + daemon(0,0); + pause(); + +4- create the devices corresponding to the "virtual" serial ports (take care, +each modem has its configuration and some DLC have dedicated functions, +for example GPS), starting with minor 1 (DLC0 is reserved for the management +of the mux) + +MAJOR=`cat /proc/devices |grep gsmtty | awk '{print $1}` +for i in `seq 1 4`; do + mknod /dev/ttygsm$i c $MAJOR $i +done + +5- use these devices as plain serial ports. +for example, it's possible : +- and to use gnokii to send / receive SMS on ttygsm1 +- to use ppp to establish a datalink on ttygsm2 + +6- first close all virtual ports before closing the physical port. + +Additional Documentation +------------------------ +More practical details on the protocol and how it's supported by industrial +modems can be found in the following documents : +http://www.telit.com/module/infopool/download.php?id=616 +http://www.u-blox.com/images/downloads/Product_Docs/LEON-G100-G200-MuxImplementation_ApplicationNote_%28GSM%20G1-CS-10002%29.pdf +http://www.sierrawireless.com/Support/Downloads/AirPrime/WMP_Series/~/media/Support_Downloads/AirPrime/Application_notes/CMUX_Feature_Application_Note-Rev004.ashx +http://wm.sim.com/sim/News/photo/2010721161442.pdf + +11-03-08 - Eric Bénard - <[email protected]>
Signature · 6 lines
1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 74/76 n_gsm: fix UIH control byte : P bit should be 0
In reply to Greg Kroah-HartmanFrom: Eric Bénard <[email protected]>
* the GSM 07.10 specification says in 5.4.3.1 that 'both stations shall set the P bit to 0'
thanks to Alan Cox for finding this explanation in the spec
* without this fix, on Telit & Sim.com modems, opening a new DLC randomly fails. Not setting PF bit of the control byte gives a reliable behaviour on these modems.
--- drivers/tty/n_gsm.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/tty/n_gsm.c +1 -2
@@ -1250,8 +1250,7 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,static void gsm_control_transmit (struct gsm_mux *gsm,struct gsm_control *ctrl) { -struct gsm_msg *msg =gsm_data_alloc (gsm,0 , ctrl->len +1 , - gsm->ftype|PF ); +struct gsm_msg *msg =gsm_data_alloc (gsm,0 , ctrl->len +1 , gsm->ftype);if (msg ==NULL )return ; msg->data[0 ] = (ctrl->cmd <<1 ) |2 |EA ;/* command */
Signature · 6 lines
1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 75/76 pch_phub: add new device ML7213
In reply to Greg Kroah-HartmanFrom: Tomoya MORINAGA <[email protected]>
Add ML7213 device information.
ML7213 is companion chip of Intel Atom E6xx series for IVI(In-Vehicle Infotainment). ML7213 is completely compatible for Intel EG20T PCH.
--- drivers/misc/Kconfig | 7 ++++- drivers/misc/pch_phub.c | 69 ++++++++++++++++++++++++++++++++--------------- 2 files changed, 53 insertions(+), 23 deletions(-)
drivers/misc/Kconfig +6 -1
@@ -441,7 +441,7 @@ config BMP085 module will be called bmp085. config PCH_PHUB - tristate "PCH Packet Hub of Intel Topcliff" + tristate "PCH Packet Hub of Intel Topcliff / OKI SEMICONDUCTOR ML7213" depends on PCI help This driver is for PCH(Platform controller Hub) PHUB(Packet Hub) of
@@ -449,6 +449,11 @@ config PCH_PHUB processor. The Topcliff has MAC address and Option ROM data in SROM. This driver can access MAC address and Option ROM data in SROM. + This driver also can be used for OKI SEMICONDUCTOR's ML7213 which is + for IVI(In-Vehicle Infotainment) use. + ML7213 is companion chip for Intel Atom E6xx series. + ML7213 is completely compatible for Intel EG20T PCH. + To compile this driver as a module, choose M here: the module will be called pch_phub.
drivers/misc/pch_phub.c +47 -22
110 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 76/76 pch_uart: reference clock on CM-iTC
In reply to Greg Kroah-HartmanFrom: Denis Turischev <[email protected]>
Default clock source for UARTs on Topcliff is external UART_CLK. On CM-iTC USB_48MHz is used instead. After VCO2PLL and DIV manipulations UARTs will receive 192 MHz.
Clock manipulations on Topcliff are controlled in pch_phub.c
v2: redone against the linux-next tree
v3: redone against linux/kernel/git/next/linux-next.git snapshot
--- drivers/misc/pch_phub.c | 16 ++++++++++++++++ drivers/tty/serial/pch_uart.c | 9 +++++++-- 2 files changed, 23 insertions(+), 2 deletions(-)
drivers/misc/pch_phub.c +16 -0
@@ -27,6 +27,7 @@#include <linux/mutex.h> #include <linux/if_ether.h> #include <linux/ctype.h> +#include <linux/dmi.h> #define PHUB_STATUS 0x00/* Status Register offset */ #define PHUB_CONTROL 0x04/* Control Register offset */
@@ -46,6 +47,13 @@#define PCH_MINOR_NOS 1#define CLKCFG_CAN_50MHZ 0x12000000#define CLKCFG_CANCLK_MASK 0xFF000000 +#define CLKCFG_UART_MASK 0xFFFFFF + +/* CM-iTC */ +#define CLKCFG_UART_48MHZ (1 << 16) +#define CLKCFG_BAUDDIV (2 << 20) +#define CLKCFG_PLL2VCO (8 << 9) +#define CLKCFG_UARTCLKSEL (1 << 18)/* Macros for ML7213 */ #define PCI_VENDOR_ID_ROHM 0x10db
@@ -618,6 +626,14 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev,CLKCFG_CAN_50MHZ , CLKCFG_CANCLK_MASK); +/* quirk for CM-iTC board */ +if (strstr (dmi_get_system_info (DMI_BOARD_NAME ),"CM-iTC" )) +pch_phub_read_modify_write_reg (chip, + (unsigned int )CLKCFG_REG_OFFSET , +CLKCFG_UART_48MHZ |CLKCFG_BAUDDIV | +CLKCFG_PLL2VCO |CLKCFG_UARTCLKSEL , +CLKCFG_UART_MASK ); +/* set the prefech value */ iowrite32 (0x000affaa , chip->pch_phub_base_address +0x14 );/* set the interrupt delay value */
drivers/tty/serial/pch_uart.c +7 -2
@@ -21,6 +21,7 @@#include <linux/serial_core.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/dmi.h> #include <linux/dmaengine.h> #include <linux/pch_dma.h>
@@ -1404,14 +1405,18 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,if (!rxbuf) goto init_port_free_txbuf; + base_baud =1843200 ;/* 1.8432MHz */ + +/* quirk for CM-iTC board */ +if (strstr (dmi_get_system_info (DMI_BOARD_NAME ),"CM-iTC" )) + base_baud =192000000 ;/* 192.0MHz */ +switch (port_type) {case PORT_UNKNOWN : fifosize =256 ;/* EG20T/ML7213: UART0 */ - base_baud =1843200 ;/* 1.8432MHz */ break ;case PORT_8250 : fifosize =64 ;/* EG20T:UART1~3 ML7213: UART1~2*/ - base_baud =1843200 ;/* 1.8432MHz */ break ;default :dev_err (&pdev->dev,"Invalid Port Type(=%d)\n" , port_type);
Signature · 1 line
1.7.4.1