diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 18:17:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 18:17:53 -0400 |
commit | 805bf3daf361a501594f8b27b394a8d7372ebe3c (patch) | |
tree | c71fe689115c7fa0f270d31fcef75fe61d81318c /drivers/tty | |
parent | 64e377dcd7d75c241d614458e9619d3445de44ef (diff) | |
parent | 9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff) |
Merge 3.10-rc7 into tty-next
We want the tty fixes in this branch as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/pty.c | 13 | ||||
-rw-r--r-- | drivers/tty/serial/8250/8250_gsc.c | 10 | ||||
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 5 |
3 files changed, 15 insertions, 13 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 59bfaecc4e14..abfd99089781 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -244,14 +244,9 @@ static void pty_flush_buffer(struct tty_struct *tty) | |||
244 | 244 | ||
245 | static int pty_open(struct tty_struct *tty, struct file *filp) | 245 | static int pty_open(struct tty_struct *tty, struct file *filp) |
246 | { | 246 | { |
247 | int retval = -ENODEV; | ||
248 | |||
249 | if (!tty || !tty->link) | 247 | if (!tty || !tty->link) |
250 | goto out; | 248 | return -ENODEV; |
251 | |||
252 | set_bit(TTY_IO_ERROR, &tty->flags); | ||
253 | 249 | ||
254 | retval = -EIO; | ||
255 | if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) | 250 | if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) |
256 | goto out; | 251 | goto out; |
257 | if (test_bit(TTY_PTY_LOCK, &tty->link->flags)) | 252 | if (test_bit(TTY_PTY_LOCK, &tty->link->flags)) |
@@ -262,9 +257,11 @@ static int pty_open(struct tty_struct *tty, struct file *filp) | |||
262 | clear_bit(TTY_IO_ERROR, &tty->flags); | 257 | clear_bit(TTY_IO_ERROR, &tty->flags); |
263 | clear_bit(TTY_OTHER_CLOSED, &tty->link->flags); | 258 | clear_bit(TTY_OTHER_CLOSED, &tty->link->flags); |
264 | set_bit(TTY_THROTTLED, &tty->flags); | 259 | set_bit(TTY_THROTTLED, &tty->flags); |
265 | retval = 0; | 260 | return 0; |
261 | |||
266 | out: | 262 | out: |
267 | return retval; | 263 | set_bit(TTY_IO_ERROR, &tty->flags); |
264 | return -EIO; | ||
268 | } | 265 | } |
269 | 266 | ||
270 | static void pty_set_termios(struct tty_struct *tty, | 267 | static void pty_set_termios(struct tty_struct *tty, |
diff --git a/drivers/tty/serial/8250/8250_gsc.c b/drivers/tty/serial/8250/8250_gsc.c index 097dff9c08ad..bb91b4713ebd 100644 --- a/drivers/tty/serial/8250/8250_gsc.c +++ b/drivers/tty/serial/8250/8250_gsc.c | |||
@@ -30,6 +30,12 @@ static int __init serial_init_chip(struct parisc_device *dev) | |||
30 | unsigned long address; | 30 | unsigned long address; |
31 | int err; | 31 | int err; |
32 | 32 | ||
33 | #ifdef CONFIG_64BIT | ||
34 | extern int iosapic_serial_irq(int cellnum); | ||
35 | if (!dev->irq && (dev->id.sversion == 0xad)) | ||
36 | dev->irq = iosapic_serial_irq(dev->mod_index-1); | ||
37 | #endif | ||
38 | |||
33 | if (!dev->irq) { | 39 | if (!dev->irq) { |
34 | /* We find some unattached serial ports by walking native | 40 | /* We find some unattached serial ports by walking native |
35 | * busses. These should be silently ignored. Otherwise, | 41 | * busses. These should be silently ignored. Otherwise, |
@@ -51,7 +57,8 @@ static int __init serial_init_chip(struct parisc_device *dev) | |||
51 | memset(&uart, 0, sizeof(uart)); | 57 | memset(&uart, 0, sizeof(uart)); |
52 | uart.port.iotype = UPIO_MEM; | 58 | uart.port.iotype = UPIO_MEM; |
53 | /* 7.272727MHz on Lasi. Assumed the same for Dino, Wax and Timi. */ | 59 | /* 7.272727MHz on Lasi. Assumed the same for Dino, Wax and Timi. */ |
54 | uart.port.uartclk = 7272727; | 60 | uart.port.uartclk = (dev->id.sversion != 0xad) ? |
61 | 7272727 : 1843200; | ||
55 | uart.port.mapbase = address; | 62 | uart.port.mapbase = address; |
56 | uart.port.membase = ioremap_nocache(address, 16); | 63 | uart.port.membase = ioremap_nocache(address, 16); |
57 | uart.port.irq = dev->irq; | 64 | uart.port.irq = dev->irq; |
@@ -73,6 +80,7 @@ static struct parisc_device_id serial_tbl[] = { | |||
73 | { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00075 }, | 80 | { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00075 }, |
74 | { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008c }, | 81 | { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008c }, |
75 | { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008d }, | 82 | { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008d }, |
83 | { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x000ad }, | ||
76 | { 0 } | 84 | { 0 } |
77 | }; | 85 | }; |
78 | 86 | ||
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index fc2c06c66e89..2bd78e2ac8ec 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c | |||
@@ -289,13 +289,10 @@ static int vt_disallocate(unsigned int vc_num) | |||
289 | struct vc_data *vc = NULL; | 289 | struct vc_data *vc = NULL; |
290 | int ret = 0; | 290 | int ret = 0; |
291 | 291 | ||
292 | if (!vc_num) | ||
293 | return 0; | ||
294 | |||
295 | console_lock(); | 292 | console_lock(); |
296 | if (VT_BUSY(vc_num)) | 293 | if (VT_BUSY(vc_num)) |
297 | ret = -EBUSY; | 294 | ret = -EBUSY; |
298 | else | 295 | else if (vc_num) |
299 | vc = vc_deallocate(vc_num); | 296 | vc = vc_deallocate(vc_num); |
300 | console_unlock(); | 297 | console_unlock(); |
301 | 298 | ||