You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'tty-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty and serial driver updates from Greg KH: "Here's the large TTY and Serial driver update for 4.7-rc1. A few new serial drivers are added here, and Peter has fixed a bunch of long-standing bugs in the tty layer and serial drivers as normal. Full details in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (88 commits) MAINTAINERS: 8250: remove website reference serial: core: Fix port mutex assert if lockdep disabled serial: 8250_dw: fix wrong logic in dw8250_check_lcr() tty: vt, finish looping on duplicate tty: vt, return error when con_startup fails QE-UART: add "fsl,t1040-ucc-uart" to of_device_id serial: mctrl_gpio: Drop support for out1-gpios and out2-gpios serial: 8250dw: Add device HID for future AMD UART controller Fix OpenSSH pty regression on close serial: mctrl_gpio: add IRQ locking serial: 8250: Integrate Fintek into 8250_base serial: mps2-uart: add support for early console serial: mps2-uart: add MPS2 UART driver dt-bindings: document the MPS2 UART bindings serial: sirf: Use generic uart-has-rtscts DT property serial: sirf: Introduce helper variable struct device_node *np serial: mxs-auart: Use generic uart-has-rtscts DT property serial: imx: Use generic uart-has-rtscts DT property doc: DT: Add Generic Serial Device Tree Bindings serial: 8250: of: Make tegra_serial_handle_break() static ...
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
ARM MPS2 UART
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible : Should be "arm,mps2-uart"
|
||||||
|
- reg : Address and length of the register set
|
||||||
|
- interrupts : Reference to the UART RX, TX and overrun interrupts
|
||||||
|
|
||||||
|
Required clocking property:
|
||||||
|
- clocks : The input clock of the UART
|
||||||
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
uart0: serial@40004000 {
|
||||||
|
compatible = "arm,mps2-uart";
|
||||||
|
reg = <0x40004000 0x1000>;
|
||||||
|
interrupts = <0 1 12>;
|
||||||
|
clocks = <&sysclk>;
|
||||||
|
};
|
||||||
@@ -6,7 +6,7 @@ Required properties:
|
|||||||
- interrupts : Should contain uart interrupt
|
- interrupts : Should contain uart interrupt
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- fsl,uart-has-rtscts : Indicate the uart has rts and cts
|
- uart-has-rtscts : Indicate the uart has rts and cts
|
||||||
- fsl,irda-mode : Indicate the uart supports irda mode
|
- fsl,irda-mode : Indicate the uart supports irda mode
|
||||||
- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
|
- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
|
||||||
in DCE mode by default.
|
in DCE mode by default.
|
||||||
@@ -24,6 +24,6 @@ uart1: serial@73fbc000 {
|
|||||||
compatible = "fsl,imx51-uart", "fsl,imx21-uart";
|
compatible = "fsl,imx51-uart", "fsl,imx21-uart";
|
||||||
reg = <0x73fbc000 0x4000>;
|
reg = <0x73fbc000 0x4000>;
|
||||||
interrupts = <31>;
|
interrupts = <31>;
|
||||||
fsl,uart-has-rtscts;
|
uart-has-rtscts;
|
||||||
fsl,dte-mode;
|
fsl,dte-mode;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
* Freescale MXS Application UART (AUART)
|
* Freescale MXS Application UART (AUART)
|
||||||
|
|
||||||
Required properties:
|
Required properties for all SoCs:
|
||||||
- compatible : Should be "fsl,<soc>-auart". The supported SoCs include
|
- compatible : Should be one of fallowing variants:
|
||||||
imx23 and imx28.
|
"fsl,imx23-auart" - Freescale i.MX23
|
||||||
|
"fsl,imx28-auart" - Freescale i.MX28
|
||||||
|
"alphascale,asm9260-auart" - Alphascale ASM9260
|
||||||
- reg : Address and length of the register set for the device
|
- reg : Address and length of the register set for the device
|
||||||
- interrupts : Should contain the auart interrupt numbers
|
- interrupts : Should contain the auart interrupt numbers
|
||||||
- dmas: DMA specifier, consisting of a phandle to DMA controller node
|
- dmas: DMA specifier, consisting of a phandle to DMA controller node
|
||||||
@@ -10,8 +12,14 @@ Required properties:
|
|||||||
Refer to dma.txt and fsl-mxs-dma.txt for details.
|
Refer to dma.txt and fsl-mxs-dma.txt for details.
|
||||||
- dma-names: "rx" for RX channel, "tx" for TX channel.
|
- dma-names: "rx" for RX channel, "tx" for TX channel.
|
||||||
|
|
||||||
|
Required properties for "alphascale,asm9260-auart":
|
||||||
|
- clocks : the clocks feeding the watchdog timer. See clock-bindings.txt
|
||||||
|
- clock-names : should be set to
|
||||||
|
"mod" - source for tick counter.
|
||||||
|
"ahb" - ahb gate.
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- fsl,uart-has-rtscts : Indicate the UART has RTS and CTS lines
|
- uart-has-rtscts : Indicate the UART has RTS and CTS lines
|
||||||
for hardware flow control,
|
for hardware flow control,
|
||||||
it also means you enable the DMA support for this UART.
|
it also means you enable the DMA support for this UART.
|
||||||
- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD
|
- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
Generic Serial DT Bindings
|
||||||
|
|
||||||
|
This document lists a set of generic properties for describing UARTs in a
|
||||||
|
device tree. Whether these properties apply to a particular device depends on
|
||||||
|
the DT bindings for the actual device.
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
- cts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
|
||||||
|
used as the UART's CTS line.
|
||||||
|
- dcd-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
|
||||||
|
used as the UART's DCD line.
|
||||||
|
- dsr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
|
||||||
|
used as the UART's DSR line.
|
||||||
|
- dtr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
|
||||||
|
used as the UART's DTR line.
|
||||||
|
- rng-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
|
||||||
|
used as the UART's RNG line.
|
||||||
|
- rts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
|
||||||
|
used as the UART's RTS line.
|
||||||
|
|
||||||
|
- uart-has-rtscts: The presence of this property indicates that the
|
||||||
|
UART has dedicated lines for RTS/CTS hardware flow control, and that
|
||||||
|
they are available for use (wired and enabled by pinmux configuration).
|
||||||
|
This depends on both the UART hardware and the board wiring.
|
||||||
|
Note that this property is mutually-exclusive with "cts-gpios" and
|
||||||
|
"rts-gpios" above.
|
||||||
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
uart1: serial@48022000 {
|
||||||
|
compatible = "ti,am3352-uart", "ti,omap3-uart";
|
||||||
|
ti,hwmods = "uart2";
|
||||||
|
clock-frequency = <48000000>;
|
||||||
|
reg = <0x48022000 0x2000>;
|
||||||
|
interrupts = <73>;
|
||||||
|
dmas = <&edma 28 0>, <&edma 29 0>;
|
||||||
|
dma-names = "tx", "rx";
|
||||||
|
dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
|
||||||
|
dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
|
||||||
|
dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
|
||||||
|
rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
|
||||||
|
cts-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
|
||||||
|
rts-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
scifa4: serial@e6c80000 {
|
||||||
|
compatible = "renesas,scifa-sh73a0", "renesas,scifa";
|
||||||
|
reg = <0xe6c80000 0x100>;
|
||||||
|
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>;
|
||||||
|
clock-names = "fck";
|
||||||
|
power-domains = <&pd_a3sp>;
|
||||||
|
uart-has-rtscts;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
@@ -9,9 +9,9 @@ Required properties:
|
|||||||
- clocks : Should contain uart clock number
|
- clocks : Should contain uart clock number
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- sirf,uart-has-rtscts: we have hardware flow controller pins in hardware
|
- uart-has-rtscts: we have hardware flow controller pins in hardware
|
||||||
- rts-gpios: RTS pin for USP-based UART if sirf,uart-has-rtscts is true
|
- rts-gpios: RTS pin for USP-based UART if uart-has-rtscts is true
|
||||||
- cts-gpios: CTS pin for USP-based UART if sirf,uart-has-rtscts is true
|
- cts-gpios: CTS pin for USP-based UART if uart-has-rtscts is true
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ On the board-specific dts, we can put rts-gpios and cts-gpios like
|
|||||||
|
|
||||||
usp@b0090000 {
|
usp@b0090000 {
|
||||||
compatible = "sirf,prima2-usp-uart";
|
compatible = "sirf,prima2-usp-uart";
|
||||||
sirf,uart-has-rtscts;
|
uart-has-rtscts;
|
||||||
rts-gpios = <&gpio 15 0>;
|
rts-gpios = <&gpio 15 0>;
|
||||||
cts-gpios = <&gpio 46 0>;
|
cts-gpios = <&gpio 46 0>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1054,6 +1054,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
|||||||
the driver will use only 32-bit accessors to read/write
|
the driver will use only 32-bit accessors to read/write
|
||||||
the device registers.
|
the device registers.
|
||||||
|
|
||||||
|
meson,<addr>
|
||||||
|
Start an early, polled-mode console on a meson serial
|
||||||
|
port at the specified address. The serial port must
|
||||||
|
already be setup and configured. Options are not yet
|
||||||
|
supported.
|
||||||
|
|
||||||
msm_serial,<addr>
|
msm_serial,<addr>
|
||||||
Start an early, polled-mode console on an msm serial
|
Start an early, polled-mode console on an msm serial
|
||||||
port at the specified address. The serial port
|
port at the specified address. The serial port
|
||||||
|
|||||||
@@ -210,9 +210,6 @@ TTY_IO_ERROR If set, causes all subsequent userspace read/write
|
|||||||
|
|
||||||
TTY_OTHER_CLOSED Device is a pty and the other side has closed.
|
TTY_OTHER_CLOSED Device is a pty and the other side has closed.
|
||||||
|
|
||||||
TTY_OTHER_DONE Device is a pty and the other side has closed and
|
|
||||||
all pending input processing has been completed.
|
|
||||||
|
|
||||||
TTY_NO_WRITE_SPLIT Prevent driver from splitting up writes into
|
TTY_NO_WRITE_SPLIT Prevent driver from splitting up writes into
|
||||||
smaller chunks.
|
smaller chunks.
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ F: drivers/net/ethernet/realtek/r8169.c
|
|||||||
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
|
8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
|
||||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
L: linux-serial@vger.kernel.org
|
L: linux-serial@vger.kernel.org
|
||||||
W: http://serial.sourceforge.net
|
|
||||||
S: Maintained
|
S: Maintained
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
|
||||||
F: drivers/tty/serial/8250*
|
F: drivers/tty/serial/8250*
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ static int rs_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
|
|||||||
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
|
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
|
||||||
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
|
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
|
||||||
(cmd != TIOCMIWAIT)) {
|
(cmd != TIOCMIWAIT)) {
|
||||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
if (tty_io_error(tty))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(void __iomem *reg, u32 mask, u32 val)
|
|||||||
} while (1);
|
} while (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
|
||||||
|
|
||||||
static void prom_putchar_ar71xx(unsigned char ch)
|
static void prom_putchar_ar71xx(unsigned char ch)
|
||||||
{
|
{
|
||||||
void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE));
|
void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE));
|
||||||
|
|
||||||
prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE);
|
prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY);
|
||||||
__raw_writel(ch, base + UART_TX * 4);
|
__raw_writel(ch, base + UART_TX * 4);
|
||||||
prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE);
|
prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prom_putchar_ar933x(unsigned char ch)
|
static void prom_putchar_ar933x(unsigned char ch)
|
||||||
|
|||||||
@@ -1101,7 +1101,7 @@ static void dcd_change(MGSLPC_INFO *info, struct tty_struct *tty)
|
|||||||
wake_up_interruptible(&info->status_event_wait_q);
|
wake_up_interruptible(&info->status_event_wait_q);
|
||||||
wake_up_interruptible(&info->event_wait_q);
|
wake_up_interruptible(&info->event_wait_q);
|
||||||
|
|
||||||
if (info->port.flags & ASYNC_CHECK_CD) {
|
if (tty_port_check_carrier(&info->port)) {
|
||||||
if (debug_level >= DEBUG_LEVEL_ISR)
|
if (debug_level >= DEBUG_LEVEL_ISR)
|
||||||
printk("%s CD now %s...", info->device_name,
|
printk("%s CD now %s...", info->device_name,
|
||||||
(info->serial_signals & SerialSignal_DCD) ? "on" : "off");
|
(info->serial_signals & SerialSignal_DCD) ? "on" : "off");
|
||||||
@@ -1272,7 +1272,7 @@ static int startup(MGSLPC_INFO * info, struct tty_struct *tty)
|
|||||||
if (debug_level >= DEBUG_LEVEL_INFO)
|
if (debug_level >= DEBUG_LEVEL_INFO)
|
||||||
printk("%s(%d):startup(%s)\n", __FILE__, __LINE__, info->device_name);
|
printk("%s(%d):startup(%s)\n", __FILE__, __LINE__, info->device_name);
|
||||||
|
|
||||||
if (info->port.flags & ASYNC_INITIALIZED)
|
if (tty_port_initialized(&info->port))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!info->tx_buf) {
|
if (!info->tx_buf) {
|
||||||
@@ -1311,7 +1311,7 @@ static int startup(MGSLPC_INFO * info, struct tty_struct *tty)
|
|||||||
if (tty)
|
if (tty)
|
||||||
clear_bit(TTY_IO_ERROR, &tty->flags);
|
clear_bit(TTY_IO_ERROR, &tty->flags);
|
||||||
|
|
||||||
info->port.flags |= ASYNC_INITIALIZED;
|
tty_port_set_initialized(&info->port, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1322,7 +1322,7 @@ static void shutdown(MGSLPC_INFO * info, struct tty_struct *tty)
|
|||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (!(info->port.flags & ASYNC_INITIALIZED))
|
if (!tty_port_initialized(&info->port))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (debug_level >= DEBUG_LEVEL_INFO)
|
if (debug_level >= DEBUG_LEVEL_INFO)
|
||||||
@@ -1361,7 +1361,7 @@ static void shutdown(MGSLPC_INFO * info, struct tty_struct *tty)
|
|||||||
if (tty)
|
if (tty)
|
||||||
set_bit(TTY_IO_ERROR, &tty->flags);
|
set_bit(TTY_IO_ERROR, &tty->flags);
|
||||||
|
|
||||||
info->port.flags &= ~ASYNC_INITIALIZED;
|
tty_port_set_initialized(&info->port, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mgslpc_program_hw(MGSLPC_INFO *info, struct tty_struct *tty)
|
static void mgslpc_program_hw(MGSLPC_INFO *info, struct tty_struct *tty)
|
||||||
@@ -1466,15 +1466,8 @@ static void mgslpc_change_params(MGSLPC_INFO *info, struct tty_struct *tty)
|
|||||||
}
|
}
|
||||||
info->timeout += HZ/50; /* Add .02 seconds of slop */
|
info->timeout += HZ/50; /* Add .02 seconds of slop */
|
||||||
|
|
||||||
if (cflag & CRTSCTS)
|
tty_port_set_cts_flow(&info->port, cflag & CRTSCTS);
|
||||||
info->port.flags |= ASYNC_CTS_FLOW;
|
tty_port_set_check_carrier(&info->port, ~cflag & CLOCAL);
|
||||||
else
|
|
||||||
info->port.flags &= ~ASYNC_CTS_FLOW;
|
|
||||||
|
|
||||||
if (cflag & CLOCAL)
|
|
||||||
info->port.flags &= ~ASYNC_CHECK_CD;
|
|
||||||
else
|
|
||||||
info->port.flags |= ASYNC_CHECK_CD;
|
|
||||||
|
|
||||||
/* process tty input control flags */
|
/* process tty input control flags */
|
||||||
|
|
||||||
@@ -2246,7 +2239,7 @@ static int mgslpc_ioctl(struct tty_struct *tty,
|
|||||||
|
|
||||||
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
|
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
|
||||||
(cmd != TIOCMIWAIT)) {
|
(cmd != TIOCMIWAIT)) {
|
||||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
if (tty_io_error(tty))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2316,7 +2309,7 @@ static void mgslpc_set_termios(struct tty_struct *tty, struct ktermios *old_term
|
|||||||
/* Handle transition away from B0 status */
|
/* Handle transition away from B0 status */
|
||||||
if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) {
|
if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) {
|
||||||
info->serial_signals |= SerialSignal_DTR;
|
info->serial_signals |= SerialSignal_DTR;
|
||||||
if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags))
|
if (!C_CRTSCTS(tty) || !tty_throttled(tty))
|
||||||
info->serial_signals |= SerialSignal_RTS;
|
info->serial_signals |= SerialSignal_RTS;
|
||||||
spin_lock_irqsave(&info->lock, flags);
|
spin_lock_irqsave(&info->lock, flags);
|
||||||
set_signals(info);
|
set_signals(info);
|
||||||
@@ -2345,7 +2338,7 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
|
|||||||
if (tty_port_close_start(port, tty, filp) == 0)
|
if (tty_port_close_start(port, tty, filp) == 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (port->flags & ASYNC_INITIALIZED)
|
if (tty_port_initialized(port))
|
||||||
mgslpc_wait_until_sent(tty, info->timeout);
|
mgslpc_wait_until_sent(tty, info->timeout);
|
||||||
|
|
||||||
mgslpc_flush_buffer(tty);
|
mgslpc_flush_buffer(tty);
|
||||||
@@ -2378,7 +2371,7 @@ static void mgslpc_wait_until_sent(struct tty_struct *tty, int timeout)
|
|||||||
if (mgslpc_paranoia_check(info, tty->name, "mgslpc_wait_until_sent"))
|
if (mgslpc_paranoia_check(info, tty->name, "mgslpc_wait_until_sent"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(info->port.flags & ASYNC_INITIALIZED))
|
if (!tty_port_initialized(&info->port))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
orig_jiffies = jiffies;
|
orig_jiffies = jiffies;
|
||||||
|
|||||||
@@ -629,8 +629,7 @@ static void ipoctal_hangup(struct tty_struct *tty)
|
|||||||
tty_port_hangup(&channel->tty_port);
|
tty_port_hangup(&channel->tty_port);
|
||||||
|
|
||||||
ipoctal_reset_channel(channel);
|
ipoctal_reset_channel(channel);
|
||||||
|
tty_port_set_initialized(&channel->tty_port, 0);
|
||||||
clear_bit(ASYNCB_INITIALIZED, &channel->tty_port.flags);
|
|
||||||
wake_up_interruptible(&channel->tty_port.open_wait);
|
wake_up_interruptible(&channel->tty_port.open_wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -642,7 +641,7 @@ static void ipoctal_shutdown(struct tty_struct *tty)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ipoctal_reset_channel(channel);
|
ipoctal_reset_channel(channel);
|
||||||
clear_bit(ASYNCB_INITIALIZED, &channel->tty_port.flags);
|
tty_port_set_initialized(&channel->tty_port, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ipoctal_cleanup(struct tty_struct *tty)
|
static void ipoctal_cleanup(struct tty_struct *tty)
|
||||||
|
|||||||
+19
-25
@@ -1043,17 +1043,13 @@ isdn_tty_change_speed(modem_info *info)
|
|||||||
if (!(cflag & PARODD))
|
if (!(cflag & PARODD))
|
||||||
cval |= UART_LCR_EPAR;
|
cval |= UART_LCR_EPAR;
|
||||||
|
|
||||||
if (cflag & CLOCAL)
|
tty_port_set_check_carrier(port, ~cflag & CLOCAL);
|
||||||
port->flags &= ~ASYNC_CHECK_CD;
|
|
||||||
else {
|
|
||||||
port->flags |= ASYNC_CHECK_CD;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
isdn_tty_startup(modem_info *info)
|
isdn_tty_startup(modem_info *info)
|
||||||
{
|
{
|
||||||
if (info->port.flags & ASYNC_INITIALIZED)
|
if (tty_port_initialized(&info->port))
|
||||||
return 0;
|
return 0;
|
||||||
isdn_lock_drivers();
|
isdn_lock_drivers();
|
||||||
#ifdef ISDN_DEBUG_MODEM_OPEN
|
#ifdef ISDN_DEBUG_MODEM_OPEN
|
||||||
@@ -1070,7 +1066,7 @@ isdn_tty_startup(modem_info *info)
|
|||||||
*/
|
*/
|
||||||
isdn_tty_change_speed(info);
|
isdn_tty_change_speed(info);
|
||||||
|
|
||||||
info->port.flags |= ASYNC_INITIALIZED;
|
tty_port_set_initialized(&info->port, 1);
|
||||||
info->msr |= (UART_MSR_DSR | UART_MSR_CTS);
|
info->msr |= (UART_MSR_DSR | UART_MSR_CTS);
|
||||||
info->send_outstanding = 0;
|
info->send_outstanding = 0;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1083,7 +1079,7 @@ isdn_tty_startup(modem_info *info)
|
|||||||
static void
|
static void
|
||||||
isdn_tty_shutdown(modem_info *info)
|
isdn_tty_shutdown(modem_info *info)
|
||||||
{
|
{
|
||||||
if (!(info->port.flags & ASYNC_INITIALIZED))
|
if (!tty_port_initialized(&info->port))
|
||||||
return;
|
return;
|
||||||
#ifdef ISDN_DEBUG_MODEM_OPEN
|
#ifdef ISDN_DEBUG_MODEM_OPEN
|
||||||
printk(KERN_DEBUG "Shutting down isdnmodem port %d ....\n", info->line);
|
printk(KERN_DEBUG "Shutting down isdnmodem port %d ....\n", info->line);
|
||||||
@@ -1103,7 +1099,7 @@ isdn_tty_shutdown(modem_info *info)
|
|||||||
if (info->port.tty)
|
if (info->port.tty)
|
||||||
set_bit(TTY_IO_ERROR, &info->port.tty->flags);
|
set_bit(TTY_IO_ERROR, &info->port.tty->flags);
|
||||||
|
|
||||||
info->port.flags &= ~ASYNC_INITIALIZED;
|
tty_port_set_initialized(&info->port, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* isdn_tty_write() is the main send-routine. It is called from the upper
|
/* isdn_tty_write() is the main send-routine. It is called from the upper
|
||||||
@@ -1351,7 +1347,7 @@ isdn_tty_tiocmget(struct tty_struct *tty)
|
|||||||
|
|
||||||
if (isdn_tty_paranoia_check(info, tty->name, __func__))
|
if (isdn_tty_paranoia_check(info, tty->name, __func__))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
if (tty_io_error(tty))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
mutex_lock(&modem_info_mutex);
|
mutex_lock(&modem_info_mutex);
|
||||||
@@ -1378,7 +1374,7 @@ isdn_tty_tiocmset(struct tty_struct *tty,
|
|||||||
|
|
||||||
if (isdn_tty_paranoia_check(info, tty->name, __func__))
|
if (isdn_tty_paranoia_check(info, tty->name, __func__))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
if (tty_io_error(tty))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
#ifdef ISDN_DEBUG_MODEM_IOCTL
|
#ifdef ISDN_DEBUG_MODEM_IOCTL
|
||||||
@@ -1419,7 +1415,7 @@ isdn_tty_ioctl(struct tty_struct *tty, uint cmd, ulong arg)
|
|||||||
|
|
||||||
if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_ioctl"))
|
if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_ioctl"))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
if (tty_io_error(tty))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case TCSBRK: /* SVID version: non-zero arg --> no break */
|
case TCSBRK: /* SVID version: non-zero arg --> no break */
|
||||||
@@ -1581,7 +1577,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
|
|||||||
* interrupt driver to stop checking the data ready bit in the
|
* interrupt driver to stop checking the data ready bit in the
|
||||||
* line status register.
|
* line status register.
|
||||||
*/
|
*/
|
||||||
if (port->flags & ASYNC_INITIALIZED) {
|
if (tty_port_initialized(port)) {
|
||||||
tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
|
tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
|
||||||
/*
|
/*
|
||||||
* Before we drop DTR, make sure the UART transmitter
|
* Before we drop DTR, make sure the UART transmitter
|
||||||
@@ -1622,7 +1618,7 @@ isdn_tty_hangup(struct tty_struct *tty)
|
|||||||
return;
|
return;
|
||||||
isdn_tty_shutdown(info);
|
isdn_tty_shutdown(info);
|
||||||
port->count = 0;
|
port->count = 0;
|
||||||
port->flags &= ~ASYNC_NORMAL_ACTIVE;
|
tty_port_set_active(port, 0);
|
||||||
port->tty = NULL;
|
port->tty = NULL;
|
||||||
wake_up_interruptible(&port->open_wait);
|
wake_up_interruptible(&port->open_wait);
|
||||||
}
|
}
|
||||||
@@ -1979,7 +1975,7 @@ isdn_tty_find_icall(int di, int ch, setup_parm *setup)
|
|||||||
#endif
|
#endif
|
||||||
if (
|
if (
|
||||||
#ifndef FIX_FILE_TRANSFER
|
#ifndef FIX_FILE_TRANSFER
|
||||||
(info->port.flags & ASYNC_NORMAL_ACTIVE) &&
|
tty_port_active(&info->port) &&
|
||||||
#endif
|
#endif
|
||||||
(info->isdn_driver == -1) &&
|
(info->isdn_driver == -1) &&
|
||||||
(info->isdn_channel == -1) &&
|
(info->isdn_channel == -1) &&
|
||||||
@@ -2018,8 +2014,6 @@ isdn_tty_find_icall(int di, int ch, setup_parm *setup)
|
|||||||
return (wret == 2) ? 3 : 0;
|
return (wret == 2) ? 3 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TTY_IS_ACTIVE(info) (info->port.flags & ASYNC_NORMAL_ACTIVE)
|
|
||||||
|
|
||||||
int
|
int
|
||||||
isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
||||||
{
|
{
|
||||||
@@ -2077,7 +2071,7 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
|||||||
#ifdef ISDN_TTY_STAT_DEBUG
|
#ifdef ISDN_TTY_STAT_DEBUG
|
||||||
printk(KERN_DEBUG "tty_STAT_DCONN ttyI%d\n", info->line);
|
printk(KERN_DEBUG "tty_STAT_DCONN ttyI%d\n", info->line);
|
||||||
#endif
|
#endif
|
||||||
if (TTY_IS_ACTIVE(info)) {
|
if (tty_port_active(&info->port)) {
|
||||||
if (info->dialing == 1) {
|
if (info->dialing == 1) {
|
||||||
info->dialing = 2;
|
info->dialing = 2;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -2088,7 +2082,7 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
|||||||
#ifdef ISDN_TTY_STAT_DEBUG
|
#ifdef ISDN_TTY_STAT_DEBUG
|
||||||
printk(KERN_DEBUG "tty_STAT_DHUP ttyI%d\n", info->line);
|
printk(KERN_DEBUG "tty_STAT_DHUP ttyI%d\n", info->line);
|
||||||
#endif
|
#endif
|
||||||
if (TTY_IS_ACTIVE(info)) {
|
if (tty_port_active(&info->port)) {
|
||||||
if (info->dialing == 1)
|
if (info->dialing == 1)
|
||||||
isdn_tty_modem_result(RESULT_BUSY, info);
|
isdn_tty_modem_result(RESULT_BUSY, info);
|
||||||
if (info->dialing > 1)
|
if (info->dialing > 1)
|
||||||
@@ -2118,7 +2112,7 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
|||||||
* waiting for it and
|
* waiting for it and
|
||||||
* set DCD-bit of its modem-status.
|
* set DCD-bit of its modem-status.
|
||||||
*/
|
*/
|
||||||
if (TTY_IS_ACTIVE(info) ||
|
if (tty_port_active(&info->port) ||
|
||||||
(info->port.blocked_open &&
|
(info->port.blocked_open &&
|
||||||
(info->emu.mdmreg[REG_DCD] & BIT_DCD))) {
|
(info->emu.mdmreg[REG_DCD] & BIT_DCD))) {
|
||||||
info->msr |= UART_MSR_DCD;
|
info->msr |= UART_MSR_DCD;
|
||||||
@@ -2145,7 +2139,7 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
|||||||
#ifdef ISDN_TTY_STAT_DEBUG
|
#ifdef ISDN_TTY_STAT_DEBUG
|
||||||
printk(KERN_DEBUG "tty_STAT_BHUP ttyI%d\n", info->line);
|
printk(KERN_DEBUG "tty_STAT_BHUP ttyI%d\n", info->line);
|
||||||
#endif
|
#endif
|
||||||
if (TTY_IS_ACTIVE(info)) {
|
if (tty_port_active(&info->port)) {
|
||||||
#ifdef ISDN_DEBUG_MODEM_HUP
|
#ifdef ISDN_DEBUG_MODEM_HUP
|
||||||
printk(KERN_DEBUG "Mhup in ISDN_STAT_BHUP\n");
|
printk(KERN_DEBUG "Mhup in ISDN_STAT_BHUP\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -2157,7 +2151,7 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
|||||||
#ifdef ISDN_TTY_STAT_DEBUG
|
#ifdef ISDN_TTY_STAT_DEBUG
|
||||||
printk(KERN_DEBUG "tty_STAT_NODCH ttyI%d\n", info->line);
|
printk(KERN_DEBUG "tty_STAT_NODCH ttyI%d\n", info->line);
|
||||||
#endif
|
#endif
|
||||||
if (TTY_IS_ACTIVE(info)) {
|
if (tty_port_active(&info->port)) {
|
||||||
if (info->dialing) {
|
if (info->dialing) {
|
||||||
info->dialing = 0;
|
info->dialing = 0;
|
||||||
info->last_l2 = -1;
|
info->last_l2 = -1;
|
||||||
@@ -2183,14 +2177,14 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
|
|||||||
return 1;
|
return 1;
|
||||||
#ifdef CONFIG_ISDN_TTY_FAX
|
#ifdef CONFIG_ISDN_TTY_FAX
|
||||||
case ISDN_STAT_FAXIND:
|
case ISDN_STAT_FAXIND:
|
||||||
if (TTY_IS_ACTIVE(info)) {
|
if (tty_port_active(&info->port)) {
|
||||||
isdn_tty_fax_command(info, c);
|
isdn_tty_fax_command(info, c);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ISDN_AUDIO
|
#ifdef CONFIG_ISDN_AUDIO
|
||||||
case ISDN_STAT_AUDIO:
|
case ISDN_STAT_AUDIO:
|
||||||
if (TTY_IS_ACTIVE(info)) {
|
if (tty_port_active(&info->port)) {
|
||||||
switch (c->parm.num[0]) {
|
switch (c->parm.num[0]) {
|
||||||
case ISDN_AUDIO_DTMF:
|
case ISDN_AUDIO_DTMF:
|
||||||
if (info->vonline) {
|
if (info->vonline) {
|
||||||
@@ -2528,7 +2522,7 @@ isdn_tty_modem_result(int code, modem_info *info)
|
|||||||
if (info->closing || (!info->port.tty))
|
if (info->closing || (!info->port.tty))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (info->port.flags & ASYNC_CHECK_CD)
|
if (tty_port_check_carrier(&info->port))
|
||||||
tty_hangup(info->port.tty);
|
tty_hangup(info->port.tty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -895,7 +895,7 @@ static void sdio_uart_set_termios(struct tty_struct *tty,
|
|||||||
/* Handle transition away from B0 status */
|
/* Handle transition away from B0 status */
|
||||||
if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) {
|
if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) {
|
||||||
unsigned int mask = TIOCM_DTR;
|
unsigned int mask = TIOCM_DTR;
|
||||||
if (!(cflag & CRTSCTS) || !test_bit(TTY_THROTTLED, &tty->flags))
|
if (!(cflag & CRTSCTS) || !tty_throttled(tty))
|
||||||
mask |= TIOCM_RTS;
|
mask |= TIOCM_RTS;
|
||||||
sdio_uart_set_mctrl(port, mask);
|
sdio_uart_set_mctrl(port, mask);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2029,7 +2029,7 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial)
|
|||||||
|
|
||||||
tty = tty_port_tty_get(&serial->port);
|
tty = tty_port_tty_get(&serial->port);
|
||||||
|
|
||||||
if (tty && test_bit(TTY_THROTTLED, &tty->flags)) {
|
if (tty && tty_throttled(tty)) {
|
||||||
tty_kref_put(tty);
|
tty_kref_put(tty);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-12
@@ -289,7 +289,7 @@ static void raw3215_timeout(unsigned long __data)
|
|||||||
|
|
||||||
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
||||||
raw->flags &= ~RAW3215_TIMER_RUNS;
|
raw->flags &= ~RAW3215_TIMER_RUNS;
|
||||||
if (!(raw->port.flags & ASYNC_SUSPENDED)) {
|
if (!tty_port_suspended(&raw->port)) {
|
||||||
raw3215_mk_write_req(raw);
|
raw3215_mk_write_req(raw);
|
||||||
raw3215_start_io(raw);
|
raw3215_start_io(raw);
|
||||||
if ((raw->queued_read || raw->queued_write) &&
|
if ((raw->queued_read || raw->queued_write) &&
|
||||||
@@ -311,8 +311,7 @@ static void raw3215_timeout(unsigned long __data)
|
|||||||
*/
|
*/
|
||||||
static inline void raw3215_try_io(struct raw3215_info *raw)
|
static inline void raw3215_try_io(struct raw3215_info *raw)
|
||||||
{
|
{
|
||||||
if (!(raw->port.flags & ASYNC_INITIALIZED) ||
|
if (!tty_port_initialized(&raw->port) || tty_port_suspended(&raw->port))
|
||||||
(raw->port.flags & ASYNC_SUSPENDED))
|
|
||||||
return;
|
return;
|
||||||
if (raw->queued_read != NULL)
|
if (raw->queued_read != NULL)
|
||||||
raw3215_start_io(raw);
|
raw3215_start_io(raw);
|
||||||
@@ -494,7 +493,7 @@ static void raw3215_make_room(struct raw3215_info *raw, unsigned int length)
|
|||||||
/* While console is frozen for suspend we have no other
|
/* While console is frozen for suspend we have no other
|
||||||
* choice but to drop message from the buffer to make
|
* choice but to drop message from the buffer to make
|
||||||
* room for even more messages. */
|
* room for even more messages. */
|
||||||
if (raw->port.flags & ASYNC_SUSPENDED) {
|
if (tty_port_suspended(&raw->port)) {
|
||||||
raw3215_drop_line(raw);
|
raw3215_drop_line(raw);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -616,10 +615,10 @@ static int raw3215_startup(struct raw3215_info *raw)
|
|||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (raw->port.flags & ASYNC_INITIALIZED)
|
if (tty_port_initialized(&raw->port))
|
||||||
return 0;
|
return 0;
|
||||||
raw->line_pos = 0;
|
raw->line_pos = 0;
|
||||||
raw->port.flags |= ASYNC_INITIALIZED;
|
tty_port_set_initialized(&raw->port, 1);
|
||||||
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
||||||
raw3215_try_io(raw);
|
raw3215_try_io(raw);
|
||||||
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
|
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
|
||||||
@@ -635,8 +634,7 @@ static void raw3215_shutdown(struct raw3215_info *raw)
|
|||||||
DECLARE_WAITQUEUE(wait, current);
|
DECLARE_WAITQUEUE(wait, current);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (!(raw->port.flags & ASYNC_INITIALIZED) ||
|
if (!tty_port_initialized(&raw->port) || (raw->flags & RAW3215_FIXED))
|
||||||
(raw->flags & RAW3215_FIXED))
|
|
||||||
return;
|
return;
|
||||||
/* Wait for outstanding requests, then free irq */
|
/* Wait for outstanding requests, then free irq */
|
||||||
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
||||||
@@ -650,7 +648,7 @@ static void raw3215_shutdown(struct raw3215_info *raw)
|
|||||||
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
||||||
remove_wait_queue(&raw->empty_wait, &wait);
|
remove_wait_queue(&raw->empty_wait, &wait);
|
||||||
set_current_state(TASK_RUNNING);
|
set_current_state(TASK_RUNNING);
|
||||||
raw->port.flags &= ~ASYNC_INITIALIZED;
|
tty_port_set_initialized(&raw->port, 1);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
|
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
|
||||||
}
|
}
|
||||||
@@ -773,7 +771,7 @@ static int raw3215_pm_stop(struct ccw_device *cdev)
|
|||||||
raw = dev_get_drvdata(&cdev->dev);
|
raw = dev_get_drvdata(&cdev->dev);
|
||||||
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
||||||
raw3215_make_room(raw, RAW3215_BUFFER_SIZE);
|
raw3215_make_room(raw, RAW3215_BUFFER_SIZE);
|
||||||
raw->port.flags |= ASYNC_SUSPENDED;
|
tty_port_set_suspended(&raw->port, 1);
|
||||||
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
|
spin_unlock_irqrestore(get_ccwdev_lock(raw->cdev), flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -786,7 +784,7 @@ static int raw3215_pm_start(struct ccw_device *cdev)
|
|||||||
/* Allow I/O again and flush output buffer. */
|
/* Allow I/O again and flush output buffer. */
|
||||||
raw = dev_get_drvdata(&cdev->dev);
|
raw = dev_get_drvdata(&cdev->dev);
|
||||||
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
|
||||||
raw->port.flags &= ~ASYNC_SUSPENDED;
|
tty_port_set_suspended(&raw->port, 0);
|
||||||
raw->flags |= RAW3215_FLUSHING;
|
raw->flags |= RAW3215_FLUSHING;
|
||||||
raw3215_try_io(raw);
|
raw3215_try_io(raw);
|
||||||
raw->flags &= ~RAW3215_FLUSHING;
|
raw->flags &= ~RAW3215_FLUSHING;
|
||||||
@@ -859,7 +857,7 @@ static void con3215_flush(void)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
raw = raw3215[0]; /* console 3215 is the first one */
|
raw = raw3215[0]; /* console 3215 is the first one */
|
||||||
if (raw->port.flags & ASYNC_SUSPENDED)
|
if (tty_port_suspended(&raw->port))
|
||||||
/* The console is still frozen for suspend. */
|
/* The console is still frozen for suspend. */
|
||||||
if (ccw_device_force_console(raw->cdev))
|
if (ccw_device_force_console(raw->cdev))
|
||||||
/* Forcing didn't work, no panic message .. */
|
/* Forcing didn't work, no panic message .. */
|
||||||
|
|||||||
@@ -1860,7 +1860,7 @@ static int tty3270_ioctl(struct tty_struct *tty, unsigned int cmd,
|
|||||||
tp = tty->driver_data;
|
tp = tty->driver_data;
|
||||||
if (!tp)
|
if (!tp)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
if (tty_io_error(tty))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
return kbd_ioctl(tp->kbd, cmd, arg);
|
return kbd_ioctl(tp->kbd, cmd, arg);
|
||||||
}
|
}
|
||||||
@@ -1874,7 +1874,7 @@ static long tty3270_compat_ioctl(struct tty_struct *tty,
|
|||||||
tp = tty->driver_data;
|
tp = tty->driver_data;
|
||||||
if (!tp)
|
if (!tp)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (tty->flags & (1 << TTY_IO_ERROR))
|
if (tty_io_error(tty))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
return kbd_ioctl(tp->kbd, cmd, (unsigned long)compat_ptr(arg));
|
return kbd_ioctl(tp->kbd, cmd, (unsigned long)compat_ptr(arg));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1255,7 +1255,7 @@ static int dgnc_block_til_ready(struct tty_struct *tty,
|
|||||||
if (file->f_flags & O_NONBLOCK)
|
if (file->f_flags & O_NONBLOCK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (tty->flags & (1 << TTY_IO_ERROR)) {
|
if (tty_io_error(tty)) {
|
||||||
retval = -EIO;
|
retval = -EIO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1305,7 +1305,7 @@ static void fwtty_set_termios(struct tty_struct *tty, struct ktermios *old)
|
|||||||
if ((baud == 0) && (old->c_cflag & CBAUD)) {
|
if ((baud == 0) && (old->c_cflag & CBAUD)) {
|
||||||
port->mctrl &= ~(TIOCM_DTR | TIOCM_RTS);
|
port->mctrl &= ~(TIOCM_DTR | TIOCM_RTS);
|
||||||
} else if ((baud != 0) && !(old->c_cflag & CBAUD)) {
|
} else if ((baud != 0) && !(old->c_cflag & CBAUD)) {
|
||||||
if (C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags))
|
if (C_CRTSCTS(tty) || !tty_throttled(tty))
|
||||||
port->mctrl |= TIOCM_DTR | TIOCM_RTS;
|
port->mctrl |= TIOCM_DTR | TIOCM_RTS;
|
||||||
else
|
else
|
||||||
port->mctrl |= TIOCM_DTR;
|
port->mctrl |= TIOCM_DTR;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static void __speakup_paste_selection(struct work_struct *work)
|
|||||||
add_wait_queue(&vc->paste_wait, &wait);
|
add_wait_queue(&vc->paste_wait, &wait);
|
||||||
while (sel_buffer && sel_buffer_lth > pasted) {
|
while (sel_buffer && sel_buffer_lth > pasted) {
|
||||||
set_current_state(TASK_INTERRUPTIBLE);
|
set_current_state(TASK_INTERRUPTIBLE);
|
||||||
if (test_bit(TTY_THROTTLED, &tty->flags)) {
|
if (tty_throttled(tty)) {
|
||||||
schedule();
|
schedule();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user