Skip to contentSkip to conversation

USB: serial: ftdi_sio: fix 300 bps rate for SIO

PATCH New Johan Hovold 1 participant 1 message Sep 13, 2022

Subsystems (3)
lore
Share & tools
lore

Johan Hovold

author maintainer
#0 lore raw

PATCH 1/1 USB: serial: ftdi_sio: fix 300 bps rate for SIO

The 300 bps rate of SIO devices has been mapped to 9600 bps since 2003... Let's fix the regression.

---
 drivers/usb/serial/ftdi_sio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/usb/serial/ftdi_sio.c +1 -2
index 52d59be92034..787e63fd7f99 100644
@@ -1319,8 +1319,7 @@ static u32 get_ftdi_divisor(struct tty_struct *tty,
 		case 38400: div_value = ftdi_sio_b38400; break;
 		case 57600: div_value = ftdi_sio_b57600;  break;
 		case 115200: div_value = ftdi_sio_b115200; break;
-		} /* baud */
-		if (div_value == 0) {
+		default:
 			dev_dbg(dev, "%s - Baudrate (%d) requested is not supported\n",
 				__func__,  baud);
 			div_value = ftdi_sio_b9600;
Signature · 1 line
2.35.1