linux/drivers/tty/serial/8250
David Müller 6f210c18c1 serial: 8250_pci: fix divide error bug if baud rate is 0
Since commit 21947ba654 ("serial: 8250_pci: replace switch-case by
formula"), the 8250 driver crashes in the byt_set_termios() function
with a divide error. This is caused by the fact that a baud rate of 0 (B0)
is not handled properly. Fix it by falling back to B9600 in this case.

Signed-off-by: David Müller <d.mueller@elsoft.ch>
Fixes: 21947ba654 ("serial: 8250_pci: replace switch-case by formula")
Cc: stable@vger.kernel.org
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28 20:07:10 -07:00
..
8250_accent.c tty: serial: 8250: Add generic port init macro 2016-02-06 23:15:53 -08:00
8250_acorn.c tty: serial: 8250: Fix whitespace errors 2016-02-06 23:15:53 -08:00
8250_bcm2835aux.c serial: bcm2835: fix unsigned int issue with irq 2016-02-14 17:39:36 -08:00
8250_boca.c tty: serial: 8250: Add generic port init macro 2016-02-06 23:15:53 -08:00
8250_core.c tty: serial: 8250: Cleanup p->em485 in serial8250_unregister_port 2016-03-07 16:11:14 -08:00
8250_dma.c TTY/Serial driver patches for 4.4-rc1 2015-11-04 21:35:12 -08:00
8250_dw.c serial: 8250_dw: remove leftover definitions 2016-03-07 16:11:14 -08:00
8250_early.c serial: 8250_early: Add earlycon support for Tegra 2016-02-14 17:39:36 -08:00
8250_em.c serial: 8250: remove the redundant include 2015-03-26 22:21:08 +01:00
8250_exar_st16c554.c tty: serial: 8250: Add generic port init macro 2016-02-06 23:15:53 -08:00
8250_fintek.c serial/8250_fintek: Support for any io address. 2015-07-23 15:14:42 -07:00
8250_fourport.c tty: serial: 8250: Add generic port init macro 2016-02-06 23:15:53 -08:00
8250_fsl.c serial: export fsl8250_handle_irq 2015-11-20 16:19:54 -08:00
8250_gsc.c tty: serial: 8250: Suitably replace printk 2016-02-06 23:15:53 -08:00
8250_hp300.c tty: serial: 8250: Suitably replace printk 2016-02-06 23:15:53 -08:00
8250_hub6.c tty: serial: 8250: Fix whitespace errors 2016-02-06 23:15:53 -08:00
8250_ingenic.c serial: 8250/ingenic: fix building with SERIAL_8250=m 2016-03-07 16:11:14 -08:00
8250_lpc18xx.c serial: 8250: add LPC18xx/43xx UART driver 2015-06-01 06:56:33 +09:00
8250_mid.c serial: 8250_mid: add support for DMA engine handling from UART MMIO 2015-10-17 21:22:08 -07:00
8250_moxa.c tty: serial: 8250: add MOXA Smartio MUE boards support 2016-03-07 16:11:14 -08:00
8250_mtk.c serial: 8250: convert drivers to use up_to_u8250p() 2016-03-07 16:11:14 -08:00
8250_of.c serial: 8250: of: Enable suspend/resume for 8250_of driver 2016-02-06 23:13:30 -08:00
8250_omap.c serial: 8250: convert drivers to use up_to_u8250p() 2016-03-07 16:11:14 -08:00
8250_pci.c serial: 8250_pci: fix divide error bug if baud rate is 0 2016-04-28 20:07:10 -07:00
8250_pnp.c tty: serial: 8250: Fix indentation warnings 2016-02-06 23:15:53 -08:00
8250_port.c tty/serial/8250: fix RS485 half-duplex RX 2016-04-19 15:15:38 +09:00
8250_uniphier.c serial: 8250/uniphier: fix modular build 2016-03-07 16:11:14 -08:00
8250.h tty: serial: 8250: Add generic port init macro 2016-02-06 23:15:53 -08:00
Kconfig Revert "serial: 8250: Add hardware dependency to RT288X option" 2016-04-19 15:17:37 +09:00
Makefile tty: serial: 8250: add MOXA Smartio MUE boards support 2016-03-07 16:11:14 -08:00
serial_cs.c tty: serial: 8250: Fix multi-line strings 2016-02-06 23:15:53 -08:00